Skip to content

The binomial distribution

The binomial distribution models the number of successes in a fixed number of repeated trials. It is appropriate only when each trial has two possible outcomes, trials are independent, and the probability of success stays constant.

If XX counts successes in nn trials and each trial has success probability pp, write

XB(n,p).\boxed{X\sim \operatorname{B}(n,p)}.

Then, for x=0,1,2,,nx=0,1,2,\ldots,n,

P(X=x)=(nx)px(1p)nx.\boxed{\operatorname{P}(X=x)=\binom{n}{x}p^x(1-p)^{n-x}}.

This lesson develops the model, the formula, cumulative probabilities, calculator methods, and the distribution’s mean and variance.

You should be able to:

Check all four conditions before writing XB(n,p)X\sim\operatorname{B}(n,p).

ConditionWhat it means
Fixed number of trialsnn is decided in advance
Two outcomes per trialEach trial is classified as success or failure
Independent trialsOne result does not change the probabilities on another trial
Constant success probabilityThe same value of pp applies on every trial

The word success is only a label for the outcome being counted. A defective component, a missed penalty, or a patient experiencing a side effect may all be called a success in a binomial model.

Example 1: deciding whether the model applies

Section titled “Example 1: deciding whether the model applies”

For each situation, decide whether a binomial model is reasonable.

  1. A fair coin is tossed 2020 times and XX counts heads.
  2. Five cards are drawn from an ordinary pack without replacement and YY counts aces.
  3. A machine produces components independently, with probability 0.030.03 that any component is defective. Of the next 5050 components, DD counts defects.
  4. A die is rolled until the first six appears, and TT counts the number of rolls.

Situation 1: yes. There are 2020 fixed, independent trials, each with outcomes head or not head and constant probability 1/21/2. Thus

XB(20,12).X\sim\operatorname{B}\left(20,\frac12\right).

Situation 2: not exactly. Without replacement, the probability of an ace changes after each draw and the trials are dependent.

Situation 3: yes, under the stated independence and constant defect rate:

DB(50,0.03).D\sim\operatorname{B}(50,0.03).

Situation 4: no. The number of trials is not fixed. The experiment stops at a random time.

A bag contains 88 red and 1212 blue counters. A counter is selected, its colour is recorded, and it is replaced. This is repeated 1515 times. Let RR count red selections. State a suitable distribution for RR.

Answer

Replacement keeps the red probability constant and makes the trials independent. Since

p=820=0.4,p=\frac{8}{20}=0.4,

the model is

RB(15,0.4).\boxed{R\sim\operatorname{B}(15,0.4)}.

Suppose XB(n,p)X\sim\operatorname{B}(n,p) and let

q=1pq=1-p

be the failure probability.

One particular sequence containing xx successes and nxn-x failures has probability

pxqnx,p^xq^{n-x},

because the trials are independent. There are

(nx)\binom{n}{x}

different positions in which the xx successes can occur. These sequences are mutually exclusive, so their probabilities add:

P(X=x)=(nx)pxqnx.\operatorname{P}(X=x)=\binom{n}{x}p^xq^{n-x}.

The three factors have distinct jobs:

(nx)arrangementspxsuccesses(1p)nxfailures.\underbrace{\binom{n}{x}}_{\text{arrangements}} \underbrace{p^x}_{\text{successes}} \underbrace{(1-p)^{n-x}}_{\text{failures}}.

A basketball player scores a free throw with probability 0.80.8. Assume successive attempts are independent. She takes 1010 free throws. Find the probability that she scores exactly 77.

Let XX be the number scored. Then

XB(10,0.8).X\sim\operatorname{B}(10,0.8).

Use x=7x=7:

P(X=7)=(107)(0.8)7(0.2)3=120(0.8)7(0.2)3=0.201326592.\begin{aligned} \operatorname{P}(X=7) &=\binom{10}{7}(0.8)^7(0.2)^3\\ &=120(0.8)^7(0.2)^3\\ &=0.201326592. \end{aligned}

Therefore

P(X=7)0.201.\boxed{\operatorname{P}(X=7)\approx0.201}.

