MathemagiciansLibraryExplorationsDeep Dives
← Mathematics · Upper Secondary
MathematicsUpper Secondary

The binomial distribution — repeated trials

U4 — Statistics Advancing › U4.4 — Probability AdvancedLecture 5 of 5~2990 words

The number you expect is not very likely

Amara plays basketball. Over a whole season, she scores 70% of her free throws. In tonight's game she takes 10 free throws.

How many will she score? Most people answer at once: "about 7". Seven is 70% of 10, so 7 is the number you expect. Now a harder question. How likely is it that she scores exactly 7? Make a guess before you read on.

Predict, then reveal — exactly 7 out of 10

Each free throw scores with probability 0.7, and the throws do not affect each other. Amara takes 10. What is the probability that she scores exactly 7?

The probability that Amara scores exactly 7 of her 10 free throws is only about 0.27. Seven is her most likely result, but the other results (6, 8, 9 and the rest) share almost three quarters of the probability between them.

The answer is about 0.27. The most likely result happens only about one game in four.

A tree diagram would work, but 10 throws give paths. Nobody draws that tree, and you do not need to. The tree diagrams lecture gave the idea: count the paths you want, then multiply by the probability of one path. The last lecture gave the tool for counting. This lecture puts the two together, and the result is called the binomial distribution.

One honest note: real players have good and bad nights. So "0.7 on every throw, with no throw affecting another" is a model, but a useful one.

Three throws, drawn in full

Start small enough to draw. Amara takes 3 free throws. Write S for a score and M for a miss. On every throw, S has probability 0.7 and M has probability 0.3.

0.7 0.3 0.7 0.3 0.7 0.3 0.7 0.3 0.7 0.3 0.7 0.3 0.7 0.3 S M S M S M S M S M S M S M SSS 0.343 SSM 0.147 SMS 0.147 SMM 0.063 MSS 0.147 MSM 0.063 MMS 0.063 MMM 0.027
A tree for three free throws. S is a score (probability 0.7) and M is a miss (probability 0.3). The probability of each path is at the right. The three paths with exactly two scores are drawn thicker.

Which paths give exactly 2 scores? There are three: SSM, SMS and MSS. Multiply along each one.

SSM: 0.7 × 0.7 × 0.3 = 0.147
SMS: 0.7 × 0.3 × 0.7 = 0.147
MSS: 0.3 × 0.7 × 0.7 = 0.147

Two things stand out.

First, the three paths have the same probability. This is not luck. Each of them multiplies two 0.7s and one 0.3. Only the order is different, and the order does not change a product. So every path with 2 scores has the probability .

Second, the number of these paths can be counted without drawing them. A path with exactly 2 scores is decided by one choice: which 2 of the 3 throws are the scores. Use the swap test from the last lecture. Choosing throws 1 and 3 is the same as choosing throws 3 and 1. So this is a selection, and the number of selections is .

The three paths cannot happen together, so their probabilities add:

That is it. That is the whole idea. Count the paths with a combination. Then multiply by the probability of one path. Everything else in this lecture is this idea, used carefully.

The same reasoning gives every possible number of scores out of 3:

ScoresPathsOne pathProbability
010.3³ = 0.0270.027
130.7 × 0.3² = 0.0630.189
230.7² × 0.3 = 0.1470.441
310.7³ = 0.3430.343

Check: ✓. The four results cover every path, so they must add to 1.

The formula, read as a sentence

Now give everything a name. Each repeat of the experiment is a trial. The result we count is called a success, and the other result a failure. "Success" is only a label. It can be a faulty phone, a six on a die, or a child with an illness. Let

is a number decided by chance. A quantity like this is called a random variable. When the conditions in the next section hold, we write . Read it as " follows the binomial distribution with trials and probability ".

The binomial formula

If , then for :

Read the formula as a sentence, from left to right. is the number of paths: the number of ways to choose which of the trials are successes. is for the successes on one path. is for the failures on the same path. Some books write for . It means the same thing.

Now Amara's 10 throws. Here , and . A path with 7 scores has 3 misses. The last lecture showed that choosing 7 is the same as choosing the 3 left out, so .

One path with exactly 7 scores is very unlikely: about 0.0022. But there are 120 such paths. Together they give about 0.267. Here is every result from 0 to 10, worked out in the same way.

0.00 0.05 0.10 0.15 0.20 0.25 0.30 0 1 2 3 4 5 6 0.200 7 0.267 8 0.233 9 10 probability number of scores, r
The binomial distribution B(10, 0.7): the probability of each number of scores in 10 throws. The tallest bar, at 7, is only 0.267. Results 6, 7 and 8 together have probability ≈ 0.700. The bars add to 1.

The bars have gaps, because the number of scores is always a whole number. Seven gets the most, but 6 and 8 are close behind, and 5 and 9 each get about one game in ten. That is why the most likely result is not very likely.

