Binomial Mean and Variance

np, and np times one minus p.

The mean is np

Toss a fair coin 5 times. The number of heads X has the distribution B(5, 1/2), and on average half the tosses are heads: 5 × 1/2 = 2.5. For any binomial, X ~ B(n, p), the mean is E(X) = np.

The reason is that X is a sum. Each trial on its own is worth 1 for a success and 0 for a failure, and its mean is p. X adds up n of these, so its mean is p + p + … + p = np.

The long sum agrees. For B(5, 1/2), with each probability over 32: E(X) = (0 × 1 + 1 × 5 + 2 × 10 + 3 × 10 + 4 × 5 + 5 × 1)/32 = (0 + 5 + 20 + 30 + 20 + 5)/32 = 80/32 = 2.5.

0510012345

X ~ B(5, 1/2), with each probability in 32nds. The bars are symmetric about the gap between 2 and 3, and the mean, np = 2.5, is at the center of that gap, under the peak.

The variance is np(1 − p)

One trial has variance p(1 − p). The n trials are independent, and the variances of independent variables add, so the variance of X is n times p(1 − p): Var(X) = np(1 − p).

For the 5 tosses, Var(X) = 5 × 1/2 × 1/2 = 1.25, and the standard deviation is √1.25 ≈ 1.12 heads. Twenty tosses have mean 20 × 1/2 = 10 and variance 20 × 1/2 × 1/2 = 5.

A check with the long sums

Take X ~ B(4, 1/6), the number of sixes in 4 rolls. Its probabilities, in 1296ths, are 625, 500, 150, 20 and 1. The long sum for the mean is (0 × 625 + 1 × 500 + 2 × 150 + 3 × 20 + 4 × 1)/1296 = 864/1296 = 2/3, and np = 4 × 1/6 = 2/3.

For the variance, E(X²) = (1 × 500 + 4 × 150 + 9 × 20 + 16 × 1)/1296 = 1296/1296 = 1, so Var(X) = 1 − (2/3)² = 1 − 4/9 = 5/9. The formula gives np(1 − p) = 4 × 1/6 × 5/6 = 20/36 = 5/9.

The variance depends on p

For a fixed n, the variance np(1 − p) depends on p through the product p(1 − p). At p = 0.1 it is 0.1 × 0.9 = 0.09; at p = 0.2 it is 0.16; at p = 0.3 it is 0.21; at p = 0.5 it is 0.25. Past 1/2 it falls again: at p = 0.8 it is 0.16, the same as at 0.2.

So the spread is largest when p = 1/2, where success and failure are equally likely and the result is hardest to predict.

py

The curve y = p(1 − p) for p from 0 to 1. It is 0 at both ends, highest at p = 1/2, where it is 0.25, and the same at 0.2 and 0.8, where it is 0.16.

A smaller p

Take the same 5 trials with p = 1/5. The mean falls to np = 5 × 1/5 = 1, and the variance to np(1 − p) = 5 × 1/5 × 4/5 = 0.8.

The bars crowd toward 0: P(X = 0) = (4/5)⁵ = 1024/3125, about 0.33, and P(X = 1) = 5 × 1/5 × (4/5)⁴ = 1280/3125, about 0.41. Five successes have probability only (1/5)⁵ = 1/3125.

025050075010001250012345

X ~ B(5, 1/5), with each probability in 3125ths: 1024, 1280, 640, 160, 20 and 1. The tallest bar is at 1, the mean, and the bars at 4 and 5 barely rise above the axis.

When p is 1 or 0

At p = 1 every trial succeeds, so X = n every time. One bar holds the whole probability, nothing varies, and np(1 − p) = n × 1 × 0 = 0. At p = 0 every trial fails, X = 0 every time, and the variance is 0 again.

The standard deviation

The standard deviation is √(np(1 − p)). For 100 passengers who each turn up with probability 0.9, the mean is 100 × 0.9 = 90 and the variance is 100 × 0.9 × 0.1 = 9, so the standard deviation is √9 = 3 passengers.

Multiply n by 4 and the mean is multiplied by 4, but the standard deviation only by √4 = 2. For 400 passengers the mean is 360 and the standard deviation is √36 = 6. As n grows, the spread grows more slowly than the mean.

05101520n = 20, p = 0.15np = 3

np < 5: the distribution is still skewed toward 0, so the Normal curve is not yet a safe stand-in for it; np = 3

Increase n until np ≥ 5

Bars for B(n, 0.15). At n = 20 the mean is np = 3 and the standard deviation is √(20 × 0.15 × 0.85) ≈ 1.60. Drag n: the mean moves right in step with n, and the bars widen more slowly, like √n.