The power of 0.20.2 is 33, not 77, because exactly three of the ten attempts must be failures.

Worked example 3: success is defined by the question

Section titled “Worked example 3: success is defined by the question”

A biased die has probability 0.30.3 of showing a six. It is rolled 1212 times independently. Find the probability of exactly two results that are not sixes.

Define success as obtaining a result that is not a six. Its probability is

p=10.3=0.7.p=1-0.3=0.7.

If YY counts results that are not sixes, then YB(12,0.7)Y\sim\operatorname{B}(12,0.7) and

P(Y=2)=(122)(0.7)2(0.3)100.000190.\begin{aligned} \operatorname{P}(Y=2) &=\binom{12}{2}(0.7)^2(0.3)^{10}\\ &\approx\boxed{0.000190}. \end{aligned}

This very small answer is sensible: when a non-six has probability 0.70.7, only two non-sixes in twelve rolls is unusual.

For XB(8,0.25)X\sim\operatorname{B}(8,0.25), calculate P(X=3)\operatorname{P}(X=3).

Answer P(X=3)=(83)(0.25)3(0.75)5=170181920.2076.\begin{aligned} \operatorname{P}(X=3) &=\binom83(0.25)^3(0.75)^5\\ &=\frac{1701}{8192}\\ &\approx\boxed{0.2076}. \end{aligned}

Because a binomial random variable is integer valued, boundary words must be translated carefully.

WordsProbability statement
exactly rrP(X=r)\operatorname{P}(X=r)
at most rrP(Xr)\operatorname{P}(X\leq r)
fewer than rrP(X<r)=P(Xr1)\operatorname{P}(X<r)=\operatorname{P}(X\leq r-1)
at least rrP(Xr)\operatorname{P}(X\geq r)
more than rrP(X>r)=P(Xr+1)\operatorname{P}(X>r)=\operatorname{P}(X\geq r+1)
between aa and bb inclusiveP(aXb)\operatorname{P}(a\leq X\leq b)

Two facts are especially useful:

P(Xr)=1P(Xr1),\operatorname{P}(X\geq r)=1-\operatorname{P}(X\leq r-1),

and

P(aXb)=P(Xb)P(Xa1).\operatorname{P}(a\leq X\leq b) =\operatorname{P}(X\leq b)-\operatorname{P}(X\leq a-1).

Notice the r1r-1 and a1a-1. These are common sources of lost marks.

For XB(n,p)X\sim\operatorname{B}(n,p),

P(Xr)=x=0r(nx)px(1p)nx.\operatorname{P}(X\leq r) =\sum_{x=0}^{r}\binom nxp^x(1-p)^{n-x}.

For a short sum, calculate the terms directly. For a large sum, use the calculator’s binomial cumulative distribution function. Calculator menus differ, but they usually distinguish:

  • binomial PDF or binomial probability, which returns P(X=x)\operatorname{P}(X=x);
  • binomial CDF or binomial cumulative probability, which returns P(Xx)\operatorname{P}(X\leq x).

Always write the probability statement before using the calculator. It makes the required boundary explicit.

The probability that a seed germinates is 0.850.85. Assume seeds germinate independently. Twelve seeds are planted. Find the probability that at most nine germinate.

Let XX count germinating seeds. Then

XB(12,0.85).X\sim\operatorname{B}(12,0.85).

“At most nine” means X9X\leq9, so

P(X9)=x=09(12x)(0.85)x(0.15)12x0.2642.\begin{aligned} \operatorname{P}(X\leq9) &=\sum_{x=0}^{9}\binom{12}{x}(0.85)^x(0.15)^{12-x}\\ &\approx\boxed{0.2642}. \end{aligned}

A calculator CDF call with n=12n=12, p=0.85p=0.85 and upper value 99 gives the same result.

For the same seed model, find the probability that at least ten germinate.

“At least ten” means X10X\geq10. Its complement is X9X\leq9, not X10X\leq10. Hence

