You are on page 1of 13

10/3/2016

TheBinomialDistribution

TheBinomialDistribution
"Bi"means"two"(likeabicyclehastwowheels)...
...sothisisaboutthingswithtworesults.

TossingaCoin:

DidwegetHeads(H)or
Tails(T)

WesaytheprobabilityofthecoinlandingHis
AndtheprobabilityofthecoinlandingTis

ThrowingaDie:
Didwegetafour...?
...ornot?
Wesaytheprobabilityofafouris1/6(oneofthesixfacesisafour).
Andtheprobabilityofnotfouris5/6(fiveofthesixfacesarenotafour)

Let's Toss a Coin!


Tossafaircointhreetimes...whatisthechanceofgettingtwoHeads?
Tossingacointhreetimes(Hisforheads,TforTails)cangetanyofthese8 outcomes :

HHH

HHT

HTH

https://www.mathsisfun.com/data/binomialdistribution.html

1/13

10/3/2016

TheBinomialDistribution

HTT

THH

THT

TTH

TTT

Whichoutcomesdowewant?
"TwoHeads"couldbeinanyorder:"HHT","THH"and"HTH"allhavetwoHeads(andoneTail).
So3oftheoutcomesproduce"TwoHeads".

Whatistheprobabilityofeachoutcome?
Eachoutcomeisequallylikely,andthereare8ofthem.Soeachhasaprobabilityof1/8
Sotheprobabilityof event "TwoHeads"is:
Numberof

outcomeswewant

Probabilityof
eachoutcome

1/8

=3/8

Weusedspecialwords:
Outcome:theresultofthreecointosses(8different
possibilities)
Event:"TwoHeads"outofthreecointosses(3possibilities)

Let's Calculate Them All:


Thecalculationsare(Pmeans"Probabilityof"):
https://www.mathsisfun.com/data/binomialdistribution.html

2/13

10/3/2016

TheBinomialDistribution

P(ThreeHeads)=P(HHH)=1/8
P(TwoHeads)=P(HHT)+P(HTH)+P(THH)=1/8+1/8+1/8=3/8
P(OneHead)=P(HTT)+P(THT)+P(TTH)=1/8+1/8+1/8=3/8
P(ZeroHeads)=P(TTT)=1/8
Wecanwritethisintermsofa RandomVariable ,X,="ThenumberofHeadsfrom3tosses
ofacoin":
P(X=3)=1/8
P(X=2)=3/8
P(X=1)=3/8
P(X=0)=1/8
Andwecanalsodrawa BarGraph :

Itissymmetrical!

Making a Formula
Now...whatarethechancesof5headsin9tosses...tolistalloutcomes(512)wouldtake
alongtime!
Solet'smakeaformula.

Inourpreviousexample,howcouldwegetthevalues1,3,3and1?

Theyareactuallyinthethirdrowof PascalsTriangle ...!

https://www.mathsisfun.com/data/binomialdistribution.html

3/13

10/3/2016

TheBinomialDistribution

Canwemakethemusingaformula?

Surewecan,andhereitis:

n=totalnumber

k=numberwewant

Itisoftencalled"nchoosek"andyoucanreadmore
aboutitat CombinationsandPermutations .
Note:the"!"means" factorial ",forexample4!=1234=24

Let'suseit:

Example:3tossesgetting2Heads
Wehaven=3andk=2
n!
k!(nk)!

3!
2!(32)!

321
211

=3

Sothereare3outcomesfor"2Heads"
(Weknewthatalready,butnowwehaveaformulaforit.)

Let'suseitforaharderquestion:

Example:whatarethechancesof5headsin9tosses?
Wehaven=9andk=5
https://www.mathsisfun.com/data/binomialdistribution.html

4/13

10/3/2016

TheBinomialDistribution

n!
k!(nk)!

9!
5!(95)!

987654321
543214321

=126

Andfor9tossesthereare2 9=512totaloutcomes,sowegettheprobability:

Numberof

outcomeswewant

126

Probabilityof
eachoutcome

512

126
512

P(X=5)=

126
512

63
256

=0.24609375

Abouta25%chance.
(Easierthanlistingthemall.)

Bias!
Sofarthechancesofsuccessorfailurehavebeenequallylikely.
Butwhatifthecoinsarebiased(landmoreononesidethananother)orchoicesarenot
50/50.