Four conditions, and why each one matters

The formula works only when four conditions hold. Do not learn them as a list. Each one is needed by a step of the argument above.

Trials like these, with two outcomes and a fixed probability, are often called Bernoulli trials. The name honours the Swiss mathematician Jacob Bernoulli. He studied them in his book Ars Conjectandi ("The Art of Conjecturing"), which was published in 1713, eight years after his death.

Stop and think

Which of these can be modelled by a binomial distribution? (a) Five cards are dealt from a pack, and is the number of hearts. (b) A die is rolled 8 times, and is the number of rolls that show 5 or 6. (c) A coin is tossed until the first head, and is the number of tosses.

Show the answer

(a) No. The cards are not put back. After a heart, there are fewer hearts left, so the probability changes and the trials are not independent. (b) Yes. There are 8 trials, two outcomes ("5 or 6" or not), the same probability each time, and the rolls do not affect each other. So . (c) No. The number of tosses is not fixed.

Pascal's triangle returns

The last lecture ended with six tastes and the numbers 1, 6, 15, 20, 15, 6, 1, and promised that they would appear again. Here they are. They are one row of Pascal's triangle.

row 0 row 1 row 2 row 3 row 4 row 5 row 6 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1
Pascal's triangle, rows 0 to 6. Each number is the sum of the two numbers just above it. Row 6 is 1, 6, 15, 20, 15, 6, 1, and its 20 is 10 + 10 from row 5.

Row of the triangle lists . The top row is called row 0. So row 3 is 1, 3, 3, 1. These are exactly the numbers of paths in the table for three throws.

Why is each number the sum of the two above it? Paths explain it. Think of the paths with successes in trials, and look only at the last trial. Either the last trial is a success, and the first trials hold successes. Or it is a failure, and the first trials hold all successes. Every path is in exactly one of these two groups. So

For example, .

A row of the triangle is a row of counts, not probabilities. It becomes a distribution in one special case: . Then every path has the same probability, , so you divide the whole row by . Toss a fair coin 6 times. The probability of exactly 3 heads is . For any other , each count must be multiplied by its own path probability, as in Amara's table.

Explore the shape

Try it yourself below. Change the number of trials and the probability of success, and watch how the bars move. Then choose a value of , and read the formula with its numbers.

Explore — the shape of a binomial distribution

Change n and p and watch the bars. Then move r to choose one bar. The dashed line marks the mean, np.

Trials n: 10

Probability p: 0.7

Successes r: 7

The table compares three distributions with 10 trials. Each column adds to 1. With the large probabilities are at the left, with the column is symmetrical, and with it is the column turned upside down. Values are to 4 decimal places, so 0.0000 means a probability smaller than 0.000 05, not zero.

rB(10, 0.3)B(10, 0.5)B(10, 0.7)
00.02820.00100.0000
10.12110.00980.0001
20.23350.04390.0014
30.26680.11720.0090
40.20010.20510.0368
50.10290.24610.1029
60.03680.20510.2001
70.00900.11720.2668
80.00140.04390.2335
90.00010.00980.1211
100.00000.00100.0282

Here is what you should have seen. With , the bars are symmetrical. With below 0.5, the tall bars sit at the left; with above 0.5, at the right. The tallest bar is always at the mean or next to it. As grows, the bars spread out and get shorter, because more results share the same total of 1.

The mean: what to expect in the long run

Amara expects 7 scores from 10 throws. Here is the reason, made exact. Imagine she takes her 10 throws in each of 100 games. That is 1000 throws. About 70% of them score, so about 700 scores. Spread over 100 games, that is about 7 scores per game.

The table gives the same answer another way. The mean of a distribution is found by multiplying each value by its probability and adding. For three throws:

0 × 0.027 + 1 × 0.189 + 2 × 0.441 + 3 × 0.343 = 2.1

And ✓. The mean is also called the expected value, written .

The mean of a binomial distribution

If , then .

"Expected" means the average over many repeats, not a promise for one. It need not even be possible: with 10 trials and , the mean is 2.5.

Worked examples

Worked Example 1 — One probability

. Find .

Choose which 4 of the 10 trials are successes: .

One path has 4 successes and 6 failures: and .

Check: the mean is , so 4 should be a little less likely than 3. Indeed , the same as for Amara. That is no accident: 7 scores at 0.7 means 3 misses at 0.3 ✓.

Worked Example 2 — "At least" with the complement

. Find (a) and (b) .

(a) "At least 1" covers 1, 2, 3, 4 and 5: five calculations. Its complement is just one value, 0. So

(b) The complement of "at least 2" is "0 or 1". First, . So

Check: (b) must be smaller than (a), because "at least 2" is harder than "at least 1" ✓.

Worked Example 3 — Check the conditions first

A machine makes light bulbs, and 5% of them are faulty. An inspector tests 20 bulbs. Find the probability that (a) exactly 2 are faulty, (b) at least 2 are faulty.

