M5.7.3 Chapter 3

The binomial distribution

A spinner is red on one third of its face. Joseph spins it 3 times. What is the chance of exactly one red?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

  • Say when a binomial model fits a situation
  • Find P(X = 3) for a binomial distribution
  • Find the mean and variance of a binomial distribution

Many chance events are a count of successes in a number of tries. How many seeds out of ten grow? How many of the next 20 buses are on time? How many sixes come up in six throws? When the tries fit four conditions, the count has a standard distribution, the binomial distribution.

The four conditions. (1) There is a fixed number n of trials. (2) Each trial has two outcomes, called success and failure. (3) The chance of success is the same number p on every trial. (4) The trials are independent: one result does not change the chance of another. Then X, the number of successes, is written X ~ B(n, p). The chance of failure is q = 1 − p.

Take the spinner, with n = 3 and p = 1/3. Draw a tree for the three spins. R means red and N means not red. Every path has three branches, and its chance is found by multiplying along it.

Draw it first

Draw the tree for three spins of the spinner

  1. A tree of three spins. Each spin has two branches, R with chance 1/3 and N with chance 2/3. Step 1 draws the branches. Step 2 writes at each of the eight ends its outcome and its chance. The three ends with exactly two reds, RRN, RNR and NRR, are hatched and each is 2/27.R1/3R1/3R1/3N2/3N2/3R1/3N2/3N2/3R1/3R1/3N2/3N2/3R1/3N2/3

    1 Draw three stages. At each stage the branch R is marked 1/3 and the branch N is marked 2/3.

  2. A tree of three spins. Each spin has two branches, R with chance 1/3 and N with chance 2/3. Step 1 draws the branches. Step 2 writes at each of the eight ends its outcome and its chance. The three ends with exactly two reds, RRN, RNR and NRR, are hatched and each is 2/27.R1/3R1/3R1/3N2/3N2/3R1/3N2/3N2/3R1/3R1/3N2/3N2/3R1/3N2/3RRR: 1/27RRN: 2/27RNR: 2/27RNN: 4/27NRR: 2/27NRN: 4/27NNR: 4/27NNN: 8/27

    2 Write each end and multiply along its path. RRN is 1/3 × 1/3 × 2/3 = 2/27. The three paths with two reds all give 2/27.

Count the paths for each number of reds. There is 1 path with no red, 3 paths with one red, 3 paths with two reds and 1 path with three reds. The numbers of paths are the binomial coefficients 1, 3, 3, 1. Every path with the same number of reds has the same chance, because it has the same branches in another order.

A table with the heads reds, paths, each and total. The rows read 0, 1, 8/27 and 8/27; 1, 3, 4/27 and 12/27; 2, 3, 2/27 and 6/27; 3, 1, 1/27 and 1/27.redspathseachtotal018/278/27134/2712/27232/276/27311/271/27
The totals 8, 12, 6 and 1 add to 27, so the four chances add to 27/27 = 1.

This is the whole idea. For X ~ B(n, p), one path with r successes has chance p^r q^(n − r). The number of such paths is C(n, r), the number of ways to choose which r of the n trials are successes. On a calculator it is the key nCr. So P(X = r) = C(n, r) p^r q^(n − r).

Worked example

A spinner is red on 1/3 of its face. It is spun 3 times. Find the chance of exactly two reds.

  1. X is the number of reds, so X ~ B(3, 1/3), with q = 2/3.
  2. The number of paths with two reds is C(3, 2) = 3.
  3. Each path has chance (1/3)² × (2/3) = 2/27.
  4. So P(X = 2) = 3 × 2/27 = 6/27 = 2/9.

Answer: P(X = 2) = 2/9

With larger n, a tree is too big, but the formula still works. Here is a case with decimals. Use the calculator for the powers and write each part before you multiply.

Worked example

Amina plants 6 seeds. Each grows with probability 0.7, independently of the others. Find the probability that exactly 4 grow.

  1. The number that grow is X ~ B(6, 0.7), with q = 0.3.
  2. We want P(X = 4) = C(6, 4) × 0.7⁴ × 0.3². Here C(6, 4) = 15.
  3. The powers are 0.7⁴ = 0.2401 and 0.3² = 0.09.
  4. Multiply: 15 × 0.2401 × 0.09 = 0.324135.
  5. So P(X = 4) = 0.3241, to 4 decimal places.

Answer: P(X = 4) = 0.3241