P(X10)=1P(X9)=10.2641810.7358.\begin{aligned} \operatorname{P}(X\geq10) &=1-\operatorname{P}(X\leq9)\\ &=1-0.264181\ldots\\ &\approx\boxed{0.7358}. \end{aligned}

The events X9X\leq9 and X10X\geq10 cover every possible value without overlap.

Let YB(20,0.3)Y\sim\operatorname{B}(20,0.3). Find

P(4<Y8).\operatorname{P}(4<Y\leq8).

Since YY is integer valued, the required values are 5,6,7,85,6,7,8. Use two cumulative probabilities:

P(4<Y8)=P(Y8)P(Y4)0.88670.23750.6492.\begin{aligned} \operatorname{P}(4<Y\leq8) &=\operatorname{P}(Y\leq8)-\operatorname{P}(Y\leq4)\\ &\approx0.8867-0.2375\\ &\approx\boxed{0.6492}. \end{aligned}

Do not subtract P(Y5)\operatorname{P}(Y\leq5), because that would remove the allowed value Y=5Y=5.

Let XB(15,0.4)X\sim\operatorname{B}(15,0.4). Write each event in a form suitable for a calculator CDF.

  1. P(X<6)\operatorname{P}(X<6)
  2. P(X>6)\operatorname{P}(X>6)
  3. P(3X7)\operatorname{P}(3\leq X\leq7)
Answer P(X<6)=P(X5),P(X>6)=1P(X6),P(3X7)=P(X7)P(X2).\begin{aligned} \operatorname{P}(X<6)&=\operatorname{P}(X\leq5),\\ \operatorname{P}(X>6)&=1-\operatorname{P}(X\leq6),\\ \operatorname{P}(3\leq X\leq7)&=\operatorname{P}(X\leq7)-\operatorname{P}(X\leq2). \end{aligned}

Numerically, these are approximately 0.40320.4032, 0.39020.3902, and 0.75980.7598 respectively.

Questions involving “at least one” are usually shortest by complement:

P(X1)=1P(X=0)=1(1p)n.\boxed{\operatorname{P}(X\geq1)=1-\operatorname{P}(X=0)=1-(1-p)^n}.

A server request fails with probability 0.020.02, independently of other requests. Find the probability that at least one of the next 4040 requests fails.

Let XX count failures, so XB(40,0.02)X\sim\operatorname{B}(40,0.02). Then

P(X1)=1P(X=0)=1(400)(0.02)0(0.98)40=1(0.98)400.5543.\begin{aligned} \operatorname{P}(X\geq1) &=1-\operatorname{P}(X=0)\\ &=1-\binom{40}{0}(0.02)^0(0.98)^{40}\\ &=1-(0.98)^{40}\\ &\approx\boxed{0.5543}. \end{aligned}

Although each request has only a 2%2\% failure probability, repeated exposure makes at least one failure more likely than not.

Worked example 8: finding the number of trials

Section titled “Worked example 8: finding the number of trials”

A component has probability 0.10.1 of failing during a test. Independent components are tested. Find the smallest number nn that must be tested for the probability of at least one failure to exceed 0.950.95.

We need

1(0.9)n>0.95.1-(0.9)^n>0.95.

Rearrange:

(0.9)n<0.05.(0.9)^n<0.05.

Taking logarithms gives

nlog(0.9)<log(0.05).n\log(0.9)<\log(0.05).

Since log(0.9)<0\log(0.9)<0, dividing reverses the inequality:

n>log(0.05)log(0.9)28.43.n>\frac{\log(0.05)}{\log(0.9)}\approx28.43.

As nn is an integer, the smallest possible value is

n=29.\boxed{n=29}.

Check the boundary:

10.9280.9477<0.95,10.9290.9529>0.95.1-0.9^{28}\approx0.9477<0.95, \qquad 1-0.9^{29}\approx0.9529>0.95.

If XB(n,p)X\sim\operatorname{B}(n,p), then

E(X)=np,\boxed{\operatorname{E}(X)=np}, Var(X)=np(1p),\boxed{\operatorname{Var}(X)=np(1-p)},

and therefore

SD(X)=np(1p).\boxed{\operatorname{SD}(X)=\sqrt{np(1-p)}}.