Conditions. There are 20 trials. Each bulb is faulty or not. Assume each bulb has the same 0.05 chance, and that one faulty bulb does not make the next one more likely to be faulty. That last assumption can fail: a machine that starts to go wrong may produce a run of faulty bulbs. If the assumptions hold, , where success means "faulty".

(a) , so

(b) and . So .

Check: the mean is . So 0 and 1 faulty bulbs should be the most likely results, and they are ✓.

Worked Example 4 — A family and a gene

Some illnesses are passed on by a recessive gene. When both parents carry the gene, each child has a 1 in 4 chance of having the illness, separately for each child. A family with two carrier parents has 4 children. Find the probability that (a) exactly one child has the illness, (b) at least one child has it.

Here , where success means "has the illness". Keep the fractions exact.

(a) .

(b) .

The mean is 1 child, yet almost one such family in three () has no child with the illness. "1 in 4" is a probability for each child, not a rule that one child in four has it. Check: ✓.

Trap 1 — Forgetting to count the paths

is the probability of one path, such as seven scores followed by three misses. "Exactly 7 scores" allows 7 scores in any positions, so multiply by . If an answer for "exactly" looks surprisingly small, check that the count is there.

Trap 2 — The edge of "at least" and "at most"

"At least 3" means 3 or more, so , not . Before you calculate, write out the values in the event and the values in its complement. For : at least 3 is {3, 4, 5}, and the complement is {0, 1, 2}.

Trap 3 — Using the formula when the trials are not independent

Counting hearts in 5 cards dealt from a pack is not binomial: the probability changes after every card. Check the four conditions before writing . When a few items come from a very large group, the change is tiny and the binomial is a close model. Say so when you use it.

Try it yourself

Work each one on paper first. Open a hint only when you are stuck.

  1. A fair die is rolled 6 times. Find the probability of exactly two sixes. Give the exact fraction and a decimal.

    Hint 1

    Success is "six", so . What are and ?

    Hint 2

    Choose which 2 of the 6 rolls are sixes: . The other 4 rolls are "not six".

    Full answer

    . . Check: the mean is , so two sixes should be less likely than one six. , which is larger ✓.

  2. A quiz has 8 questions, each with 4 options and one right answer. Javier guesses every answer at random. He passes with at least 5 right. (a) What is his expected number of right answers? (b) What is the probability that he passes?

    Hint 1

    . The mean is .

    Hint 2

    "At least 5" is 5, 6, 7 or 8. Here the event is shorter than its complement, so add the four probabilities directly.

    Full answer

    (a) . (b) Each probability has the bottom number : , , , , all over 65 536. Total . Guessing passes less than 3 times in 100. Check: the numerators use , because each wrong answer can be chosen in 3 ways out of 4 ✓.

  3. A seed grows with probability 0.9. Mei plants 12 seeds. (a) How many does she expect to grow? (b) Find the probability that at least 11 grow. (c) Is "at least 11" more or less likely than not?

    Hint 1

    . "At least 11" is 11 or 12.

    Hint 2

    . For 11, there are ways to choose which seed fails.

    Full answer

    (a) . (b) and . Total . (c) More likely than not: about 2 times in 3. Check: the mean, 10.8, is close to 11, so a high answer is sensible ✓.

  4. In 1693, Samuel Pepys wrote to Isaac Newton about a bet. Which is most likely with fair dice: A, at least one six when 6 dice are thrown; B, at least two sixes when 12 dice are thrown; or C, at least three sixes when 18 dice are thrown? Pepys thought C. Probability C is about 0.597. Find A and B, and decide.

    Hint 1

    Each case is binomial with . Use the complement for both.

    Hint 2

    For B, the complement of "at least two" is "zero or one six" among 12 dice.

    Full answer

    A: . B: and , so . So A (0.665) is the most likely, then B (0.619), then C (0.597). Newton gave Pepys this answer: the opposite order to the one Pepys expected. Each bet has a mean exactly equal to its target (1, 2 and 3 sixes), and yet the chances differ. Check: all three are above 0.5 and below 1 ✓.

The bigger idea

The word "binomial" means "two terms". It comes from algebra. Expand and you get . Expand and you get . Look at the numbers in front: 1, 2, 1 and 1, 3, 3, 1. They are rows of Pascal's triangle, and each term is one of the binomial probabilities.

This is not a coincidence. Multiplying out means choosing or from each of the brackets, exactly like choosing failure or success on each of trials. Now put . Then , and . So all the binomial probabilities always add to exactly 1, for every and every . The Pre-University lecture on the binomial theorem develops the algebra side.

The same distribution appears wherever independent yes-or-no trials share one probability: bulbs on a production line, answers in a survey, children in a family. Later it answers a deeper question. When a result looks surprising, is it really surprising, or just chance? That is hypothesis testing, and it begins with these calculations.

Key concepts in this lesson