The Binomial distributionExamples and DefinitionBinomial Model (an “experiment”)1A series of n independent trials is conducted.2Each trial results in a binary outcome (one is labeled“success’ the other “failure”).3The probability of success is equal to p for each trial,regardless of the outcomes of the other trials.Binomial Random VariableThe number of “successes” in the binomial experiment.Let Y = # of success in the above model.Then Y is a binomial random variable with parameters n(sample size) and p (success probability). It is oftendenotedY ∼ B(n, p).Example: Tossing a fair coinToss a fair coin three times, P(H) = .5.Interest is counting the number of heads.Y = # of heads“success” = heads; “failure” = tailsn =p =Y ∼Example: Tossing a fair coinToss a fair coin three times, P(H) = .5.Interest is counting the number of heads.Y = # of heads“success” = heads; “failure” = tailsn = 3p =Y ∼Example: Tossing a fair coinToss a fair coin three times, P(H) = .5.Interest is counting the number of heads.Y = # of heads“success” = heads; “failure” = tailsn = 3p = .5Y ∼Example: Tossing a fair coinToss a fair coin three times, P(H) = .5.Interest is counting the number of heads.Y = # of heads“success” = heads; “failure” = tailsn = 3p = .5Y ∼ B(3, .5)Example: Tossing an unfair coinToss a biased coin 5 times, P(H) = .7.Interest is counting the number of heads.Y = # of heads“success” = heads; “failure” = tailsn = 5p = .7Y ∼ B(5, .7)Example: Counting MutationsExperiment to mutate a gene in bacteria; the probability ofcausing a mutation is .4. The experiment was repeated 10times, with 10 independent colonies.Interest is counting the number of mutations.Y = # of mutations.“success” = mutation; “failure” = no mutationn = 10p = .4Y ∼ B(10, .4)Computing Probabilities for a Binomial Random Variable.Board ExampleTossing a biased coin; Y ∼ B(3, .7).Tossing a fair CoinConsider tossing a fair coin 3 times .Y = # of heads in the 3 tosses; Y ∼ B(3, .5)Consider the Possible outcomes:TTTHTTTHTTTHHHTHTHTHHHHHIP{Y = 0} =12.12.12=18IP{Y = 1} = 312.12.12=38IP{Y = 2} = 312.12.12)=38IP{Y = 3} =12.12.12=18Tossing a Biased CoinConsider tossing a biased coin 3 times; IP{H} = .7Y = # of heads in the 3 tosses; Y ∼ B(3, .7)Consider the Possible outcomes:TTTHTTTHTTTHHHTHTHTHHHHHIP{Y = 0} = 1(.3 × .3 ×.3) = 1(.70)(.33) = .027IP{Y = 1} =IP{Y = 2} =IP{Y = 3} =Tossing a Biased CoinConsider tossing a biased coin 3 times; IP{H} = .7Y = # of heads in the 3 tosses; Y ∼ B(3, .7)Consider the Possible outcomes:TTTHTTTHTTTHHHTHTHTHHHHHIP{Y = 0} = 1(.3 × .3 × .3) = 1(.70)(.33) = .027IP{Y = 1} = 3(.7 × .3 × .3) = 3(.71)(.32) = .189IP{Y = 2} =IP{Y = 3} =Tossing a Biased CoinConsider tossing a biased coin 3 times; IP{H} = .7Y = # of heads in the 3 tosses; Y ∼ B(3, .7)Consider the Possible outcomes:TTTHTTTHTTTHHHTHTHTHHHHHIP{Y = 0} = 1(.3 × .3 × .3) = 1(.70)(.33) = .027IP{Y = 1} = 3(.7 × .3 × .3) = 3(.71)(.32) = .189IP{Y = 2} = 3(.7 × .7 × .3) = 3(.72)(.31) = .441IP{Y = 3} =Tossing a Biased CoinConsider tossing a biased coin 3 times; IP{H} = .7Y = # of heads in the 3 tosses; Y ∼ B(3, .7)Consider the Possible outcomes:TTTHTTTHTTTHHHTHTHTHHHHHIP{Y = 0} = 1(.3 × .3 × .3) = 1(.70)(.33) = .027IP{Y = 1} = 3(.7 × .3 × .3) = 3(.71)(.32) = .189IP{Y = 2} = 3(.7 × .7 × .3) = 3(.72)(.31) = .441IP{Y = 3} = 1(.7 × .7 × .7) = 1(.73)(.30) = .343QuestionIs there a general formula for computing Binomialprobabilities?We do not want to have to list all possibilities when n = 10,or n = 100.Background: FactorialsFactorial. Multiply all numbers from 1 to n (n is a positiveinteger)n! = n(n − 1)(n − 2)...(2)(1)Example. n = 4.n! = (4)(3)(2)(1) = 24.Note. 0! = 1.Background: Binomial CoefficientsnCjnCj=n!j!(n −j)!nCjcounts all of the ways that j successes can appear in ntotal trials.Example n = 5, j = 3.5!3!2!=(5)(4)2= 10.cf. Table 2 p.674 for thenCjnumbers.ChalkboardY ∼ B(n, p)Can we “guess” the answer:IP{Y = j} =?Binomial Distribution FormulaIP{Y = j} =nCjpj(1 − p)n−jY ∼ B(n, p) (a binomial random variable based on n trialsand success probability p)The probability of getting j successes is given by(j = 0, 1, ..., n)IP{Y = j} =nCjpj(1 − p)n−j=n!j!(n −j)!pj(1 − p)n−jExampleIP{Y = j} =n!j!(n −j)!pj(1 − p)n−jQuestion:You toss a fair coin 3 times, what is the probability of getting 2heads.Answer:p = .5 (fair coin), n = 3 tosses, j = 2 Heads. We getIP{Y = 2} =3!2! 1!(.5)2(.5)1=3.2.12.1 1(.5)3= 3/8ExampleIP{Y = j} =n!j!(n −j)!pj(1 − p)n−jQuestion:Y ∼ B(7, .6). Compute IP{Y = 2}.Answer:p = .6, n = 7 tosses, j = 2 Heads. We getIP{Y = 2} =7!2! 5!(.6)2(.4)5=7.6 5!1.2 5!(.6)2(.4)5= 21(.6)2(.4)5= .0774ExampleA new drug is available. Its success rate is 1/6: probability thata patient is improved. I try it independently on 6 patients.Probability that at least one patient improves?p = 1/6, n = 6, j = 1, 2, 3, 4, 5 or 6.IP{at least one improves} = IP{Y = 1 or Y = 2 or. . . or Y = 6}= IP{Y = 1} + IP{Y = 2} + ··· + IP{Y = 6}= 1 − IP{Y = 0}= 1 −6!0!6!(1/6)0(5/6)6= 1 − (5/6)6= .665Probability DistributionIP{Y = j} =n!j!(n −j)!pj(1 − p)n−jY ∼ B(6, 1/6); n = 6, p = 1/6.We can compute IP{Y = j}, for j = 0, 1, 2, 3, 4, 5, 6.y 0 1 2 3 4 5 6IP{Y = y} 0.335 0.402 0.200 0.054 0.008 0.0006 0.00002Mean, Variance, and Standard Deviation for BinomialRandom VariablesRecall the Formula for Mean,Variance for a GeneralDiscrete Random VariableE(Y) =XyiIP{Y = yi},Var(Y) =X(yi− µY)2IP{Y = yi},where the yi’s are the values that the variable takes on and thesum is taken over all possible values.What if Y ∼ Bin(100, .5)Do I have to sum over 101 different values?!?Mean, Variance, and Standard deviationIf Y ∼ B(n, p) thenµ = IEY = np,σ2= np(1 − p),andσ =pnp(1 − p)ExampleCoin tossing: Y ∼ B(100, .5). Compute the mean, variance,and standard deviation.µY= np = 50σ2Y= np(1 − p) = 100(.5)(.5) = 25σY=√25 = 5.The assumptions for the binomial modelUnderlying assumptionsA binomial random variable satisfies the following fourconditions, abbreviated BInS.1Binary outcomes. There are two possible outcomes foreach trial (success and failure).2Independent trials. The outcomes of the trials areindependent of each other.3n is fixed. The number of trials n is fixed in advance.4Same value of p. The probability of a success on a singletrial is the same for all trials.NoteThe binomial model with n trials is said to be made up of
View Full Document