impera Open Impera

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$.

Example

the number of sixes in 10 rolls of a die is $B(10, \frac{1}{6})$.

Example

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?

  • The number of trials is not fixed in advance

  • The probability of success changes each draw

  • Cards are not random, so the model fails

  • There are more than two outcomes on each draw

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)$.

Worked example

A multiple-choice guess

  1. A student guesses all 10 questions, each with 5 options. $X \sim B(10, 0.2)$.
  2. $P(X = 3) = \binom{10}{3}(0.2)^3(0.8)^7 = 0.201$.
  3. $P(X \le 2) = 0.678$ (binomial cdf).
  4. $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)?

  • Inverse normal

  • Binomial pdf

  • Binomial cdf

  • Normal cdf

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.

Worked example

At least

  1. $X \sim B(20, 0.3)$. Find $P(X \ge 8)$.
  2. $P(X \ge 8) = 1 - P(X \le 7)$.
  3. $= 1 - 0.772 = 0.228$.
Check yourself

For a binomial X, P(X > 6) equals:

  • 1 − P(X ≤ 7)

  • P(X ≤ 6)

  • 1 − P(X ≤ 6)

  • 1 − P(X = 6)

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)$$

Worked example

Expected number and spread

  1. $X \sim B(10, 0.2)$.
  2. $E(X) = 10 \times 0.2 = 2$ correct answers expected.
  3. $\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)?

  • 50

  • 12

  • 20

  • 0.4

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.
Worked example

Is it binomial?

  1. Rolling a die 10 times and counting sixes: yes ($n = 10$, $p = \frac{1}{6}$).
  2. Drawing 5 cards without replacement and counting hearts: not exactly, because $p$ changes.
  3. Rolling until a six appears: no, because $n$ is not fixed.
Check yourself

X ~ B(n, p). What is the variance of X?

  • np(1 − p)

  • np

  • n(1 − p)

  • np(1 + p)

Show the answer

np(1 − p)

For example, B(10, 0.5) has variance 2.5.

6A worked calculation

Worked example

$X \sim B(8, 0.3)$

  1. $P(X = 2) = \binom{8}{2}(0.3)^2(0.7)^6 = 28 \times 0.09 \times 0.117649 \approx 0.296$.
  2. $E(X) = 8 \times 0.3 = 2.4$.
  3. $\text{Var}(X) = 8 \times 0.3 \times 0.7 = 1.68$.
  4. $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)$?

  • 2.5

  • 0.5

  • 10

  • 5

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.

Worked example

$X \sim B(10, 0.3)$.

  1. $P(X = 3) = \binom{10}{3}(0.3)^3(0.7)^7 \approx 0.267$.
  2. $P(X \le 2) \approx 0.0282 + 0.1211 + 0.2335 = 0.383$.
  3. $P(X \ge 3) = 1 - P(X \le 2) \approx 0.617$.
  4. 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?

  1. $P(\text{at least one}) = 1 - 0.8^n > 0.95$.
  2. $0.8^n < 0.05$.
  3. $n > \frac{\ln 0.05}{\ln 0.8} \approx 13.4$. The inequality reverses because $\ln 0.8$ is negative.
  4. $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?

  • Mean 12, variance 4.8

  • Mean 8, variance 4.8

  • Mean 8, variance 8

  • Mean 4.8, variance 8

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