math.wiki
Probability › Random variables › The binomial distribution › Mean and standard deviation of a binomial
Open on the map
Statistics · S.MD.A.3

Mean and standard deviation of a binomial

A count of successes over many independent tries could be described by listing every probability. Is there a quick way to say how many successes to expect, and how far the count typically strays from that?

Where you are 4 in The binomial distribution

Why this exists

Ruta runs the evening classes at a cooking school. Each class takes 40 reservations, and each booked guest fails to show with chance 0.1, independently of the others (a made-up chance). The number of no-shows X is a binomial count (The binomial setting): n = 40 trials, a “success” being a no-show, with p = 0.1.

Ruta’s real questions are about center and spread. How many empty places should she expect, and how much does that number move from night to night? The mean \mu_X = \sum x \, P(x) and the standard deviation \sigma_X answer both, but computed from the table they need all 41 probabilities from The binomial probability formula, then 41 products, then 41 squared deviations. For a binomial count that work collapses to two short formulas in n and p.

Definition

Let X be the number of successes in n independent trials, each a success with the same probability p. The mean of the binomial is its long-run average count, \mu_X = np. The standard deviation of the binomial is the typical distance of the count from that mean, \displaystyle \sigma_X = \sqrt{np(1-p)}. These are the same \mu_X and \sigma_X defined for every discrete random variable; the binomial setting simply lets them be computed from n and p alone.

Intuition

If one guest in ten misses, then over many nights 40 reservations lose about one tenth of 40, that is 4 guests, on average. The mean is the share that fails times the number of tries.

The spread comes from each reservation’s own uncertainty. A single reservation is a 0 or 1: 1 if the guest misses. When p is near 0 or near 1 the outcome is nearly certain and the trial adds little spread; when p is near \tfrac{1}{2} it is a coin toss and adds the most. That is what p(1-p) measures: 0.1 \times 0.9 = 0.09, while 0.5 \times 0.5 = 0.25. Forty independent reservations add forty such variances.

0.1 0.2 0 1 2 3 4 5 6 7 8 9 10 11 12 number of no-shows X mean np = 4 σ ≈ 1.90
Figure 1The number of no-shows among 40 reservations when each guest misses with chance 0.1 (made-up chance). It balances at np = 4, and a night’s count typically lands about 1.90 from 4.

Results

For a binomial count X with n trials and success probability p:

\mu_X = np
\sigma_X^2 = np(1-p)
\sigma_X = \sqrt{np(1-p)}

For Ruta’s class, \mu_X = 40(0.1) = 4 no-shows, \sigma_X^2 = 40(0.1)(0.9) = 3.6 square no-shows, and \displaystyle \sigma_X = \sqrt{3.6} \approx 1.90 no-shows.

The count of failures, n - X, is binomial with success probability 1 - p. Its mean is n(1-p) and its standard deviation is the same \displaystyle \sqrt{np(1-p)}.

Why it is true

Give each trial its own random variable: X_i = 1 if trial i is a success and X_i = 0 if not. Then the count is the sum

X = X_1 + X_2 + \cdots + X_n

One trial. X_i is 1 with probability p and 0 with probability 1 - p, so

E(X_i) = 1 \cdot p + 0 \cdot (1-p) = p

Its variance weights each squared deviation from p by its probability:

\begin{aligned} \operatorname{Var}(X_i) &= (1-p)^2 \, p + (0-p)^2 (1-p) \\ &= p(1-p)\big[(1-p) + p\big] \\ &= p(1-p) \end{aligned}

The second line takes out the common factor p(1-p).

Adding the trials. By Combining random variables, the mean of a sum is the sum of the means, always, so \mu_X = p + p + \cdots + p = np. The trials are independent, so the variance of the sum is also the sum of the variances: \sigma_X^2 = n \, p(1-p). Taking the square root gives \displaystyle \sigma_X = \sqrt{np(1-p)}. Standard deviations are not added; variances are, and only because the trials are independent.

