Download Chapter 6 Notes

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Chapter6:Counting,Probability,andInference
6.1IntroductiontoProbability
Whenoutcomesofasituationareequallylikely,the___________________ofaneventis
the__________________or_____________________ofoutcomesthatfittheevent.
Definitions
•
•
•
•
Experiment–asituationwithseveralpossibleresults
Probabilities–ameasureofhowrelativelyoftentheresultsoccur.
Outcome–eachresultofanexperiment
SampleSpace–thesetofallpossibleoutcomesofanexperiment
Ex1:Twosix-sideddice,oneredandonegreen,arethrown,andbothnumbersare
recorded.
a) Listallpossibleoutcomesfortheexperiment.
b) Howmanyoutcomesareinthesamplespaceforthisexperiment?
a)
b)
EventsandProbabilities
Whentwodicearethrown,peopleareoftenconcernedwiththesumofthedotsof
thedice.Forexample,theymaywanttogetasumof7.Thisiscalledanevent.An
eventisanysubsetofthesamplespaceofanexperiment.
Eventdescription
Tossingdoubles
Outcomeintheevent
Tossingasumof10
Tossinga3onthereddie
Tossingasumof1
DefinitionofProbabilityofanEvent
𝑷 𝑬 =
𝑵(𝑬)
=
𝑵 𝑺
Experiment-tosstwodice
Event-tossingasumlessthan4:_____________________________________N(E)=_______
Sample=_____
Probability=______________
Ex2:Anexperimentconsistsoftossingtwofaircoinsandcountingthenumberof
heads.Considertheevents1headinall,2headsinall,and0headsinall.Arethese
eventsequallylikely?
a) Thesamplespaceis{_____,_____,_____,_____}
b) Thereis__outcomefortheevent0heads,__outcomesintheevent1head,
and__outcomeintheevent2heads.Theseeventsare/arenotequally
likely.
Ex3:Aresearcherisstudyingthenumberofboysandgirlsinfamilieswiththree
children.Assumethatthebirthofaboyoragirlisequallylikely.
a) Listthesamplespace.
b) Findtheprobabilitythatafamilyofthreechildrenhasexactlyoneboy.
Outcomes=___
Eventofonly1boy=___
P(1boy)=____
6.2PrinciplesofProbability
UnionofSets:AÈB,theunionofAandB,containsall____________thatareeitherinA
orinB.IfAandBhavenoelementsincommon,theyarecalled______________setsor
______________________________sets.
AdditionCountingPrinciple(MutuallyExclusiveForm)
Activity1:Tossapairofsix-sideddice20times,recordthesuminthefrequency
table:
Sum
2
3
4
5
6
7
Frequency
Sum
8
9
10
11
12
Whatistherelativefrequencyofhavingasumof7?_____
Whatistherelativefrequencyofhavingasumof11?_____
Frequency
Whatistherelativefrequencyofhavingasumof7or11?_____
Theevents“asumof7”and“asumof11”are____________________________
Theorem(ProbabilityoftheUnionofMutuallyExclusiveEvents)
Activity2:Writethesumof2sixsideddice.Whichsumsareprime?
Refertodicesamplespaceandfindtheprobabilityofeachevent:
Event
2
3
4
5
6
7
Probability
Event
8
9
10
11
12
Probability
Findtheprobabilityofeachprimenumberandaddthemtofindtheprobabilitythat
thesumoftwodiceisaprimenumber.
OverlappingEvents
TheintersectionofsetsAandBiscalledthe________________andiswrittenasA____B.
ThesetsofAandBarenotmutuallyexclusiveandthereforehaveoutcomesthat
____________________.
Ex1:Supposeatahighschool,298studentsstudyonlyFrench,onlySpanish,or
bothlanguages.Theschoolreports115studentsstudyFrenchand209students
studySpanish,butbecause115and209>298,theremustbestudentswhostudy
bothlanguages.Howmanystudentsstudyboth?
N(F)=
N(S)=
N(FÈS)=
N(FÇS)=
AdditionCountingPrinciple(GeneralForm)
Theorem(ProbabilityoftheUnionofEvents,GeneralForm)
Ex2:Apairofsix-sideddiceisthrown.Ifthedicearefair,whatistheprobability
thatthediceshowdoublesorasumlessthan10?
P(doubles)=______ P(sumlessthan10)=________
P(doubleorsum<10)=
P(doublesand<10)=______
ComplementaryEvents–eventsthataremutuallyexclusiveandtheirunionisthe
entiresamplespace.ThecomplementofeventAiscalled___________.
IfAandBarecomplementary,thenP(A)+P(B)=1
Theorem(ProbabilityofComplements)
Ex3:Refertothe298studentsstudyinglanguageinexample1.Ifastudentis
selectedatrandom,whatistheprobabilitythatthestudentisnotstudyingboth
languagesatthesametime?
6.3CountingStringswithReplacement
TreeDiagram-Atravelcompanyofferspackagevacationswithchoiceofeconomy
orbusinessclassflights,and3optionsforaccommodations(3-star,4-star,or5star).Drawatreediagramtorepresentthedifferentpossibilities.
5-star
Bussiness
4-star
3-star
Vacation
5-star
Economy
Howmanydifferentpossibilitiesarethere?______
4-star
3-star
Now,they’vedecidedtoadvertisethateachvacationcomeswithatheme
(adventure,sports,beaches,shopping,sights).
Drawanothertreediagramandlistthenumberofpossibilities.
MultiplicationCountingPrinciple
AandBarefinitesets.ThenumberofwaystochooseoneelementfromAand
oneelementfromBareN(A)___N(B)
Canextendtomorethantwosets.ChoosingoneelementfromsetA1,oneelement
fromA2,...andoneelementfromAkisN(A1)xN(A2)x...xN(Ak)
Ex1:Apopulargameshowfeaturesaspinnerdivided
into24congruentsectorsandnumberedlikethewheel
shown.Thespinnercannotstoponaboundaryline.You
spinittwice.DescribethesamplespaceSforthis
experiment,anddeterminethenumberofelementsinS.
Whatistheprobabilityofeachoutcome?
Strings
A____________isanorderedlistofsymbols.Thenumberofsymbolsinastringisthe
________________ofthestring.
Ex2:Ona28questionmultiple-choicetest,eachquestionhas5choices.
a) Howmanypossiblecompletedanswersheetsarethere?
b) Ifyouguessrandomlyoneachquestion,whatistheprobabilityof
answeringall28questionscorrectly?
Thereare_____possiblestrings.Theseare____________________________________because
theanswers/symbolscanbeusedoverandover.
Theorem(StringswithReplacement)
LetSbeasetwithnelements.Thentherearenkpossiblestringswith
replacementoflengthkwithelementsfromS.
Ex3:Inacertainstate,licenseplateshavetwoletterfollowedby4digitsfrom0to
9.Howmanylicenseplatesarepossible?
Thereare____letterssothereare_____stringsof2letters.
Thereare____digits,sothereare______stringsof4digits.
Sothereare_____x______=____________possiblelicenseplates.
IndependentEvents
EventsAandBareindependenteventsifandonlyif
Ex4:Thespinnershownisusedinacarnivalgame.Itis
assumedtobefair,sothespinnerhasthesameprobabilityof
landingineachsector.Thegameconsistsoftwospins.
a) Youwinifthefirstspinstopsonanevennumberandthe
secondspinstopsonamultipleof3.Whatistheprobability
ofwinning?
b)IfeventBwerechangedtobethesumofbothspinsisgreaterthan8,showthat
theeventsAandBaredependent.
Thereare____outcomesinwhichthesumofbothspinsisgreaterthan8.N(B)=____
andP(B)=_____________________
Thereare____outcomesinwhichboththefirstspinisevenandthesumofthespins
isgreaterthan8.
ThusN(AÇB)=_____andP(AÇB)=_________________.TheeventsAandBare
_________________becauseP(A)xP(B)=______________________
6.4CountingStringswithoutReplacement
Ex1:ThePac-12athleticconferenceconsistsof12teams.Youwanttopredict
whichteamwithfinishfirst,second,andthirdinaparticularsport.Howmany
differentpredictionsarepossible?
Anarrangementofteams,objects,orsymbolswithoutreplacementiscalleda
permutationofthoseobjects.Foranypositiveintegersnandr,thenumberof
permutationsofnobjectstakenratatimeisthenumberofstringsoflengthrofn
symbolswithoutreplacement.
nPr=n(n-1)(n-2)...(n-r+1)=
)!
)+, !
Ex2:Howmanydifferentsix-letterstringscanbeformedfromsixlettersinthe
wordPALINDROMEwithoutreplacement?
PermutationsofnObjectsTakennatatTime
nPn=n!
Ex3:HowmanypossiblerankingsofallPac-12teamsarepossible?
6.5ContingencyTables
Ex1:Thetabletotherightliststhe
numberofpassengersandcrewwho
survivedanddiedinthesinkingof
theTitanic.
a) OutofallpeopleontheTitanic,whatpercentsurvived?
b) Findthepercentofpassengersinfirstclasswhosurvived?
c) Findthepercentofpassengerswhosurvivedthatwereinfirstclass?
Ex2:A2001studybytheUT
SouthwesternMedicalCenter
examined626patientstoseeifthere
wasaconnectionbetweengettingatattooandinfectionwithHepatitisC.The
resultsareinthetable.
a) Addrowandcolumntotalstothetable
HasHepatitisC
NoHepatitisC
Totals
Tattooin
Commercial
17
35
Tattoo
Elsewhere
8
53
NoTattoo
Totals
18
495
b) Whatdoesthetotalofthethirdcolumnrepresent?
c) Whatdoesthetotalofthesecondrowrepresent?
d) Accordingtothisdata,issomeonewithatattoodoneinacommercialparlor
moreorlesslikelytohaveHepatitisCthansomeonewithatattoodone
elsewhere?
e) Giveatleastonereasonwhytheresultinpartdmightnotreflectthesafety
ofeachkindoftattoo.
6.6ConditionalProbability
Whatistheprobabilitythatarandomlyselectedpassengersurvivedgiventhatthe
passengerwasinsecondclass?
P(BgivenA)=
-(.∩0)
-(.)
=
1(2∩3)
1(4)
1(2)
1(4)
=
5(.∩0)
5 .
DefinitionofConditionalProbability:P(B|A)=
Ex1:Anarticleinamedicaljournalreportedthat,whenpeoplegototheirdoctor
withasorethroatandthinktheymighthavestrepthroat,only30%actuallyhave
strepthroat.Itnotedthatacurrenttestforstrepthroatwas80%accurateifyou
havestrepthroatand90%accurateifyoudonot.Whatistheprobabilitythata
personwhoreceivesapositiveresultfromthistestdoesnothavestrepthroat?
Positivetestresult=0.24and0.07=0.31
Doesnothavestrepthroat=0.07
P(doesnothavestrep|positivetestresult)=.07/(.31)=23%
Ex2:Supposeallpatientsaretestedforaseriousdiseasethatisestimatedtobe
foundin0.5%ofpeople.Supposealsothatthetestaccuratelyspotsthedisease
98%ofthetimeandaccuratelyindicatesnodisease95%ofthetime.Whatisthe
probabilitythatanegativeresultisafalsenegative?
LetD=positivedisease
A
NotA
Total
LetA=testspositive
D
NotD
Total
6.8Two“Laws,”butOnlyOneisValid
Expectedvs.ObservedCounts
Ifanoutcomeinanexperimenthasprobabilityp,theninntrialsoftheexperiment,
theexpectedcountoftheoutcomeisnp.
Ifaneventcontainsmanyoutcomes,thentheexpectedcountofaneventisthesum
oftheexpectedcountsoftheoutcomes.
Ex1:
a) Acurrentestimatefortheproportionofleft-handersinthepopulationsis
9%.Whatistheexpectedcountofleft-handersinaclassroomof36
students?
b) Supposeawetseasonis125dayslongandthereisan85%chanceofrainof
thosedays.Thedryseasonis240dayslongandthereisa10%chanceof
rainonthosedays.Whatistheexpectednumberofdaysofraininayear?
Theexpectedcounttellswhatwillhappenin_______________________.
Ex2:Dr.Kerrichtossedacoin10,000timesandobserved5067heads.
a) Whatwastheexpectednumberofheads?
b) Findthedifferencebetweentheobservedandexpectednumbersofheads.
c) Whatwastherelativefrequencyofheads?
d) Whatwasthedifferencebetweentherelativefrequencyandtheprobability
ofheads?
LawofLargeNumbers
Therelativefrequencygetscloserandclosertothe_________________asthenumberof
________________increases.
6.9TheChi-SquareTest
Chi-squarestatisticcanhelpyoudeterminewhethercertainresultsaredueto
chancevariationorwheretheyindicatethatthehypothesisiswrong.
Chi-Squaredstatistic:𝝌𝟐 =
ai=
ei=
Ex1:Totestifthecoinisfair,
a) computethechi-squarestatisticforthecointhatcameupheads43timesin
50tosses
Observedfrequency
Expectedfrequency
𝒂𝒊 − 𝒆 𝒊 𝟐
𝒆𝒊
𝝌𝟐 =
Outcome1-heads
Outcome2–tails
b) computethechi-squarestatisticforthecointhatcameupheads30timesin
50tosses
Outcome1-heads
Outcome2–tails
Observedfrequency
Expectedfrequency
𝟐
𝒂𝒊 − 𝒆 𝒊
𝒆𝒊
𝟐
𝝌 =
SignificanceLevelandtheChi-SquareTable
Chi-Squaretablesallow
comparisonofcalculatedchisquaretocriticalprobabilities
(significancelevel)giventhe
numberofoutcomesn–1(degrees
offreedom).
Ifachi-squarevaluefortheoriginal
experimentis__________thanthechi-squarevalueinthetableataparticular
significancelevel,thenwe____________thehypothesis.
Ifachi-squarevaluefortheoriginalexperimentis_______thanthechi-squarevalue
inthetableataparticularsignificancelevel,thenthereis_______________________to
rejectthehypothesis.
MorethanTwoOutcomes
Whentherearemorethantwooutcomestoanexperiment,calculatingprobabilities
canbetediousorimpossible,sosimulatingthedistributionofc2valuesisvery
helpful.
Activity:
Wasthenumberofsurvivorssounequalbyclassthatitisunlikelytohavehappened
bychance?
Passengers
Survived
Died
Totals
Percent
Expected#
Survivors
Contribution
toChi-square
First
203
122
325
Second
118
167
285
Third
178
528
706
Crew
212
673
885
Total
711
1490
2201