Example:Yousellsandwiches.70%ofpeoplechoosechicken,the
restchoosepork.
Whatistheprobabilityofselling2chickensandwichestothenext3
customers?
Thisisjustliketheheadsandtailsexample,butwith70/30insteadof50/50.

https://www.mathsisfun.com/data/binomialdistribution.html

5/13

10/3/2016

TheBinomialDistribution

Let'sdrawa treediagram :

The"TwoChicken"casesarehighlighted.
Noticethattheprobabilitiesfor"twochickens"allworkouttobe 0.147 ,becauseweare
multiplyingtwo0.7sandone0.3ineachcase.
Canwegetthe0.147fromaformula?Whatwewantis"two0.7sandone0.3"
0.7istheprobabilityofeachchoicewewant,callitp
2isthenumberofchoiceswewant,callitk

Probabilityof"choiceswewant"(twochickens)is:pk
And
Theprobabilityoftheoppositechoiceis:1p
Thetotalnumberofchoicesis:n
Thenumberofoppositechoicesis:nk

Probabilityof"oppositechoices"(onepork)is:(1p)(nk)
Soallchoicestogetheris:

pk(1p)(nk)

Example:(continued)
p=0.7(chanceofchicken)
n=3
https://www.mathsisfun.com/data/binomialdistribution.html

6/13

10/3/2016

TheBinomialDistribution

k=2
Soweget:

pk(1p)(nk)=0.72(10.7)(32)=0.72(0.3)(1)=0.70.70.3=
0.147
whichistheprobabilityofeachoutcome.

Andthetotalnumberofthoseoutcomesis:
n!
k!(nk)!

3!
2!(32)!

321
211

=3

Andweget:
Numberof

outcomeswewant

Probabilityof
eachoutcome

0.147

= 0.441

Sotheprobabilityofevent"2peopleoutof3choosechicken"=0.441

OK.Thatwasalotofworkforsomethingweknewalready,butnowwecananswerharder
questions.

Example:Yousay"70%choosechicken,so7ofthenext10
customersshouldchoosechicken"...whatarethechancesyouare
right?
p=0.7
n=10
k=7
Soweget:
https://www.mathsisfun.com/data/binomialdistribution.html

7/13

10/3/2016

TheBinomialDistribution

pk(1p)(nk)=0.77(10.7)(107)=0.77(0.3)(3)=0.0022235661
Thatistheprobabilityofeachoutcome.

Andthetotalnumberofthoseoutcomesis:
n!
k!(nk)!

10!
7!(107)!
10987654321
7654321321
1098
321

=120

Andweget:
Numberof

outcomeswewant

120

Probabilityof
eachoutcome

0.0022235661 = 0.266827932

Infacttheprobabilityof7outof10choosingchickenisonlyabout27%

Moralofthestory:eventhoughthelongrunaverageis70%,don'texpect7outof
thenext10.

Putting it Together
Nowweknowhowtocalculatehowmany:
n!
k!(nk)!
Andtheprobabilityofeach:
pk(1p)(nk)
https://www.mathsisfun.com/data/binomialdistribution.html

8/13

10/3/2016

TheBinomialDistribution

Wecanmultiplythemtogether:

Probabilityofkoutofnways:

P(koutofn)=

n!
k!(nk)!

pk(1p)(nk)

TheGeneralBinomialProbabilityFormula
ImportantNotes:
Thetrialsareindependent,
Thereareonlytwopossibleoutcomesateachtrial,
Theprobabilityof"success"ateachtrialisconstant.

Quincunx

Haveaplaywiththe Quincunx (thenread QuincunxExplained )tosee


theBinomialDistributioninaction.

Throw the Die


Afairdieisthrownfourtimes.Calculatetheprobabilitiesofgetting:
0Twos
1Two
2Twos
3Twos
4Twos
Inthiscasen=4,p=P(Two)=1/6
XistheRandomVariableNumberofTwosfromfourthrows.
https://www.mathsisfun.com/data/binomialdistribution.html

9/13

10/3/2016

TheBinomialDistribution

Substitutex=0to4intotheformula:

P(koutofn)=

n!
k!(nk)!

pk(1p)(nk)