The failures. n - X counts trials with X_i = 0, each of which happens with chance 1 - p, so the same argument gives mean n(1-p) and variance n(1-p)\big(1 - (1-p)\big), which is np(1-p). Equivalently, n - X multiplies X by -1 and adds n, which by Linear transformations of a random variable moves the mean and leaves the standard deviation alone.

Worked examples

Example 1

No-shows in a class of forty

Ruta’s evening class takes 40 reservations, and each guest misses with chance 0.1, independently. Find the mean and standard deviation of the number of no-shows X, and interpret both.

Solution

The setting is binomial with n = 40 and p = 0.1: a fixed number of reservations, each a no-show or not, with the same chance, independently. So

\mu_X = np = 40(0.1) = 4
\begin{aligned} \sigma_X &= \sqrt{np(1-p)} = \sqrt{40(0.1)(0.9)} \\ &= \sqrt{3.6} \approx 1.90 \end{aligned}

Over many evenings with 40 reservations, the number of no-shows averages 4 guests, and a given night’s count typically differs from 4 by about 1.90 guests. Figure 1 shows the whole distribution balancing at 4.

Example 2

The formulas against the table

Dainius teaches a private knife-skills class with 3 reservations, each a no-show with chance 0.1, independently. The number of no-shows X has this distribution (from the binomial formula):

no-shows x0123
P(x)0.7290.2430.0270.001

Find \mu_X and \sigma_X from the table, and compare with np and \displaystyle \sqrt{np(1-p)}.

Solution

From the table, the mean is the probability-weighted sum of the values:

\begin{aligned} \mu_X &= 0(0.729) + 1(0.243) \\ &\quad + 2(0.027) + 3(0.001) = 0.3 \end{aligned}

For the variance, the shortcut from Variance and standard deviation of a random variable uses the mean of the squares, E(X^2) = 0.243 + 4(0.027) + 9(0.001) = 0.36. So \sigma_X^2 = 0.36 - 0.3^2 = 0.27 and \displaystyle \sigma_X = \sqrt{0.27} \approx 0.52 no-shows.

The formulas give np = 3(0.1) = 0.3 and np(1-p) = 3(0.1)(0.9) = 0.27, exactly the same. The formulas are not an approximation of the table; they are a shorter road to the same numbers.

Example 3

Counting the guests who come

Dainius plans the ingredients for Ruta’s class of 40 reservations by the number of guests who show up, Y. Find \mu_Y and \sigma_Y.

Solution

Counting arrivals as successes, each reservation succeeds with chance 1 - 0.1 = 0.9, independently, so Y is binomial with n = 40 and p = 0.9:

\mu_Y = 40(0.9) = 36
\begin{aligned} \sigma_Y &= \sqrt{40(0.9)(0.1)} \\ &= \sqrt{3.6} \approx 1.90 \end{aligned}

On average 36 guests come, and the number typically differs from 36 by about 1.90 guests. The standard deviation matches Example 1 because Y = 40 - X: every extra no-show is one fewer arrival, so the two counts move by exactly the same amounts in opposite directions.

Example 4

A mean that never happens

Egle’s Sunday class takes 25 reservations, each a no-show with chance 0.1, independently. Find the mean and standard deviation of the number of no-shows, and say what a mean of 2.5 means when no night can have 2.5 no-shows.

Solution

With n = 25 and p = 0.1, \mu_X = 25(0.1) = 2.5 and

\sigma_X = \sqrt{25(0.1)(0.9)} = \sqrt{2.25} = 1.5

Every night has a whole number of no-shows. The mean is a long-run average: over many Sundays, the total no-shows divided by the number of Sundays settles near 2.5, just as a mean of data need not be one of the data values. A typical Sunday’s count is about 1.5 guests from 2.5.

Example 5

Working back to n and p