The expectation npnp has a direct interpretation. Across nn trials, each contributes an average of pp successes, so the expected total is npnp.

Expectation need not be a possible observed value. If XB(5,0.3)X\sim\operatorname{B}(5,0.3), then E(X)=1.5\operatorname{E}(X)=1.5, although XX can only be an integer. The mean describes the long run average over many repetitions of the whole five-trial experiment.

Let IiI_i equal 11 when trial ii succeeds and 00 when it fails. Then

X=I1+I2++In.X=I_1+I_2+\cdots+I_n.

Each indicator has

E(Ii)=p\operatorname{E}(I_i)=p

and

Var(Ii)=p(1p).\operatorname{Var}(I_i)=p(1-p).

Expectations add, so E(X)=np\operatorname{E}(X)=np. Because the trials are independent, their variances also add, giving Var(X)=np(1p)\operatorname{Var}(X)=np(1-p).

Worked example 9: interpreting the moments

Section titled “Worked example 9: interpreting the moments”

A call centre resolves each enquiry at first contact with probability 0.720.72. Assume independence. Let XX be the number resolved at first contact among 5050 enquiries.

Then

XB(50,0.72).X\sim\operatorname{B}(50,0.72).

The mean is

E(X)=50(0.72)=36.\operatorname{E}(X)=50(0.72)=\boxed{36}.

The variance is

Var(X)=50(0.72)(0.28)=10.08,\operatorname{Var}(X)=50(0.72)(0.28)=\boxed{10.08},

so the standard deviation is

SD(X)=10.083.17.\operatorname{SD}(X)=\sqrt{10.08}\approx\boxed{3.17}.

Over many groups of 5050 enquiries, the average number resolved at first contact would approach 3636. This does not claim that every group contains exactly 3636.

Worked example 10: recovering the parameters

Section titled “Worked example 10: recovering the parameters”

A binomial random variable XX has mean 1212 and variance 33. Find nn and pp.

Using the formulas,

np=12(1)np=12 \tag{1}

and

np(1p)=3.(2)np(1-p)=3. \tag{2}

Divide (2) by (1):

1p=312=14.1-p=\frac{3}{12}=\frac14.

Thus

p=34.p=\frac34.

Substitute into (1):

n(34)=12,n\left(\frac34\right)=12,

so

n=16,p=34.\boxed{n=16,\qquad p=\frac34}.

The answer passes essential checks: nn is a positive integer and 0p10\leq p\leq1.

Let YB(80,0.15)Y\sim\operatorname{B}(80,0.15). Find its mean, variance and standard deviation.

Answer E(Y)=80(0.15)=12,\operatorname{E}(Y)=80(0.15)=\boxed{12}, Var(Y)=80(0.15)(0.85)=10.2,\operatorname{Var}(Y)=80(0.15)(0.85)=\boxed{10.2},

and

SD(Y)=10.23.19.\operatorname{SD}(Y)=\sqrt{10.2}\approx\boxed{3.19}.

The values of nn and pp determine the distribution’s location and spread.

  • Increasing nn with pp fixed increases both the mean npnp and variance np(1p)np(1-p).
  • Replacing pp by 1p1-p reflects the distribution: if XB(n,p)X\sim\operatorname{B}(n,p), then nXB(n,1p)n-X\sim\operatorname{B}(n,1-p).
  • When p=0.5p=0.5, the distribution is symmetric about n/2n/2.
  • When p<0.5p<0.5, probability tends to be concentrated near smaller values of XX.
  • When p>0.5p>0.5, probability tends to be concentrated near larger values of XX.

For fixed nn, the variance np(1p)np(1-p) is largest when p=0.5p=0.5. Outcomes are most variable when success and failure are equally likely. If pp is close to 00 or 11, results are more predictable.

A calculation may be correct while its model is weak. Examine the assumptions behind nn, independence and constant pp.

A footballer scores 75%75\% of penalties historically. A coach models the number scored from the next 1010 penalties as XB(10,0.75)X\sim\operatorname{B}(10,0.75).

