Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
Tree diagrams and the binomial distribu2on
Outline for today
Be#erknowaplayer:HonusWagnerQues5onsaboutworksheet6?Reviewofconceptsinprobability:addi5veandmul5plica5verulesTreediagramsandtheanalysisofStrat-o-ma5cThebinomialdistribu5on
Announcement: class final projects
FinalprojectproposaldueonWednesdayShouldfocusonresearchques5on
• Doesn’thavetobeaboutbaseball,butneedtofinddatasetthatyoucanusetoanswertheques5on
1-2paragraphproposalisduetheWednesdayMarch29thProjectspresenta5onareonMay3rd–goodtostartworkingonthemsoon!
Be>er know a player: Honus Wagner
Probability
Probabilityisawayofmeasuringtheuncertaintyoftheoutcomeofanevent
Defini5ons:Samplespace
• Allpossibleoutcomes
AnEvent• Subsetofthesamplespace
Probabilitykeyproper5es:• 0≤Pr(X)≤1• ΣPr(X=x)=1
Probability rules - Addi2ve rule
IftherearetwoeventsA,andB,thentheprobabilityofAorBhappeningis:
Pr(AorB)=Pr(A)+Pr(B)–Pr(A,B)
EventsarecalledmutuallyexclusiveifeventsAandBcannotbothoccur-i.e.,Pr(A,B)=0
Q:WhatwouldmutuallyexclusiveeventslooklikeintheVenndiagram?A:Thecircleswouldnotoverlap
Mul2plica2ve Rule
Pr(A,B)=Pr(A|B)×Pr(B)
ProbabilityofBhappening×ProbabilityofAhappeninggivenBhappened
Twoeventsareindependentif:Pr(A,B)=Pr(A)xPr(B)i.e.,iftheoccurrenceofBdoesnoteffecttheprobabilityofAhappening
Big League Baseball
Foranyonepitch(notassumingthattheplayisinplay),whatistheprobabilityofgedngahit?
• Probabilityofasingle: 1/3·7/36+• Probabilityofadouble: 1/3·1/36+• Probabilityofatriple: 1/3·1/36+• Probabilityofahomerun: 1/3·1/36=10/108
1 2 3 4 5 61 Single Out Out Out Out Error2 Out Double Single Out Single Out3 Out Single Triple Out Out Out4 Out Out Out Out Out Out5 Out Single Out Out Out Single6 Error Out Out Out Single Homerun
2ndDie
1st D
ie
Strat-o-ma2c
Muchmorecomplexboardgames• TakesintoaccountHi#ersandPitchers• Advancedversionaccountsforaddi5onalfactors(e.g.,ballparksetc.)
Eachplayerisrepresentedbyacard
1.Awhitesingledieisrolledtodeterminewhethertousehi#erorpitcher’scard:
• 1-3->hi#erscard• 4-6->pitcher’scard
2.Then,twodicearerolledandtheirsumdetermineswhichplayinthecardshouldbeused
3.Forsomeplaysaddi5onallya20sideddieisrolledtodeterminethefinaloutcome
• andothertables/rulesonenneedtobeconsulted
Strat-o-ma2c rules and tree diagrams
Let’scalculatetheprobabilityofdifferentevents…
Calcula5ngtheprobabilityofgedngapar5cularcolumnpitcherorhi#er’scardispre#ysimple• Answer?
Calcula5ngthesumofthetwodiceisali#lemoreinvolved…• Whatisthesamplespacehere?
• i.e.,howmanypossibleoutcomesarethere?• Canyoucalculatetheprobabilitydistribu5on?
Strat-o-ma2c: analysis
Fillinthetablebelowwiththesumofthetwodiceandthencalculatetheprobabilityofrollinga2toa12
Strat-o-ma2c: analysis
1 2 3 4 5 61234 756
1st D
ie
2ndDie
Fillinthetablebelowwiththesumofthetwodiceandthencalculatetheprobabilityofrollinga2toa12
Strat-o-ma2c: analysis
1 2 3 4 5 61 2 3 4 5 6 72 3 4 5 6 7 83 4 5 6 7 8 94 5 6 7 8 9 105 6 7 8 9 10 116 7 8 9 10 11 12
1st D
ie
2ndDie
Strat-o-ma2c: analysis
1 2 3 4 5 61 2 3 4 5 6 72 3 4 5 6 7 83 4 5 6 7 8 94 5 6 7 8 9 105 6 7 8 9 10 116 7 8 9 10 11 12
1st D
ie
2ndDie
2 3 4 5 6 7 8 9 10 11 121/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
Whatistheprobabilityofrollinga1onthewhitedieandthengedngasumof7onthetworeddice?
• 1/6·6/36=6/216
Whatistheprobabilityofrollinga:• 2onthewhitedie….andthengedng…• Sumof8onthetworeddice…andthen…• Anumberfor1-8onthe20sideddie?
• 1/6·5/36·8/20=.00926
Strat-o-ma2c: analysis
2 3 4 5 6 7 8 9 10 11 121/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
Whatistheprobabilityofrollinga1onthewhitedieora6onthewhitedie?• 1/6+1/6=2/6
Whatistheprobabilityofrollinga:• 5onthewhitedie…andthengedng…• asumof8orasumof10onthetworeddice?• 1/6·(4/36+3/36)=.0324
Strat-o-ma2c: analysis
2 3 4 5 6 7 8 9 10 11 121/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
Whatistheprobabilityofrollinga3onthewhitedie• andthengedngasumof8tworeddice• orasumof10onthetworeddice
• andthena1-10onthe20sideddie?
Treediagram!
Strat-o-ma2c: analysis
2 3 4 5 6 7 8 9 10 11 121/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
3
1/6
5/36
3/361-10
1/6·5/36=.0231
10/20
8
10 1/6·3/36·½=.0069
.0231+.0069=.0300
Strat-o-ma2c: Pujols vs. Kershaw
Whatistheprobabilityofahidngadouble?
Strat-o-ma2c: Pujols vs. Kershaw
Whatistheprobabilityofahidngadouble?
Strat-o-ma2c: Pujols vs. Kershaw
2 3 4 5 6 7 8 9 10 11 121/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
Tree diagram
1
6
6
1/6
1/6
5/36
5/361-146
14/20
Tree diagram
1
6
6
7
8
1/6
1/6
5/36
6/36
5/36
5/361-146
1-2
18-203/20
2/20
14/20
1/6·(5/36·3/20+6/36+5/36·2/20)+1/6·5/36·14/20=.04977
Strat-o-ma2c: Pujols vs. Kershaw
Whatistheprobabilityofahidngahomerun?
Strat-o-ma2c: Pujols vs. Kershaw
Whatistheprobabilityofahidngahomerun?Treediagram!1/6·[3/36+4/36+5/36·17/20]+1/6·(4/36·2/20)=.0594
Parametric probability models
Wehaveexploredprobabilityusing:• Probabilityrulestocalculatetheprobabilityofanevent• Dice/spinners
Weonenusemathema5calformulas,calledprobabilitydistribu5ons,tocalculatetheprobabilityofdifferentevents
Random variates
Wecanthinkofarandomvariateasarandomnumber• Typicallyrandomvariatesaredenotedwithcapitalle#ers,e.g.,X
• Xcantakeonvaluesinthesamplespace• Whichinthiscaseisasetofnumbers
Wecanuseprobabilitydistribu5onstoassesstheprobabilitythatarandomvariateXwillhaveavaluebetweentwoothernumbers• Nota5on:Pr(a<X<b)
Random variates
Randomvariatescanbeeither:• Discrete:Xtakesonintegervalues• Con5nuous:Xtakesonrealvalues
Sameproper5esofprobabilitydistribu5onsapply:• Pr(a<X<b)≥0• ΣPr(X=xi)=1
Bernoulli Distribu2on
Modelstheprobabilityoftwooutcomes:• Success:X=1• Failure:X=0• E.g.,gedngahead(X=1)oratail(X=0)forflippingacoin
Modelhasoneparameterπ,whichistheprobabilityofgednga1• E.g.,theprobabilityofgedngheadonacoinflip• Pr(X=1)=?Pr(X=0)=?
Bernoulli Distribu2on
ProbabilitymassfuncFonstelltheprobabilityofeachoutcomeinthesamplespaceofadiscretedistribu5on
ForBernoulliDistribu5onswecanwritetheprobabilitymassfunc5onas:
Wecanalsoplottheprobabilitymassfunc5on• Ifπ=.5whatwoulditlooklike?• Ifπ=.9whatwoulditlooklike?
Parameterπ
Bernoulli Distribu2on
Canyouthinkofbaseballexample?• Example:Theprobabilitythataplayergetonbaseforagivenatbat• IfweweremodelingDavidOr5z,whatwouldagoodes5mateofπbe?• OBP=.355,soagoodnumbertousewouldbeπ=.355
Binomial distribu2on
Modelstheprobabilityofhavingksuccessesoutofthentrials
• Probabilityofsuccessoneachtrialisπ
Example:ifaplayercomestobat45mesinagame,whatistheprobabilityofgedngon-basek5mes
• Whatisthesamplespace?
Assumesthesameprobabilityofgedngon-baseeachplateappearance(π)
• Aretheassump5onsreasonableforthismodel?• Nostreakiness
Binomial distribu2on
Probabilityofgedngksuccessesoutofntrialsis:
where
WhatvaluescanXtakeon(i.e.,whatisthesamplespace)?
• krangesfrom0,1,…,n
Parameters:πandn
n choose k
Nchoosekfunc5ontellsushowmanywaystherearetoorderkitemsoutofntotal
Q:Howmanywaysaretheretochoose3thingsoutofatotalof8?
A:(8·7·6)/(3·2)=56
R:choose(n,k)