Reservations made through a discount website have a different no-show chance. Over a long run of classes booked only that way, the number of no-shows per class has mean 3 and variance 2.4. Assuming the count is binomial, find the no-show chance p and the number of reservations n.

Solution

The two formulas are np = 3 and np(1-p) = 2.4. Dividing the second by the first cancels np:

1 - p = \frac{2.4}{3} = 0.8

so p = 0.2. Then n = \dfrac{3}{0.2} = 15 reservations. Check: 15(0.2)(0.8) = 2.4. The ratio of variance to mean is always 1 - p for a binomial, which is why a binomial count has a variance smaller than its mean whenever p > 0.

Example 6

How far to overbook

Ruta’s kitchen has 40 stations. She considers taking 44 reservations, with each guest still missing with chance 0.1, independently. Find the mean and standard deviation of the number of guests who come, and decide whether more than 40 arrivals is an extreme night or a typical one. What is the largest number of reservations that keeps the mean number of arrivals at or below 40?

Solution

Arrivals Y are binomial with n = 44 and p = 0.9. So \mu_Y = 44(0.9) = 39.6 and

\begin{aligned} \sigma_Y &= \sqrt{44(0.9)(0.1)} \\ &= \sqrt{3.96} \approx 1.99 \end{aligned}

More than 40 arrivals means 41 or more. The value 41 is 41 - 39.6 = 1.4 guests above the mean, less than one standard deviation, so a night with a guest too many is a typical result, not an extreme one. Ruta should expect it to happen on some nights.

For the mean, she needs 0.9n \le 40, that is n \le \dfrac{40}{0.9} \approx 44.4. The largest whole number of reservations is 44.

Example 7

Twice the spread for four times the class

The school holds a large demonstration evening with 160 reservations, each a no-show with chance 0.1, independently. Compare its mean and standard deviation of no-shows with those of the 40-reservation class, both as counts and as a share of the reservations.

Solution

For n = 160: \mu_X = 160(0.1) = 16 and

\begin{aligned} \sigma_X &= \sqrt{160(0.1)(0.9)} \\ &= \sqrt{14.4} \approx 3.79 \end{aligned}

Four times the reservations gives four times the mean but only twice the standard deviation, because \displaystyle \sqrt{4 \cdot 3.6} = 2\sqrt{3.6}: the variance grows with n, the standard deviation with \displaystyle \sqrt{n}.

As a share of the reservations, the typical miss is \dfrac{1.90}{40} \approx 0.047 for the small class and \dfrac{3.79}{160} \approx 0.024 for the large one. In absolute guests the big evening is less predictable; as a fraction of the room it is more predictable. That second fact is the start of Sampling distribution of a sample proportion.

Boundaries

  • The formulas hold only for a binomial count: a fixed number n of trials, two outcomes each, the same p on every trial, and independent trials. Without independence the variances do not add, and \displaystyle \sqrt{np(1-p)} is wrong even when np is right (Exercise 17).
  • If p changes from trial to trial, the mean is still the sum of the separate chances, but the count is no longer binomial and np(1-p) no longer applies.
  • At p = 0 or p = 1 the count is certain and \sigma_X = 0; for every other p, with n \ge 1, \sigma_X > 0.
  • \mu_X and \sigma_X describe the model’s long run. A single night’s count, or a short run of nights, matches them only approximately.
  • The two numbers give center and spread only. They do not give the probability of any count; that needs The binomial probability formula, or, for large n, Shape of a binomial and the normal approximation.

Where this goes next

With \mu_X = np and \displaystyle \sigma_X = \sqrt{np(1-p)} in hand, a binomial count can be placed on a scale without listing its table: how many standard deviations a night’s count sits from np says how unusual it is. Shape of a binomial and the normal approximation uses exactly these two numbers to fit a normal curve when n is large. Dividing the count by n gives a sample proportion with mean p and standard deviation \displaystyle \sqrt{p(1-p)/n}, the center of Sampling distribution of a sample proportion.

Exercises