A bar chart of X ~ B(6, 0.7). The bars stand on the numbers of successes 0 to 6, with the heading successes under them and the heading P(X = r) above the left axis. The bar for 4 is hatched and named P(X = 4). The bars rise to a peak at 4 and then fall.P(X = r)P(X = 4)00.10.20.30.40123456successes
The distribution of the seeds that grow. The hatched bar is 0.3241 high. The most likely number is 4, a little under the mean of 4.2.

Often a question asks for a range of values. Add the bars it names. P(X ≤ 2) is P(X = 0) + P(X = 1) + P(X = 2). All the probabilities add to 1, so a "more than" question is often quicker by the complement: P(X ≥ 3) = 1 − P(X ≤ 2).

Worked example

Ravi's bus is on time with probability 0.8, each day independently. Over 10 days, find the probability that it is on time on at least 9 days.

  1. X is the number of on-time days, so X ~ B(10, 0.8), with q = 0.2.
  2. At least 9 means X = 9 or X = 10.
  3. To 4 decimal places, P(X = 9) = C(10, 9) × 0.8⁹ × 0.2 = 0.2684.
  4. To 4 decimal places, P(X = 10) = 0.8¹⁰ = 0.1074.
  5. Add: 0.2684 + 0.1074 = 0.3758. So P(X ≥ 9) = 0.3758.

Answer: P(X ≥ 9) = 0.3758

A bar chart of X ~ B(10, 0.8). The bars stand on the numbers of successes 0 to 10, with the heading successes under them and the heading P(X = r) above the left axis. The two bars for 9 and 10 are hatched and named P(X ≥ 9). The tallest bar is at 8. The bars for 0 to 3 are too small to see.P(X = r)P(X ≥ 9)00.10.20.30.40246810successes
The hatched bars add to 0.3758. The tall bars are on the right, because success is likely each day.

The mean and variance have short forms. Count each trial as 1 for a success and 0 for a failure. One trial has mean p and variance p − p² = pq. X is the sum of n independent trials. Means add, and for independent trials variances add too. So E(X) = np and Var(X) = npq.

Worked example

Each of 40 trees bears fruit with probability 0.25, independently. Find the mean, the variance and the standard deviation of the number that bear fruit.

  1. X ~ B(40, 0.25), with q = 0.75.
  2. The mean is np = 40 × 0.25 = 10.
  3. The variance is npq = 40 × 0.25 × 0.75 = 7.5.
  4. The standard deviation is √7.5 = 2.74, to 3 significant figures.

Answer: The mean is 10, the variance is 7.5 and the standard deviation is 2.74.

See it three ways

With things

Throw a die 3 times. Call a six a success. List the 8 patterns of six and not six, such as 6, not 6, 6. Count how many have exactly one six.

As a picture

A table with the heads sixes, ways and chance. The rows read 0, 1 and 0.579; 1, 3 and 0.347; 2, 3 and 0.069; 3, 1 and 0.005.sixeswayschance010.579130.347230.069310.005

In words

The chance of r successes is the number of ways to place them, times the chance of one such way.

In symbols

P(X = r) = C(n, r) p^r q^(n − r), with mean np and variance npq.

Try it

Count the sixes in six throws

You need: a die, paper and a pencil.

  1. Throw the die 6 times. Count the sixes. That is one value of X.
  2. Repeat 20 times, so you have 20 values of X. Write how many times each value from 0 to 6 came up.
  3. Compare with the table. In 100 repeats, about 33 runs give no six, 40 give one six and 20 give two sixes.

What you will see: Your 20 runs will not match the table exactly, but the shape should be alike. Runs with 0, 1 or 2 sixes are by far the most common, and 4 or more sixes almost never happen.

If you cannot try it, this is what happens.
A table with the heads sixes and P(X = r). The rows read 0 and 0.335, 1 and 0.402, 2 and 0.201, 3 and 0.054, 4 and 0.008, 5 and 0.001, 6 and 0.000.sixesP(X = r)00.33510.40220.20130.05440.00850.00160.000

A wrong idea many people have

Drawing counters from a bag without putting them back is a binomial situation.

Why it feels right: Each draw gives one of two colours, such as red or blue, so it looks like a success or a failure each time.

The test that breaks it: A bag has 3 red and 2 blue counters. The first draw is red with chance 3/5. If the first counter is red and kept out, the second draw is red with chance 2/4, not 3/5.

What is true: The chance changes after each draw, so the trials are not independent and p is not the same. A binomial model needs independent trials with a constant p. Putting each counter back before the next draw restores both.

A wrong idea many people have

P(X = r) = p^r q^(n − r), with no number of ways in front.

Why it feels right: It looks like the product of the branches, and a product of chances is how a tree works.

The test that breaks it: For the spinner, take p = 1/3, n = 3 and drop the number of ways. The four chances would be 8/27, 4/27, 2/27 and 1/27, which add to 15/27, not 1.

What is true: p^r q^(n − r) is the chance of one path. There are C(n, r) paths with r successes, so multiply by C(n, r). Then the chances add to 1, as they must.

Key words

binomial distribution
the distribution of the number of successes in n independent trials, each with the same chance p of success. Written B(n, p).
trial
one try with two outcomes, success or failure.
independent
one result does not change the chance of another.

Back to your guess

The answer is C: The chance is 4/9, because the one red can come on any of the three spins.

The chance is 4/9. One red and two others has chance 1/3 × 2/3 × 2/3 = 4/27 in one fixed order. The red can come first, second or third, so there are 3 orders, and 3 × 4/27 = 12/27 = 4/9. Counting the orders is what the binomial distribution does for us.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. Which situation is a good fit for a binomial model?

    Tap your answer.
    1. Yes, that is right. There is a fixed number of trials, 12, each with two outcomes, the same chance of success and independence. All four conditions hold.

    2. Not this one. Each card dealt changes what is left, so the chance of a heart changes. The trials are not independent. Read this page again. Try another.

    3. Not this one. The number of trials is not fixed. A binomial model counts successes in a fixed number of trials. Read this page again. Try another.

    See the answer

    Twelve seeds are planted and each grows with probability 0.9, independently.

    There is a fixed number of trials, 12, each with two outcomes, the same chance of success and independence. All four conditions hold.

    • If you chose B: Each card dealt changes what is left, so the chance of a heart changes. The trials are not independent. Read this page again.
    • If you chose C: The number of trials is not fixed. A binomial model counts successes in a fixed number of trials. Read this page again.
  2. X ~ B(5, 0.4). What is P(X = 3)?

    Tap your answer.
    1. Not this one. You gave the chance of one path, 0.4³ × 0.6² = 0.02304. There are 10 paths with three successes, so multiply by C(5, 3) = 10. Read this page again. Try another.

    2. Not this one. You swapped the powers, using 0.6³ × 0.4². The success chance 0.4 goes with the 3 successes: 0.4³ × 0.6². Read this page again. Try another.

    3. Yes, that is right. P(X = 3) = C(5, 3) × 0.4³ × 0.6² = 10 × 0.064 × 0.36 = 0.2304.

    See the answer

    0.2304

    P(X = 3) = C(5, 3) × 0.4³ × 0.6² = 10 × 0.064 × 0.36 = 0.2304.

    • If you chose A: You gave the chance of one path, 0.4³ × 0.6² = 0.02304. There are 10 paths with three successes, so multiply by C(5, 3) = 10. Read this page again.
    • If you chose B: You swapped the powers, using 0.6³ × 0.4². The success chance 0.4 goes with the 3 successes: 0.4³ × 0.6². Read this page again.
  3. X ~ B(20, 0.35). What is the mean of X?

    Tap your answer.
    1. Not this one. That is the variance, npq = 20 × 0.35 × 0.65. The mean is np, without the q. Read this page again. Try another.

    2. Yes, that is right. The mean is np = 20 × 0.35 = 7.

    3. Not this one. That is nq = 20 × 0.65, the expected number of failures. The mean number of successes is np. Read this page again. Try another.

    See the answer

    7

    The mean is np = 20 × 0.35 = 7.

    • If you chose A: That is the variance, npq = 20 × 0.35 × 0.65. The mean is np, without the q. Read this page again.
    • If you chose C: That is nq = 20 × 0.65, the expected number of failures. The mean number of successes is np. Read this page again.
  4. X ~ B(50, 0.2). What is the variance of X?

    Tap your answer.
    1. Yes, that is right. Var(X) = npq = 50 × 0.2 × 0.8 = 8.

    2. Not this one. That is the mean, np = 50 × 0.2. The variance is npq, with the failure chance 0.8 as a last factor. Read this page again. Try another.

    3. Not this one. That is the standard deviation, √8. The variance is the number before the square root. Read this page again. Try another.

    See the answer

    8

    Var(X) = npq = 50 × 0.2 × 0.8 = 8.

    • If you chose B: That is the mean, np = 50 × 0.2. The variance is npq, with the failure chance 0.8 as a last factor. Read this page again.
    • If you chose C: That is the standard deviation, √8. The variance is the number before the square root. Read this page again.
  5. X ~ B(10, 0.3). Which expression gives P(X ≥ 3)?

    Tap your answer.
    1. Not this one. That leaves out X = 3. X ≥ 3 includes 3, so the part to take away is X = 0, 1, 2, which is P(X ≤ 2). Read this page again. Try another.

    2. Yes, that is right. The values 0 to 10 cover everything, so P(X ≥ 3) = 1 − P(X ≤ 2). The part removed is X = 0, 1 and 2.

    3. Not this one. That is the chance of 3 or fewer, the other end of the bars. X ≥ 3 means 3 or more. Read this page again. Try another.

    See the answer

    1 − P(X ≤ 2)

    The values 0 to 10 cover everything, so P(X ≥ 3) = 1 − P(X ≤ 2). The part removed is X = 0, 1 and 2.

    • If you chose A: That leaves out X = 3. X ≥ 3 includes 3, so the part to take away is X = 0, 1, 2, which is P(X ≤ 2). Read this page again.
    • If you chose C: That is the chance of 3 or fewer, the other end of the bars. X ≥ 3 means 3 or more. Read this page again.
  6. For X ~ B(10, 0.1), at which value is the bar tallest?

    Tap your answer.
    1. Not this one. The middle of the values 0 to 10 is 5, but the bars pile up near the mean np = 1, because success is unlikely. Read this page again. Try another.

    2. Not this one. Nine successes out of ten, when each has chance 0.1, is very unlikely. The bar at 9 is almost flat. Read this page again. Try another.

    3. Yes, that is right. P(X = 0) = 0.9¹⁰ = 0.3487 and P(X = 1) = 10 × 0.1 × 0.9⁹ = 0.3874. The next bars are smaller, so the tallest bar is at 1.

    See the answer

    X = 1

    P(X = 0) = 0.9¹⁰ = 0.3487 and P(X = 1) = 10 × 0.1 × 0.9⁹ = 0.3874. The next bars are smaller, so the tallest bar is at 1.

    • If you chose A: The middle of the values 0 to 10 is 5, but the bars pile up near the mean np = 1, because success is unlikely. Read this page again.
    • If you chose B: Nine successes out of ten, when each has chance 0.1, is very unlikely. The bar at 9 is almost flat. Read this page again.
  7. From an earlier chapter

    For a random variable, E(X) = 4 and E(X²) = 19. What is Var(X)?

    Tap your answer.
    1. Not this one. You took E(X²) − E(X). The rule squares the mean: E(X²) − [E(X)]². Go to M5.7.2. Try another.

    2. Yes, that is right. Var(X) = E(X²) − [E(X)]² = 19 − 4² = 19 − 16 = 3.

    3. Not this one. You added E(X²) and E(X). The variance is E(X²) minus the square of E(X). Go to M5.7.2. Try another.

    See the answer

    3

    Var(X) = E(X²) − [E(X)]² = 19 − 4² = 19 − 16 = 3.

    • If you chose A: You took E(X²) − E(X). The rule squares the mean: E(X²) − [E(X)]². Go to M5.7.2.
    • If you chose C: You added E(X²) and E(X). The variance is E(X²) minus the square of E(X). Go to M5.7.2.
  8. X ~ B(8, 0.25). Find P(X = 2), to 4 decimal places.

    See the answer

    0.3115

    P(X = 2) = C(8, 2) × 0.25² × 0.75⁶ = 28 × 0.0625 × 0.177979 = 0.3115.

  9. X ~ B(10, 0.4). Find P(X ≤ 2), to 4 decimal places.

    See the answer

    0.1673

    To 5 decimal places, P(X = 0) = 0.6¹⁰ = 0.00605, P(X = 1) = 10 × 0.4 × 0.6⁹ = 0.04031 and P(X = 2) = 45 × 0.16 × 0.6⁸ = 0.12093. The sum is 0.16729, which is 0.1673 to 4 decimal places.

  10. X ~ B(30, 0.2). Find Var(X).

    See the answer

    4.8

    Var(X) = npq = 30 × 0.2 × 0.8 = 4.8.

  11. X ~ B(n, 0.6) has mean 12. Find n.

    See the answer

    20

    The mean is np, so n × 0.6 = 12. Then n = 12 ÷ 0.6 = 20.

Keep it

Copy this into your exercise book.

X ~ B(n, p): fixed n, two outcomes, same p, independent. P(X = r) = C(n, r) p^r q^(n − r), q = 1 − p. Mean np, variance npq. P(X ≥ 3) = 1 − P(X ≤ 2).

Draw: A bar chart of B(6, 0.7) with the bar for 4 hatched.

Reading with a child? A short page for the adult: what this chapter teaches and three questions to ask.

No internet tomorrow? Save the whole book as one file (1.1 MB). It opens on any phone.