Possible limitations include:

  • the goalkeeper, venue and pressure may change the scoring probability;
  • fatigue, confidence or learning may make successive penalties dependent;
  • the historical rate may not represent the player’s current ability.

The model may still be useful, but its conclusions are conditional on treating the attempts as independent with constant probability 0.750.75.

Confusing pp with the more pleasant outcome

Section titled “Confusing ppp with the more pleasant outcome”

pp is the probability of whichever outcome XX counts. Define XX in words before substituting numbers.

px(1p)nxp^x(1-p)^{n-x} is the probability of one specific ordering. Multiply by (nx)\binom nx to include every ordering with xx successes.

P(Xr)=1P(Xr1),\operatorname{P}(X\geq r)=1-\operatorname{P}(X\leq r-1),

not 1P(Xr)1-\operatorname{P}(X\leq r).

Two outcomes alone are not enough. Trials must also be independent, pp must remain constant, and nn must be fixed.

The variance is np(1p)np(1-p). The standard deviation is its square root. Standard deviation has the same units as XX.

Keep full calculator values during intermediate steps. Round only the final answer, usually to the accuracy requested.

A factory states that 6%6\% of its batteries fail an initial test. Assume battery results are independent. A random sample of 2525 batteries is tested, and XX is the number that fail.

  1. State the distribution of XX.
  2. Find P(X=2)\operatorname{P}(X=2).
  3. Find P(X3)\operatorname{P}(X\geq3).
  4. Find the expected number of failures and the standard deviation.
  5. Give one reason why the model might not fit actual production.

1. Distribution

XB(25,0.06).\boxed{X\sim\operatorname{B}(25,0.06)}.

2. Exactly two failures

P(X=2)=(252)(0.06)2(0.94)230.2602.\begin{aligned} \operatorname{P}(X=2) &=\binom{25}{2}(0.06)^2(0.94)^{23}\\ &\approx\boxed{0.2602}. \end{aligned}

3. At least three failures

Use the complement X2X\leq2:

P(X3)=1P(X2)0.1871.\begin{aligned} \operatorname{P}(X\geq3) &=1-\operatorname{P}(X\leq2)\\ &\approx\boxed{0.1871}. \end{aligned}

4. Mean and standard deviation

E(X)=25(0.06)=1.5,\operatorname{E}(X)=25(0.06)=\boxed{1.5}, SD(X)=25(0.06)(0.94)1.19.\operatorname{SD}(X)=\sqrt{25(0.06)(0.94)}\approx\boxed{1.19}.

5. Limitation

Batteries made in the same batch may share a fault, so their outcomes may not be independent. Alternatively, the failure probability may change when machinery or materials change.

  1. State all conditions required for a binomial model.
  2. If XB(18,0.2)X\sim\operatorname{B}(18,0.2), find P(X=4)\operatorname{P}(X=4).
  3. For the same distribution, express P(X4)\operatorname{P}(X\geq4) using one lower-tail cumulative probability.
  4. If YB(n,0.4)Y\sim\operatorname{B}(n,0.4) and E(Y)=8\operatorname{E}(Y)=8, find nn and Var(Y)\operatorname{Var}(Y).
  5. A trial succeeds with probability 0.350.35. Find the probability of at least one success in six independent trials.
Answers
  1. A fixed number of trials; two outcomes on each trial; independent trials; constant probability of success.

P(X=4)=(184)(0.2)4(0.8)140.2153.\operatorname{P}(X=4)=\binom{18}{4}(0.2)^4(0.8)^{14}\approx\boxed{0.2153}.
P(X4)=1P(X3).\boxed{\operatorname{P}(X\geq4)=1-\operatorname{P}(X\leq3)}.
  1. From 0.4n=80.4n=8, n=20\boxed{n=20}. Then
Var(Y)=20(0.4)(0.6)=4.8.\operatorname{Var}(Y)=20(0.4)(0.6)=\boxed{4.8}.
P(X1)=1(0.65)60.9246.\operatorname{P}(X\geq1)=1-(0.65)^6\approx\boxed{0.9246}.