All chances are made up, and every count of reservations is assumed independent unless the exercise says otherwise. Give standard deviations to two decimal places unless exact.

Mean and standard deviation from n and p

  1. A class takes 50 reservations, each a no-show with chance 0.1. Find the mean, variance and standard deviation of the number of no-shows.
  2. A lunch class takes 20 reservations, each a no-show with chance 0.1. Find \mu_X and \sigma_X.
  3. A class takes 30 reservations, each a no-show with chance 0.1. Find the mean and standard deviation of the number of guests who come.
  4. A weekend festival takes 100 reservations, each a no-show with chance 0.1. Find \mu_X and \sigma_X for the number of no-shows.
  5. In Egle’s pastry class of 12 guests, each guest asks for the gluten-free menu with chance 0.25. Find the mean and standard deviation of the number who ask.
  6. In a class of 8 guests, each chooses the bread workshop or the sauce workshop, each with chance 0.5. Find the mean and standard deviation of the number choosing bread.
  7. Dainius says the number of no-shows in his 60-reservation class has mean 6 and standard deviation about 2.32. Write one sentence interpreting each number.

Using the formulas

  1. A class of 25 reservations has a mean of 5 no-shows. Find p and \sigma_X.
  2. A binomial count of no-shows has mean 8 and variance 7.2. Find p and n.
  3. A binomial count has mean 12 and standard deviation 3. Find p and n.
  4. With 2 reservations and no-show chance 0.1, the number of no-shows is 0, 1 or 2 with probabilities 0.81, 0.18 and 0.01. Find \mu_X and \sigma_X^2 from the table, and compare with np and np(1-p).
  5. Ruta takes 45 reservations for 40 stations. Find the mean and standard deviation of the number of guests who come. Is the mean above the number of stations?
  6. How many reservations give a mean of 7 no-shows when each misses with chance 0.1? Find \sigma_X for that class.
  7. Egle compares two classes of 20 reservations: regular bookings, no-show chance 0.1, and free sample-night bookings, no-show chance 0.3. Find the mean and standard deviation of no-shows for each. Which count is more variable?
  8. Compare 10 and 1{,}000 reservations, no-show chance 0.1: find \mu_X and \sigma_X for each, and \sigma_X as a share of n.
  9. Each no-show in a 40-reservation class pays a 15 dollar late fee, so the fee income is F = 15X. Find the mean and standard deviation of F.
  10. A class has 40 guests who book in 20 pairs, and each pair comes or misses together, a pair missing with chance 0.1, independently of other pairs. Find the mean and standard deviation of the number of guests who miss. Compare with Example 1.

Reasoning

  1. Show that a single trial that is 1 with probability p and 0 otherwise has variance p(1-p).
  2. For a fixed n, show that \sigma_X is largest when p = 0.5. What is the largest possible standard deviation of the number of no-shows among 40 reservations?
  3. Explain why the number of no-shows and the number of arrivals always have the same standard deviation.
  4. Explain why multiplying the number of reservations by 4, with p fixed, multiplies \sigma_X by 2 and not by 4.
  5. When does a binomial count have \sigma_X = 0? Explain what that means for Ruta’s class.