The usual mistakes

Giving n as the mean. B(40, 1/4) has mean 40 × 1/4 = 10; a mean of 40 would need every trial to succeed.

Applying p twice. The mean of B(40, 1/4) is 10, not 40 × 1/4 × 1/4 = 2.5.

Giving np as the variance. For B(50, 1/5), np = 10 is the mean; the variance is 10 × 4/5 = 8.

Leaving out the p. n(1 − p) = 50 × 4/5 = 40 is not the variance of B(50, 1/5); np(1 − p) needs both p and 1 − p.

Adding variances where standard deviations are asked for. The mean plus two standard deviations of B(400, 0.9) is 360 + 2 × 6 = 372, not 360 + 2 × 36.

Worked example: An Airline That Sells More Tickets Than Seats, Planned from the Binomial Mean and Standard Deviation

Question An airline finds that 90% of passengers who book a flight turn up, independently of one another. (a) For a flight with 100 tickets sold, find the mean and the standard deviation of the number of passengers who turn up. (b) For an aircraft with 372 seats, the airline sells as many tickets as it can while keeping the mean plus two standard deviations of the number who turn up no more than 372. How many tickets does it sell?

  1. 1.For 100 tickets the number who turn up is X ∼ B(100, 0.9), since there are 100 independent trials, each with the same probability 0.9.

    80859095100100 tickets: number who turn upX ~ B(100, 0.9)
    80859095100100 tickets: number who turn upX ~ B(100, 0.9)
    For 100 tickets the number who turn up is X ∼ B(100, 0.9), drawn here from 80 to 100.
  2. 2.(a) E(X) = np = 100 × 0.9 = 90 passengers, and Var(X) = np(1 − p) = 100 × 0.9 × 0.1 = 9, so the standard deviation is √9 = 3 passengers.

    80859095100mean 90, sd 3mean = 100 × 0.9 = 90Var = 100 × 0.9 × 0.1 = 9, sd = 3
    80859095100mean 90, sd 3mean = 100 × 0.9 = 90Var = 100 × 0.9 × 0.1 = 9, sd = 3
    (a) The mean is np = 90 and the variance np(1 − p) = 9, so the standard deviation is 3. The gold bars lie within one standard deviation of the mean.
  3. 3.For n tickets the mean is 0.9n and the standard deviation is √0.09n = 0.3√n. The rule asks for 0.9n + 2 × 0.3√n ≤ 372, that is 0.9n + 0.6√n ≤ 372.

    340350360370380372 seatsn tickets: mean 0.9n, sd 0.3 √n0.9n + 0.6 √n <= 372
    340350360370380372 seatsn tickets: mean 0.9n, sd 0.3 √n0.9n + 0.6 √n <= 372
    For n tickets the mean is 0.9n and the standard deviation 0.3√n, so the rule is 0.9n + 0.6√n ≤ 372.
  4. 4.Let u = √n, and solve 0.9u2 + 0.6u − 372 = 0: u = −0.6 + √0.36 + 1339.21.8 = −0.6 + 36.61.8 = 20. The other root is negative and is rejected, because √n cannot be negative.

    340350360370380372 seatslet u = √n: the quadratic in uu = (−0.6 + 36.6)/1.8 = 20
    340350360370380372 seatslet u = √n: the quadratic in uu = (−0.6 + 36.6)/1.8 = 20
    Put u = √n: 0.9u2 + 0.6u − 372 = 0 has the positive root u = 20.
  5. 5.So n = 202 = 400. (b) The airline sells 400 tickets. Check: the mean is 360 and the standard deviation √36 = 6, and 360 + 2 × 6 = 372. With 401 tickets the mean plus two standard deviations is about 372.9, which is over the seats.

    340350360370380372 seats2 sd = 12n = 20 × 20 = 400 ticketsmean 360, sd 6: 360 + 12 = 372
    340350360370380372 seats2 sd = 12n = 20 × 20 = 400 ticketsmean 360, sd 6: 360 + 12 = 372
    (b) n = 400 tickets. The number who turn up has mean 360 and standard deviation 6, so the mean plus two standard deviations just reaches the 372 seats.

Answer: (a) mean 90 passengers, standard deviation 3 passengers; (b) 400 tickets

Common mistakes

  • Adding two variances instead of two standard deviations: 360 + 2 × 36 = 432. The rule is written in standard deviations, and 2 × 6 = 12.
  • Rounding up when the root is not a whole number. Every ticket beyond the largest n that satisfies the rule breaks it, so the answer is rounded down.

More probability distributions problems, worked step by step →

Practice Binomial Mean and Variance in the app