Skip to content

Mathematics · Ch 15 — Binomial Distribution

Binomial distribution

15.2

Binomial distribution

Binomial Distribution

Take an experiment made of several Bernoulli trials - say, tossing a coin repeatedly, with SS = success (heads) and FF = failure (tails) in each trial. Suppose the coin is tossed 6 times and we want exactly one success among the 6 trials. Listing every arrangement with exactly one SS and five FF's gives exactly 6 distinct outcomes: SFFFFF,FSFFFF,FFSFFF,FFFSFF,FFFFSF,FFFFFSSFFFFF, FSFFFF, FFSFFF, FFFSFF, FFFFSF, FFFFFS - one for each position the single SS could occupy. Similarly, the number of arrangements with exactly two successes and four failures among 6 trials is 6!4!×2!=15\dfrac{6!}{4!\times2!}=15. As the number of trials nn grows, listing out every arrangement like this becomes impractical, so a general formula is needed instead.

Deriving the distribution for n=3n=3 trials. Consider three Bernoulli trials with probability pp of success and q=1−pq=1-p of failure in each. The sample space is S={SSS,SSF,SFS,FSS,SFF,FSF,FFS,FFF}S=\{SSS, SSF, SFS, FSS, SFF, FSF, FFS, FFF\}, and the number of successes, XX, can take the values 0,1,2,30,1,2,3. Because the trials are independent, the probability of any particular outcome is the product of the individual trial probabilities:

  • P(X=0)=P(FFF)=q⋅q⋅q=q3P(X=0)=P(FFF)=q\cdot q\cdot q=q^3.
  • P(X=1)=P(SFF)+P(FSF)+P(FFS)=pq⋅q+q⋅pq+q⋅qp=3pq2P(X=1)=P(SFF)+P(FSF)+P(FFS)=pq\cdot q+q\cdot pq+q\cdot qp=3pq^2 (there are 3 arrangements with exactly one SS, each with probability pq2pq^2).
  • P(X=2)=P(SSF)+P(SFS)+P(FSS)=p⋅pq+p⋅qp+q⋅pp=3p2qP(X=2)=P(SSF)+P(SFS)+P(FSS)=p\cdot pq+p\cdot qp+q\cdot pp=3p^2q (3 arrangements with exactly two SS's, each with probability p2qp^2q).
  • P(X=3)=P(SSS)=p3P(X=3)=P(SSS)=p^3.

These four probabilities, q3, 3pq2, 3p2q, p3q^3,\,3pq^2,\,3p^2q,\,p^3, are exactly the four terms of the binomial expansion (q+p)3=q3+3q2p+3qp2+p3(q+p)^3=q^3+3q^2p+3qp^2+p^3, in order: the probability of xx successes is the (x+1)(x+1)-th term of (q+p)3(q+p)^3. Since q+p=1q+p=1, the four probabilities automatically add up to 1, as any valid probability distribution must.

The general case. For nn Bernoulli trials, the same reasoning generalises: the probability of 0,1,2,…,n0,1,2,\ldots,n successes turns out to be the 11st, 22nd, 33rd, ..., (n+1)(n+1)-th term of the expansion of (q+p)n(q+p)^n. To see why, note that xx successes together with (n−x)(n-x) failures, in some order, is exactly what "xx successes in nn trials" means. The number of ways to choose which xx of the nn trial-slots are successes is n!x! (n−x)!=nCx\dfrac{n!}{x!\,(n-x)!}={}^{n}C_{x}. In every one of those arrangements, independence again means the probability is the product of xx factors of pp (one per success) and (n−x)(n-x) factors of qq (one per failure), i.e. pxqn−xp^x q^{n-x}, regardless of which particular arrangement it is. Multiplying the count of arrangements by the probability of each arrangement gives

P(x successes out of n trials)=n!x! (n−x)! pxqn−x=nCx pxqn−x,P(x\text{ successes out of }n\text{ trials}) = \frac{n!}{x!\,(n-x)!}\,p^x q^{n-x} = {}^{n}C_{x}\,p^x q^{n-x},

which is precisely the (x+1)(x+1)-th term of (q+p)n(q+p)^n.

Written out for every value of xx, the probability distribution of the number of successes XX in nn Bernoulli trials is:

XX001122…\ldotsxx…\ldotsnn
P(X)P(X)nC0 p0qn{}^{n}C_0\,p^0q^nnC1 p1qn−1{}^{n}C_1\,p^1q^{n-1}nC2 p2qn−2{}^{n}C_2\,p^2q^{n-2}…\ldotsnCx pxqn−x{}^{n}C_x\,p^xq^{n-x}…\ldotsnCn pnq0{}^{n}C_n\,p^nq^0

This distribution is called the binomial distribution with parameters nn and pp, because once nn and pp are fixed, the entire distribution is determined. It is written X∼B(n,p)X\sim B(n,p), read "XX follows a binomial distribution with parameters n,pn,p". The probability of exactly xx successes, P(X=x)P(X=x), is also written P(x)P(x) and is given by the probability function (probability mass function, p.m.f.) of the binomial distribution:

P(x)=nCx qn−x px,x=0,1,…,n,(q=1−p).P(x) = {}^{n}C_x\, q^{n-x}\,p^x,\qquad x=0,1,\ldots,n,\qquad (q=1-p).

A binomial distribution with nn Bernoulli trials and success probability pp in each trial is denoted B(n,p)B(n,p) or X∼B(n,p)X\sim B(n,p).

Two conditions to keep in mind: (i) the number of trials should be fixed; (ii) the trials should be independent.

Worked examples.

Ex.1 - A fair coin is tossed 10 times, so X∼B(10,12)X\sim B(10,\tfrac12) with n=10n=10, p=q=12p=q=\tfrac12, and P(X=x)=10Cx(12)x(12)10−xP(X=x)={}^{10}C_x(\tfrac12)^x(\tfrac12)^{10-x}.

(i) Exactly six heads: P(X=6)=10C6(12)10=2101024=105512P(X=6)={}^{10}C_6(\tfrac12)^{10}=\dfrac{210}{1024}=\dfrac{105}{512}. …

Misc Ex1Fair coin tossed 10 times - exactly six, at least six, at most six heads

Worked out. Applies X~B(10, 1/2) to find three related probabilities from the same 10-toss experiment: exactly six heads via a single p.m.f. term, at least six heads by summing the terms for six through ten, and at most six heads via the complement of more-than-six. Working through this worked example after reading the theory above helps consolidate the method before attempting the exercise questions that follow it in the textbook. …

Misc Ex2Ten eggs drawn with replacement from a 10%-defective lot - at least one defective

Worked out. Sets up X~B(10, 1/10) for eggs drawn with replacement (so the 10% defective rate is genuinely constant across draws) and finds the probability of at least one defective egg using the complement of zero defectives, 1 minus (9/10) to the tenth power. …