Answers
  1. \mu_X = 50(0.1) = 5, \sigma_X^2 = 50(0.1)(0.9) = 4.5, \displaystyle \sigma_X = \sqrt{4.5} \approx 2.12 no-shows.
  2. \mu_X = 20(0.1) = 2, \displaystyle \sigma_X = \sqrt{1.8} \approx 1.34 no-shows.
  3. Arrivals are binomial with p = 0.9: mean 30(0.9) = 27 guests, \displaystyle \sigma = \sqrt{30(0.9)(0.1)} = \sqrt{2.7} \approx 1.64 guests.
  4. \mu_X = 10, \displaystyle \sigma_X = \sqrt{100(0.1)(0.9)} = \sqrt{9} = 3 no-shows.
  5. Mean 12(0.25) = 3 guests, \displaystyle \sigma = \sqrt{12(0.25)(0.75)} = \sqrt{2.25} = 1.5 guests.
  6. Mean 8(0.5) = 4 guests, \displaystyle \sigma = \sqrt{8(0.5)(0.5)} = \sqrt{2} \approx 1.41 guests.
  7. Over many classes with 60 reservations, the number of no-shows averages 6. On a given night the count is typically about 2.32 guests away from 6.
  8. p = \dfrac{5}{25} = 0.2. \displaystyle \sigma_X = \sqrt{25(0.2)(0.8)} = \sqrt{4} = 2 no-shows.
  9. 1 - p = \dfrac{7.2}{8} = 0.9, so p = 0.1 and n = \dfrac{8}{0.1} = 80.
  10. Variance 9, so 1 - p = \dfrac{9}{12} = 0.75, p = 0.25, n = \dfrac{12}{0.25} = 48.
  11. \mu_X = 0.18 + 2(0.01) = 0.2. E(X^2) = 0.18 + 4(0.01) = 0.22, so \sigma_X^2 = 0.22 - 0.04 = 0.18. The formulas give 2(0.1) = 0.2 and 2(0.1)(0.9) = 0.18, the same.
  12. Mean 45(0.9) = 40.5 guests, \displaystyle \sigma = \sqrt{4.05} \approx 2.01 guests. Yes, the mean is above 40: over many nights more guests come than there are stations, on average.
  13. 0.1n = 7 gives n = 70. \displaystyle \sigma_X = \sqrt{70(0.1)(0.9)} = \sqrt{6.3} \approx 2.51.
  14. Regular: mean 2, \displaystyle \sigma = \sqrt{1.8} \approx 1.34. Sample night: mean 20(0.3) = 6, \displaystyle \sigma = \sqrt{20(0.3)(0.7)} = \sqrt{4.2} \approx 2.05. The sample-night count is more variable.
  15. n = 10: mean 1, \displaystyle \sigma_X = \sqrt{0.9} \approx 0.95, share \approx 0.095. n = 1{,}000: mean 100, \displaystyle \sigma_X = \sqrt{90} \approx 9.49, share \approx 0.0095.
  16. \mu_F = 15(4) = 60 dollars. \displaystyle \sigma_F = 15\sqrt{3.6} \approx 28.46 dollars (multiplying by 15 multiplies the standard deviation by 15).
  17. Pairs missing are binomial with n = 20, p = 0.1: mean 2, \displaystyle \sigma = \sqrt{1.8}. Guests missing are twice that: mean 4, \displaystyle \sigma = 2\sqrt{1.8} = \sqrt{7.2} \approx 2.68 guests. Same mean as Example 1, but larger spread than 1.90, because guests are not independent and the count is not binomial with n = 40.
  18. The mean is 1 \cdot p + 0 \cdot (1-p) = p. The variance is (1-p)^2 p + p^2 (1-p), which factors as p(1-p)\big[(1-p) + p\big], that is p(1-p).
  19. p(1-p) equals \tfrac{1}{4} - \left(p - \tfrac{1}{2}\right)^2, largest when p = 0.5, where it is \tfrac{1}{4}. Then \displaystyle \sigma_X = \sqrt{n/4}; for n = 40, \displaystyle \sqrt{10} \approx 3.16 guests.
  20. Arrivals equal n minus no-shows. Subtracting from a constant flips the count and shifts it, which changes neither the distances between values nor their probabilities, so the spread is unchanged. In the formula, np(1-p) is the same with p and 1 - p swapped.
  21. The variance np(1-p) is proportional to n, so it is multiplied by 4. The standard deviation is its square root, and \displaystyle \sqrt{4} = 2.
  22. Exactly when p(1-p) = 0, that is p = 0 or p = 1. Then every guest certainly comes, or certainly misses, and every night has the same count, so nothing varies.
kg1128 · updated 2026-10-20 · CC-BY-SA-4.0