๐Ÿช™ The Binomial Distribution

A Level Maths Year 1 ยท Probability and Distributions

Level 3 · Ages 16–17

← Back to topic overview
1 Discrete Random Variables
A random variable $X$ is a quantity whose value depends on chance. It is discrete if it can take only particular values (such as $0, 1, 2, \ldots$). Its probability distribution lists every possible value $x$ together with $\mathrm{P}(X = x)$.
The key property
$\displaystyle\sum_{\text{all } x} \mathrm{P}(X = x) = 1$

Capital $X$ names the random variable; lower-case $x$ is a particular value it takes. The distribution can be given as a table or as a probability function.

Worked Example 1 โ€” From an experiment

Two fair coins are tossed. $X$ is the number of heads. Find the probability distribution of $X$.

โ‘ Outcomes HH, HT, TH, TT are equally likely.
โ‘ก$\mathrm{P}(X = 0) = \tfrac14$, $\mathrm{P}(X = 1) = \tfrac24 = \tfrac12$, $\mathrm{P}(X = 2) = \tfrac14$.
$x$$0$$1$$2$
$\mathrm{P}(X = x)$$\tfrac14$$\tfrac12$$\tfrac14$
Worked Example 2 โ€” A probability function with an unknown

$\mathrm{P}(X = x) = k(x + 1)$ for $x = 0, 1, 2, 3$, and $0$ otherwise. Find $k$ and $\mathrm{P}(X \geqslant 2)$.

โ‘ Probabilities: $k, 2k, 3k, 4k$.
โ‘กSum to $1$: $10k = 1$, so $k = 0.1$.
โ‘ข$\mathrm{P}(X \geqslant 2) = 3k + 4k = 0.7$.
The discrete uniform distribution
$X$ takes $n$ values, each equally likely: $\mathrm{P}(X = x) = \dfrac{1}{n}$
e.g. the score on a fair six-sided die: $\mathrm{P}(X = x) = \tfrac16$ for $x = 1, 2, \ldots, 6$
2 The Binomial Distribution

Many situations count the number of "successes" in a fixed number of repeated trials: heads in $10$ tosses, defective items in a batch of $20$, seeds that germinate out of $12$.

Conditions for $X \sim \mathrm{B}(n, p)$
โ‘  A fixed number of trials, $n$
โ‘ก Each trial has two outcomes: success or failure
โ‘ข The trials are independent
โ‘ฃ The probability of success, $p$, is the same for every trial
Then $X$ = the number of successes
The binomial probability formula
$\mathrm{P}(X = r) = \dbinom{n}{r}\, p^r (1 - p)^{n - r}, \qquad r = 0, 1, \ldots, n$
Why it works. Any particular sequence of $r$ successes and $n - r$ failures has probability $p^r(1-p)^{n-r}$, by independence. There are $\dbinom{n}{r}$ ways to choose which $r$ of the $n$ trials are the successes, so multiply by $\dbinom{n}{r}$. (This is the same ${}^n\mathrm{C}_r$ as in the binomial expansion.)
Worked Example 3 โ€” Using the formula

$X \sim \mathrm{B}(10, 0.3)$. Find $\mathrm{P}(X = 3)$.

โ‘ $\mathrm{P}(X = 3) = \dbinom{10}{3}(0.3)^3(0.7)^7$
โ‘ก$= 120 \times 0.027 \times 0.0823543$
โ‘ข$= 0.2668$ (4 d.p.)
012345 678910 r 0.10.20.3 P(X = r) for X ~ B(10, 0.3)
3 Cumulative Probabilities

Most questions ask for a range of values. Your calculator's binomial cumulative distribution function gives $\mathrm{P}(X \leqslant r)$ directly. (Some courses also provide printed tables of $\mathrm{P}(X \leqslant r)$.) Everything else is found from it.

WantedRewrite as
$\mathrm{P}(X < r)$$\mathrm{P}(X \leqslant r - 1)$
$\mathrm{P}(X \geqslant r)$$1 - \mathrm{P}(X \leqslant r - 1)$
$\mathrm{P}(X > r)$$1 - \mathrm{P}(X \leqslant r)$
$\mathrm{P}(a \leqslant X \leqslant b)$$\mathrm{P}(X \leqslant b) - \mathrm{P}(X \leqslant a - 1)$
Discrete means the inequality matters. For a binomial variable, $X < 4$ and $X \leqslant 4$ are different events. Write out the values: "$X < 4$" means $0, 1, 2, 3$.
$r$$0$$1$$2$$3$$4$$5$$6$$7$
$\mathrm{P}(X = r)$$0.0282$$0.1211$$0.2335$$0.2668$$0.2001$$0.1029$$0.0368$$0.0090$
$\mathrm{P}(X \leqslant r)$$0.0282$$0.1493$$0.3828$$0.6496$$0.8497$$0.9527$$0.9894$$0.9984$

Values for $X \sim \mathrm{B}(10, 0.3)$, to 4 d.p.