Likethis(to4decimalplaces):
P(X=0)=(4!/0!4!)(1/6)0(5/6)4=11(5/6)4=0.4823
P(X=1)=(4!/1!3!)(1/6)1(5/6)3=4(1/6)(5/6)3=0.3858
P(X=2)=(4!/2!2!)(1/6)2(5/6)2=6(1/6)2(5/6)2=0.1157
P(X=3)=(4!/3!1!)(1/6)3(5/6)1=4(1/6)3(5/6)=0.0154
P(X=4)=(4!/4!0!)(1/6)4(5/6)0=1(1/6)41=0.0008
Summary:"forthe4throws,thereisa48%chanceofnotwos,39%chanceof1two,12%
chanceof2twos,1.5%chanceof3twos,andatiny0.08%chanceofallthrowsbeingatwo
(butitstillcouldhappen!)"
Thistimethe BarGraph isnotsymmetrical:

Itisnotsymmetrical!
Itis skewed becausepisnot0.5

Sports Bikes
Yourcompanymakessportsbikes.90%passfinalinspection(and10%
failandneedtobefixed).
Whatistheexpected Mean and Variance ofthe4nextinspections?
https://www.mathsisfun.com/data/binomialdistribution.html

10/13

10/3/2016

TheBinomialDistribution

First,let'scalculateallprobabilities.
n=4,
p=P(Pass)=0.9
XistheRandomVariable"Numberofpassesfromfourinspections".
Substitutex=0to4intotheformula:

P(koutofn)=

n!
k!(nk)!

pk(1p)(nk)

Likethis:
P(X=0)=(4!/0!4!)0.9 00.1 4=110.0001=0.0001
P(X=1)=(4!/1!3!)0.9 10.1 3=40.90.001=0.0036
P(X=2)=(4!/2!2!)0.9 20.1 2=60.810.01=0.0486
P(X=3)=(4!/3!1!)0.9 30.1 1=40.7290.1=0.2916
P(X=4)=(4!/4!0!)0.9 40.1 0=10.65611=0.6561
Summary:"forthe4nextbikes,thereisatiny0.01%chanceofnopasses,0.36%chanceof
1pass,5%chanceof2passes,29%chanceof3passes,andawhopping66%chancethey
allpasstheinspection."

Mean, Variance and Standard Deviation


Let'scalculatethe Mean , VarianceandStandardDeviation fortheSportsBikeinspections.
Thereare(relatively)simpleformulasforthem.Theyarealittlehardtoprove,buttheydo
work!
Themean,or"expectedvalue",is:

=np

Forthesportsbikes:

=40.9=3.6

https://www.mathsisfun.com/data/binomialdistribution.html

11/13

10/3/2016

TheBinomialDistribution

Sowewouldexpect3.6bikes(outof4)topasstheinspection.
Makessensereally...0.9chanceforeachbiketimes4bikesequals3.6

TheformulaforVarianceis:

Variance:2=np(1p)
AndStandardDeviationisthesquarerootofvariance:

=(np(1p))

Forthesportsbikes:

Variance:2=40.90.1=0.36
StandardDeviationis:

=(0.36)=0.6

Note:wecouldalsocalculatethemmanually,bymakingatablelikethis:
X P(X)

XP(X) X2P(X)

0 0.0001 0

1 0.0036 0.0036

0.0036

2 0.0486 0.0972

0.1944

3 0.2916 0.8748

2.6244

4 0.6561 2.6244

10.4976

13.32

SUM:

3.6

ThemeanistheSumof(XP(X)):

=3.6
ThevarianceistheSumof(X2P(X))minusMean2:

Variance:2=13.323.62=0.36
https://www.mathsisfun.com/data/binomialdistribution.html

12/13

10/3/2016

TheBinomialDistribution

StandardDeviationis:

=(0.36)=0.6
Andwegotthesameresultsasbefore(yay!)

Summary
TheGeneralBinomialProbabilityFormula

P(koutofn)=

n!
k!(nk)!

pk(1p)(nk)

MeanvalueofX:=np
VarianceofX:2=np(1p)
StandardDeviationofX:=(np(1p))

Question1Question2Question3Question4Question5
Question6Question7Question8Question9Question10
Question11Question12

Search::Index::About::Contact::Contribute::CiteThisPage::Privacy
Copyright2015MathsIsFun.com

https://www.mathsisfun.com/data/binomialdistribution.html

13/13

You might also like