Counting successes
Many random variables count how many times something happens in a set number of tries: how many seeds sprout out of 12, how many customers buy out of 20, how many parcels arrive late out of 50. When these tries follow a few simple rules, the count has a binomial distribution. Then you do not need to build the probability table by hand, as in Topic 2.8. A single formula gives every probability, and short formulas give the mean and standard deviation.
Each try is called a trial. The outcome you are counting is called a success; the other outcome is a failure. “Success” is only a label. It can be something bad, such as a faulty part.
When is a random variable binomial?
A random variable X is binomial when all four conditions hold.
| Condition | What to check in context |
|---|---|
| Two outcomes | Each trial is either a success or a failure. |
| Fixed number of trials | n is decided in advance, before any trial happens. |
| Independent trials | The outcome of one trial does not change the probabilities for another. |
| Same probability | Every trial has the same probability of success, p. |
X is then the number of successes in the n trials. We write X ~ B(n, p), read “X has a binomial distribution with n trials and success probability p”. X can take the values 0, 1, 2, …, n.
To justify that X is binomial, state each condition in the words of the problem. To show that X is not binomial, name the condition that fails and explain why.
The binomial probability function
Think about 3 seeds, each germinating with probability 0.85. What is the probability that exactly 2 germinate?
One way is germinate, germinate, fail: by independence its probability is 0.85 × 0.85 × 0.15 = 0.108375. But the failure could be first, second or third, so there are 3 such orders, each with the same probability. So P(X = 2) = 3 × 0.108375 = 0.3251.
In general, the probability of exactly x successes in n trials is:
P(X = x) = ₙCₓ · pˣ · (1 − p)ⁿ⁻ˣ, for x = 0, 1, 2, …, n
- pˣ(1 − p)ⁿ⁻ˣ is the probability of one particular order with x successes and n − x failures.
- ₙCₓ = n! ÷ [x!(n − x)!] is the number of orders. Here ₃C₂ = 3.
For “at most”, “at least” or “between”, add the exact probabilities for every value in the range. The complement often saves work: P(X ≥ 1) = 1 − P(X = 0). Technology helps too: a binomial pdf gives P(X = x), and a binomial cdf gives the cumulative probability P(X ≤ x), as in the cumulative distributions of Topic 2.8.
Be careful with the boundary. “At least 11” means 11 or more, so P(X ≥ 11) = 1 − P(X ≤ 10). “Fewer than 10” means 9 or fewer, so it is P(X ≤ 9).
Mean and standard deviation
You could find the mean and standard deviation of a binomial variable with the Topic 2.9 formulas. The results always simplify to:
μ = np and σ = √[ np(1 − p) ]
The mean makes sense: if 85% of seeds germinate, then in 12 seeds you expect 0.85 of 12, or 10.2, on average. The variance is np(1 − p); take its square root to get σ.
The data used in this guide
A fictional seed company, Greenrow Seeds, says that each of its tomato seeds germinates with probability 0.85. A gardener plants 12 seeds in separate pots, in the same conditions. Let X = the number of the 12 seeds that germinate.
Seeing a binomial distribution
When p is near 0.5 a binomial distribution is roughly symmetric. When p is close to 1, as here, it is skewed to the left; when p is close to 0 it is skewed to the right.
Worked example 1: probabilities for the seed trial
Question. (a) Justify that X is a binomial random variable. (b) Find the probability that exactly 10 seeds germinate. (c) Find the probability that at least 11 germinate. (d) Find the probability that fewer than 10 germinate. Interpret (d) in context.
(a) Each seed either germinates (success) or does not (failure). The number of trials is fixed at n = 12 seeds. The seeds are in separate pots, so it is reasonable to assume one seed germinating does not affect another (independence). Each seed has the same probability of germinating, p = 0.85. So X ~ B(12, 0.85).
(b) P(X = 10) = ₁₂C₁₀ (0.85)¹⁰ (0.15)² = 66 × 0.19687… × 0.0225 = 0.2924.
(c) P(X ≥ 11) = P(X = 11) + P(X = 12) = 0.3012 + 0.1422 = 0.4435 (unrounded values added).
(d) “Fewer than 10” means X ≤ 9.
P(X ≤ 9) = 1 − P(X ≥ 10) = 1 − [P(X = 10) + P(X = 11) + P(X = 12)] = 1 − 0.7358 = 0.2642.
With technology: binomial cdf with n = 12, p = 0.85, x = 9 gives 0.2642.
Interpretation. If the company’s claim is true, about 26% of the times a gardener plants 12 of these seeds, fewer than 10 will germinate.
Check. All values from 0 to 12 have probabilities adding to 1, and the most likely values (10 and 11) are next to the mean, 10.2.
Worked example 2: binomial or not?
Question. For each random variable, decide whether it is binomial. Justify your answer.
(i) A fictional quality inspector at a pottery tests 20 mugs chosen at random from a very large day’s output. Each mug is cracked with probability 0.03, independently. X = the number of cracked mugs. Binomial. Two outcomes (cracked or not), n = 20 fixed, independent mugs and the same p = 0.03 for each. X ~ B(20, 0.03).
(ii) A player rolls a fair six-sided die until a 6 appears. Y = the number of rolls needed. Not binomial. The number of trials is not fixed in advance; Y counts trials, not successes in a fixed n.
(iii) A box holds 8 batteries, 3 of them flat. A technician takes out 4 batteries one at a time without replacement. W = the number of flat batteries taken. Not binomial. The trials are not independent and p changes: the first battery is flat with probability 3/8, but if it is flat, the next is flat with probability 2/7.
(iv) A student answers 10 questions. T = the total number of minutes spent. Not binomial. T is not a count of successes; each trial does not have just two outcomes.
Looking ahead. When a small sample is drawn without replacement from a very large population, the probability hardly changes from one draw to the next, so a binomial model is still a good approximation. You will meet the condition that makes this precise in later units.
Worked example 3: mean, standard deviation and a simulation
Question. (a) Calculate and interpret the mean and standard deviation of X for the Greenrow seeds. (b) A class simulated 200 plantings of 12 seeds. Use the results to estimate P(X ≤ 9) and compare with the exact value. (c) One gardener finds that only 8 of 12 seeds germinate. Does this give strong reason to doubt the company’s claim?
(a) μ = np = 12 × 0.85 = 10.2 seeds. σ = √[12 × 0.85 × 0.15] = √1.53 = 1.24 seeds.
If many gardeners each planted 12 of these seeds, the mean number germinating would be about 10.2 seeds per gardener. Over many such plantings, the number that germinates typically differs from the mean of 10.2 by about 1.24 seeds.
(b) The simulation used two-digit random numbers 00 to 99 for each seed: 01 to 85 means “germinates” and 86 to 99 or 00 means “fails”, so P(germinate) = 85/100 = 0.85. Each planting used 12 numbers. Results:
| Seeds germinating | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|
| Number of simulated plantings | 3 | 14 | 32 | 57 | 63 | 31 |
Plantings with X ≤ 9: 3 + 14 + 32 = 49. Estimate: 49 ÷ 200 = 0.245. The exact value is 0.2642. The estimate is close but not equal, because a simulation’s relative frequency varies by chance. More simulated plantings would usually give an estimate closer to 0.2642.
(c) P(X ≤ 8) = 0.0922. If the claim is true, 8 or fewer seeds would germinate in about 9% of plantings of 12. That is not very rare, so this one result alone does not give strong reason to doubt the claim.
Common misconceptions
- Leaving out ₙCₓ. pˣ(1 − p)ⁿ⁻ˣ is the probability of one order only. Multiply by the number of orders.
- Mixing up p and 1 − p in the powers. The power of p is the number of successes; the power of 1 − p is the number of failures.
- Getting the boundary wrong. “At least 11” includes 11; “fewer than 10” stops at 9. Write the inequality before you calculate.
- σ = np(1 − p). That is the variance. Take the square root.
- “Any count is binomial.” Check all four conditions. Counting until a success, or drawing without replacement from a small group, breaks a condition.
- Writing only calculator syntax. Name the distribution, n, p and the values: “X ~ B(12, 0.85), P(X ≤ 9) = 0.2642”.
- “The mean is the number that will happen.” np = 10.2 seeds is a long-run average over many sets of 12; it is not even a possible count.
- “An unlikely result proves the claim is false.” A small probability gives evidence against a claim; it does not prove anything.
Where this leads
Next, in Topic 2.11, you study the normal distribution, a model for continuous variables. Binomial counts return when you look at sample proportions later in the course. Try the practice questions now, then use the revision notes and the checklist. When you are ready, move on to The Normal Distribution. To review expected values first, return to Parameters of Random Variables.
Quick questions
What does ₙCₓ mean?
It is the number of different orders in which x successes can appear among n trials: ₙCₓ = n! ÷ [x!(n − x)!]. Calculators call it nCr. For example, ₁₂C₁₀ = 66.
Is the number of trials until the first success binomial?
No. A binomial variable needs a fixed number of trials decided in advance. If you keep going until a success happens, the number of trials is not fixed.