Worked Example 4 โ€” Ranges of values

$X \sim \mathrm{B}(10, 0.3)$. Find (a) $\mathrm{P}(X \leqslant 3)$, (b) $\mathrm{P}(X \geqslant 4)$, (c) $\mathrm{P}(2 \leqslant X \leqslant 5)$.

โ‘ (a) $\mathrm{P}(X \leqslant 3) = 0.6496$.
โ‘ก(b) $\mathrm{P}(X \geqslant 4) = 1 - \mathrm{P}(X \leqslant 3) = 1 - 0.6496 = 0.3504$.
โ‘ข(c) $\mathrm{P}(X \leqslant 5) - \mathrm{P}(X \leqslant 1) = 0.9527 - 0.1493 = 0.8034$.
Worked Example 5 โ€” Strict inequalities

$Y \sim \mathrm{B}(20, 0.15)$. Find (a) $\mathrm{P}(Y < 4)$, (b) $\mathrm{P}(Y > 5)$.

โ‘ (a) $\mathrm{P}(Y < 4) = \mathrm{P}(Y \leqslant 3) = 0.6477$.
โ‘ก(b) $\mathrm{P}(Y > 5) = 1 - \mathrm{P}(Y \leqslant 5) = 1 - 0.9327 = 0.0673$.
Worked Example 6 โ€” Finding $n$

Each ticket in a promotion has probability $0.2$ of winning a prize, independently. How many tickets must be bought for the probability of at least one prize to exceed $0.95$?

โ‘ $\mathrm{P}(\text{at least one}) = 1 - 0.8^n > 0.95$, so $0.8^n < 0.05$.
โ‘ก$n > \dfrac{\ln 0.05}{\ln 0.8} = 13.4\ldots$ (the inequality flips because $\ln 0.8 < 0$).
โ‘ขCheck: $0.8^{13} = 0.0550$ (too big), $0.8^{14} = 0.0440$ โœ“. So $n = 14$.
4 Modelling with the Binomial Distribution
A binomial model is only as good as its assumptions. In context you must say what a trial is, what counts as a success, and whether independence and constant $p$ are realistic.
Worked Example 7 โ€” Critiquing a model

Seeds from a packet germinate with probability $0.85$. A gardener plants $10$ seeds in one tray and models the number $G$ that germinate as $\mathrm{B}(10, 0.85)$. (a) State two assumptions. (b) Find $\mathrm{P}(G \geqslant 9)$. (c) Comment on the assumptions.

โ‘ (a) Each seed germinates independently of the others; every seed has the same probability $0.85$ of germinating.
โ‘ก(b) $\mathrm{P}(G = 9) = 10(0.85)^9(0.15) = 0.3474$; $\mathrm{P}(G = 10) = 0.85^{10} = 0.1969$.
โ‘ข$\mathrm{P}(G \geqslant 9) = 0.3474 + 0.1969 = 0.5443$.
โ‘ฃ(c) The seeds share a tray, soil, water and temperature, so if conditions are poor they may all do badly together โ€” independence may not hold.
Worked Example 8 โ€” When the binomial is not appropriate

Five cards are dealt from a standard pack. Explain why the number of hearts is not modelled exactly by $\mathrm{B}(5, 0.25)$.

โ‘ Cards are dealt without replacement, so the probability of a heart changes from card to card (e.g. $\tfrac{13}{52}$, then $\tfrac{12}{51}$ if the first was a heart).
โ‘กThe trials are not independent and $p$ is not constant.
When a sample is small compared with a large population, the change in $p$ is tiny and a binomial model is a good approximation.
5 Quick Reference

Distribution

All values with their probabilities; total $1$.

Discrete uniform

$n$ equally likely values: each $\tfrac1n$.

Binomial conditions

Fixed $n$; two outcomes; independent; constant $p$.

Formula

$\mathrm{P}(X = r) = \binom{n}{r} p^r (1-p)^{n-r}$

$\mathrm{P}(X < r)$

$= \mathrm{P}(X \leqslant r - 1)$

$\mathrm{P}(X \geqslant r)$

$= 1 - \mathrm{P}(X \leqslant r - 1)$

$\mathrm{P}(X > r)$

$= 1 - \mathrm{P}(X \leqslant r)$

At least one

$1 - (1-p)^n$

Context

Say what a trial is; question independence and constant $p$.

6 Practice Questions
Question 1

$\mathrm{P}(X = x) = kx^2$ for $x = 1, 2, 3$. Find $k$ and $\mathrm{P}(X = 3)$.

โ–ถ Show solution

$k + 4k + 9k = 14k = 1$, so $k = \dfrac{1}{14}$.

$\mathrm{P}(X = 3) = \dfrac{9}{14}$.

Question 2

$X$ has a discrete uniform distribution on $1, 2, \ldots, 8$. Find $\mathrm{P}(X > 5)$ and $\mathrm{P}(X \text{ is prime})$.

โ–ถ Show solution

$\mathrm{P}(X > 5) = \mathrm{P}(6, 7, 8) = \dfrac38$.

Primes: $2, 3, 5, 7$, so $\mathrm{P} = \dfrac48 = \dfrac12$.

Question 3

$X \sim \mathrm{B}(8, 0.4)$. Find $\mathrm{P}(X = 3)$.

โ–ถ Show solution

$\dbinom{8}{3}(0.4)^3(0.6)^5 = 56 \times 0.064 \times 0.07776 = 0.2787$ (4 d.p.)

Question 4

$X \sim \mathrm{B}(12, 0.25)$. Find $\mathrm{P}(X \leqslant 2)$ and $\mathrm{P}(X \geqslant 3)$.

โ–ถ Show solution

$\mathrm{P}(X = 0) = 0.75^{12} = 0.0317$; $\mathrm{P}(X = 1) = 12(0.25)(0.75)^{11} = 0.1267$; $\mathrm{P}(X = 2) = 66(0.25)^2(0.75)^{10} = 0.2323$.

$\mathrm{P}(X \leqslant 2) = 0.3907$ (a calculator gives $0.39068$).

$\mathrm{P}(X \geqslant 3) = 1 - 0.3907 = 0.6093$.

Question 5

$X \sim \mathrm{B}(15, 0.6)$. Find $\mathrm{P}(X > 10)$.

โ–ถ Show solution

$\mathrm{P}(X > 10) = 1 - \mathrm{P}(X \leqslant 10) = 1 - 0.7827 = 0.2173$ (4 d.p.)

Question 6

$X \sim \mathrm{B}(20, 0.35)$. Find $\mathrm{P}(5 \leqslant X < 9)$.

โ–ถ Show solution

The values are $5, 6, 7, 8$.

$\mathrm{P}(X \leqslant 8) - \mathrm{P}(X \leqslant 4) = 0.7624 - 0.1182 = 0.6442$

Question 7

A class of $30$ contains $12$ girls. Five students are chosen at random, one after another, to form a committee. Explain why the number of girls chosen does not exactly follow $\mathrm{B}(5, 0.4)$.

โ–ถ Show solution

The students are chosen without replacement, so the probability of choosing a girl changes after each choice (e.g. $\tfrac{12}{30}$, then $\tfrac{11}{29}$ or $\tfrac{12}{29}$). The trials are not independent and $p$ is not constant. With such a small population the effect is noticeable.

Question 8

$X \sim \mathrm{B}(n, 0.3)$. Find the smallest $n$ for which $\mathrm{P}(X = 0) < 0.01$.

โ–ถ Show solution

$0.7^n < 0.01$, so $n > \dfrac{\ln 0.01}{\ln 0.7} = 12.9\ldots$

Check: $0.7^{12} = 0.0138$, $0.7^{13} = 0.0097$. So $n = 13$.

Question 9

A spinner has $\mathrm{P}(\text{red}) = \tfrac16$. It is spun $6$ times. Find the probability of (a) exactly one red, (b) at least two reds.

โ–ถ Show solution

$R \sim \mathrm{B}\left(6, \tfrac16\right)$.

(a) $6 \times \tfrac16 \times \left(\tfrac56\right)^5 = \left(\tfrac56\right)^5 = 0.4019$

(b) $\mathrm{P}(R = 0) = \left(\tfrac56\right)^6 = 0.3349$, so $\mathrm{P}(R \geqslant 2) = 1 - 0.3349 - 0.4019 = 0.2632$.

Question 10

A basketball player scores each free throw with probability $0.7$. In a practice session she takes $15$ free throws.

(a) Define a suitable distribution for the number of scores, $S$, and state two assumptions needed.   (b) Find $\mathrm{P}(S = 10)$.   (c) Find $\mathrm{P}(S \geqslant 12)$.   (d) She has $4$ such sessions. Find the probability that she scores at least $12$ in exactly $2$ of them.   (e) Suggest why the assumptions might not hold.

โ–ถ Show solution

(a) $S \sim \mathrm{B}(15, 0.7)$. Assumptions: the throws are independent; the probability of scoring is $0.7$ for every throw.

(b) $\mathrm{P}(S = 10) = \dbinom{15}{10}(0.7)^{10}(0.3)^5 = 3003 \times 0.0282475 \times 0.00243 = 0.2061$

(c) $\mathrm{P}(S \geqslant 12) = 1 - \mathrm{P}(S \leqslant 11) = 1 - 0.7031 = 0.2969$

(d) Let $T$ be the number of sessions with at least $12$: $T \sim \mathrm{B}(4, 0.29687\ldots)$.

$\mathrm{P}(T = 2) = \dbinom42 (0.29687)^2(0.70313)^2 = 6 \times 0.088131 \times 0.494395 = 0.2614$

(e) She may tire as the session goes on (so $p$ falls), or a miss may affect her confidence on the next throw (so throws are not independent).

The Binomial Distribution · A Level Maths Year 1 · Created with MathJax