IB Diploma Mathematics AA · Statistics and probability
The binomial distribution
1When to use the binomial
A random variable $X$ is binomial, written $X \sim B(n, p)$, when:
- there is a fixed number of trials, $n$;
- each trial has two outcomes, success or failure;
- the probability of success, $p$, is the same every time;
- the trials are independent.
$X$ is the number of successes, so it can be $0, 1, 2, \ldots, n$.
the number of sixes in 10 rolls of a die is $B(10, \frac{1}{6})$.
the number of red cards in 5 cards drawn without replacement is not binomial, because $p$ changes after each draw.
Check yourself
Why is drawing cards without replacement not binomial?
Show the answer
The probability of success changes each draw
Each card removed changes what is left.
2Calculating binomial probabilities
The binomial distribution B(10, 0.2)
The formula is in the formula booklet:
$$P(X = r) = \binom{n}{r} p^r (1 - p)^{n - r}$$
In exams, use your GDC: binomial pdf for $P(X = r)$ and binomial cdf for $P(X \le r)$.
A multiple-choice guess
- A student guesses all 10 questions, each with 5 options. $X \sim B(10, 0.2)$.
- $P(X = 3) = \binom{10}{3}(0.2)^3(0.8)^7 = 0.201$.
- $P(X \le 2) = 0.678$ (binomial cdf).
- $P(X \ge 1) = 1 - P(X = 0) = 1 - 0.8^{10} = 0.893$.
Check yourself
On a GDC, which function gives P(X ≤ 4)?
Show the answer
Binomial cdf
"cdf" is cumulative: it adds up all values up to 4.
3Inequalities: the tricky part
The cdf always gives $P(X \le r)$. Rewrite other inequalities first:
- $P(X < 4) = P(X \le 3)$.
- $P(X > 4) = 1 - P(X \le 4)$.
- $P(X \ge 4) = 1 - P(X \le 3)$.
- $P(2 \le X \le 5) = P(X \le 5) - P(X \le 1)$.
Because $X$ is a whole number, "fewer than 4" stops at 3.
At least
- $X \sim B(20, 0.3)$. Find $P(X \ge 8)$.
- $P(X \ge 8) = 1 - P(X \le 7)$.
- $= 1 - 0.772 = 0.228$.
Check yourself
For a binomial X, P(X > 6) equals:
Show the answer
1 − P(X ≤ 6)
"More than 6" starts at 7, so remove everything up to 6.
4Mean and variance
For $X \sim B(n, p)$:
$$E(X) = np \qquad \text{Var}(X) = np(1 - p)$$
Expected number and spread
- $X \sim B(10, 0.2)$.
- $E(X) = 10 \times 0.2 = 2$ correct answers expected.
- $\text{Var}(X) = 10 \times 0.2 \times 0.8 = 1.6$, so $\sigma = 1.26$.
Check yourself
X ~ B(50, 0.4). What is E(X)?
Show the answer
20
np = 50 × 0.4.
5Recognising binomial situations
A situation is binomial if:
- There is a fixed number of trials, $n$.
- Each trial has two outcomes (success or failure).
- The probability of success $p$ is constant.
- Trials are independent.
Is it binomial?
- Rolling a die 10 times and counting sixes: yes ($n = 10$, $p = \frac{1}{6}$).
- Drawing 5 cards without replacement and counting hearts: not exactly, because $p$ changes.
- Rolling until a six appears: no, because $n$ is not fixed.
Check yourself
X ~ B(n, p). What is the variance of X?
Show the answer
np(1 − p)
For example, B(10, 0.5) has variance 2.5.
6A worked calculation
$X \sim B(8, 0.3)$
- $P(X = 2) = \binom{8}{2}(0.3)^2(0.7)^6 = 28 \times 0.09 \times 0.117649 \approx 0.296$.
- $E(X) = 8 \times 0.3 = 2.4$.
- $\text{Var}(X) = 8 \times 0.3 \times 0.7 = 1.68$.
- $P(X \ge 1) = 1 - P(X = 0) = 1 - 0.7^8 \approx 1 - 0.0576 = 0.942$.
Check yourself
If $X \sim B(10, 0.5)$, what is $E(X)$?
Show the answer
5
$np$.
7Going deeper: translating the wording, and finding the number of trials
The calculation is done by the GDC. The marks are for recognising the model and translating the words into the right inequality.
$X \sim B(10, 0.3)$.
- $P(X = 3) = \binom{10}{3}(0.3)^3(0.7)^7 \approx 0.267$.
- $P(X \le 2) \approx 0.0282 + 0.1211 + 0.2335 = 0.383$.
- $P(X \ge 3) = 1 - P(X \le 2) \approx 0.617$.
- Mean: $np = 3$. Variance: $np(1 - p) = 2.1$.
Translating the wording (for whole numbers)
- "At most 3": $P(X \le 3)$.
- "Fewer than 3": $P(X \le 2)$.
- "At least 3": $1 - P(X \le 2)$.
- "More than 3": $1 - P(X \le 3)$.
- "Between 2 and 5 inclusive": $P(X \le 5) - P(X \le 1)$.
- "Exactly 3": use the probability function, not the cumulative one.
Worked example (finding $n$): each attempt succeeds with probability 0.2. How many attempts are needed for the probability of at least one success to exceed 0.95?
- $P(\text{at least one}) = 1 - 0.8^n > 0.95$.
- $0.8^n < 0.05$.
- $n > \frac{\ln 0.05}{\ln 0.8} \approx 13.4$. The inequality reverses because $\ln 0.8$ is negative.
- $n = 14$. Check: $0.8^{13} \approx 0.055$ (not enough), $0.8^{14} \approx 0.044$.
The four conditions
- A fixed number of trials, $n$.
- Each trial has two outcomes: success or failure.
- The probability of success, $p$, is constant.
- Trials are independent.
Is it binomial?
- Tossing a coin 20 times and counting heads: yes.
- Drawing 5 cards without replacement and counting aces: no, the probability changes.
- Counting rolls until the first six: no, the number of trials is not fixed.
- Sampling 10 people from a very large population: approximately yes.
Combining with other ideas
- A common two-stage question: find the probability $p$ of an event for one day, then let $Y \sim B(5, p)$ count the days in a week on which it happens.
- Expected number of successes: $np$.
Common mistakes
- Using the cumulative function when "exactly" is asked.
- Getting "at least" off by one.
- Giving the variance when the standard deviation is asked: the standard deviation is $\sqrt{np(1 - p)}$.
Check yourself
X ~ B(20, 0.4). What are the mean and variance of X?
Show the answer
Mean 8, variance 4.8
np = 20 × 0.4 = 8 and np(1 − p) = 8 × 0.6 = 4.8.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera