Mean and variance of the binomial distribution
The notation X ~ Bin(n, p), the mean and variance of a Bernoulli distribution, the mean np and variance np(1 − p) of a binomial distribution, and finding n and p from a given mean and variance.
Working out every binomial probability to find an average would take a long time. Fortunately the mean and variance of a binomial distribution have short formulas, and they explain why results become more predictable as the number of trials grows.
Notation
$X \sim \text{Bin}(n, p)$ means "$X$ is the number of successes in $n$ independent trials, each with probability $p$ of success". A single Bernoulli trial is $\text{Bin}(1, p)$.
Mean and variance of a Bernoulli trial
For one trial, $X$ is $1$ with probability $p$ and $0$ with probability $q = 1 - p$.
Find $E(X)$ and $\text{Var}(X)$ for a Bernoulli trial.
The variance pq of a single trial, as p moves from 0 to 1.
Drag $P$ to find the value of $p$ with the largest variance, and explain why that trial is the least predictable. Then find both values of $p$ with variance $0.16$, and check them by solving $p(1 - p) = 0.16$.
Mean and variance of a binomial distribution
A binomial variable is the sum of $n$ independent Bernoulli trials: $X = X_1 + X_2 + \cdots + X_n$. Means always add, so $E(X) = p + p + \cdots + p = np$. For independent variables, variances also add, so $\text{Var}(X) = npq$.
The mean $np$ matches intuition: $60$ tosses of a fair coin should give about $30$ heads.
$X \sim \text{Bin}(20, 0.3)$. Find the mean, variance and standard deviation.
A binomial distribution has mean $12$ and variance $3$. Find $n$ and $p$.
A fair coin is tossed $10$ times. Find the probability that the number of heads is within one standard deviation of the mean.
The dashed line is the mean np. The shaded band is one standard deviation either side of the mean.
Predict the mean and standard deviation of $\text{Bin}(20, 0.3)$, then check. Keep $p = 0.3$ and raise $n$ to $40$: by what factor does $\sigma$ grow? Which value of $p$ gives the widest spread for fixed $n$?
Your turn
$X \sim \text{Bin}(n, p)$ has mean $8$ and variance $4.8$. Find $n$ and $p$.
Show the working
$q = \dfrac{4.8}{8} = 0.6$, so $p = 0.4$. Then $n = \dfrac{8}{0.4} = 20$.
$X \sim \text{Bin}(50, 0.2)$. Find $E(X)$.
$np = 50 \times 0.2 = 10$.
$X \sim \text{Bin}(50, 0.2)$. Find $\text{Var}(X)$.
$npq = 50 \times 0.2 \times 0.8 = 8$.
The variance of a single Bernoulli trial with success probability $p$ is:
$E(X) = p$ and $E(X^2) = p$, so $\text{Var}(X) = p - p^2 = p(1 - p)$.
$X \sim \text{Bin}(100, 0.1)$. Find the standard deviation.
$\sigma^2 = 100 \times 0.1 \times 0.9 = 9$, so $\sigma = 3$.
A binomial distribution has mean $6$ and variance $4.2$. Find $n$.
$q = \dfrac{4.2}{6} = 0.7$, so $p = 0.3$ and $n = \dfrac{6}{0.3} = 20$.
For a fixed $n$, the variance of $\text{Bin}(n, p)$ is greatest when:
$np(1 - p)$ is a downward parabola in $p$ with zeroes at $0$ and $1$, so its maximum is halfway, at $p = 0.5$.
A fair coin is tossed $n$ times and the number of heads has standard deviation $3$. Find $n$.
$\sigma^2 = n \times 0.5 \times 0.5 = \dfrac{n}{4} = 9$, so $n = 36$.
$X \sim \text{Bin}(10, 0.4)$. Find $E(X^2)$.
$\text{Var}(X) = E(X^2) - \mu^2$, so $E(X^2) = \text{Var}(X) + \mu^2 = 10(0.4)(0.6) + 4^2 = 2.4 + 16 = 18.4$.
Exam style: a fair coin is tossed $8$ times. Find the probability that the number of heads is within one standard deviation of the mean, correct to $4$ decimal places.
$\mu = 4$, $\sigma = \sqrt{8 \times 0.25} = \sqrt2 \approx 1.41$. So $2.59 \lt X \lt 5.41$, giving $X = 3, 4, 5$. $P = \dfrac{56 + 70 + 56}{256} = \dfrac{182}{256} \approx 0.7109$.
Exam style: $X \sim \text{Bin}(n, p)$ has mean $10$ and standard deviation $\sqrt6$. Find $n$ and $p$. Enter them as n&p.
The variance is $(\sqrt6)^2 = 6$. Then $q = \dfrac{6}{10} = 0.6$, so $p = 0.4$ and $n = \dfrac{10}{0.4} = 25$.
Coaching Centre