TExcelTAD
Home › School Probability & Statistics on Paper › Mean and Variance of Binomial Distributions

Mean and Variance of Binomial Distributions

In Bernoulli Trials and the Binomial Distribution, we used the combination formula (nk)pkqn−k\binom{n}{k} p^k q^{n-k} to compute probabilities for individual outcomes. But imagine a polling firm interviewing n=400n = 400 voters, or an assembly line producing n=1,000n = 1{,}000 computer chips daily.

If we had to construct a 1,0001{,}000-row probability table to calculate the expected number of defective chips and their standard deviation using the general formulas ∑xipi\sum x_i p_i and ∑xi2pi\sum x_i^2 p_i, it would take days on paper.

Fortunately, because the binomial random variable XX is composed of nn independent, identical Bernoulli trials, mathematicians derived extraordinary paper shortcut formulas that compute the mean, variance, and standard deviation in seconds!


1. The Closed-Form Binomial Formulas

For any binomial random variable X∼B(n,p)X \sim B(n, p), where nn is the number of independent trials, pp is the probability of success, and q=1−pq = 1 - p is the probability of failure:

Mean (Expected Value):μ=E(X)=npVariance:σ2=Var⁡(X)=np(1−p)=npqStandard Deviation:σ=np(1−p)=npq\begin{aligned} \mathbf{Mean\ (Expected\ Value):} \quad \mu = E(X) &= n p \\ \mathbf{Variance:} \quad \sigma^2 = \operatorname{Var}(X) &= n p (1 - p) = n p q \\ \mathbf{Standard\ Deviation:} \quad \sigma &= \sqrt{n p (1 - p)} = \sqrt{n p q} \end{aligned}

[!IMPORTANT] These formulas apply only when the four BINS criteria are strictly satisfied. They cannot be used if trials are dependent or if the probability of success changes between trials.


2. Paper Proof and Mathematical Intuition

Why do these simple formulas work? Let us write out the mathematical proof using paper algebra.

Step 1: The Single Bernoulli Trial Indicator

Let IjI_j be an indicator random variable for the outcome of trial jj:

  • Ij=1I_j = 1 if trial jj is a Success (probability pp)
  • Ij=0I_j = 0 if trial jj is a Failure (probability 1−p1 - p)

The expected value of a single indicator trial is:

E(Ij)=1⋅p+0⋅(1−p)=pE(I_j) = 1 \cdot p + 0 \cdot (1 - p) = p

The second moment of IjI_j is:

E(Ij2)=12⋅p+02⋅(1−p)=pE(I_j^2) = 1^2 \cdot p + 0^2 \cdot (1 - p) = p

The variance of a single trial is:

Var⁡(Ij)=E(Ij2)−[E(Ij)]2=p−p2=p(1−p)=pq\operatorname{Var}(I_j) = E(I_j^2) - [E(I_j)]^2 = p - p^2 = p(1 - p) = p q

Step 2: Summing Across nn Independent Trials

The total number of successes in nn trials is the sum of these indicators:

X=I1+I2+I3+⋯+InX = I_1 + I_2 + I_3 + \dots + I_n
  1. Mean: By the linearity of expectation (which holds for any random variables):
    E(X)=E(I1)+E(I2)+⋯+E(In)=p+p+⋯+p⏟n terms=npE(X) = E(I_1) + E(I_2) + \dots + E(I_n) = \underbrace{p + p + \dots + p}_{n\text{ terms}} = n p
  2. Variance: Because the trials are strictly independent, the variance of the sum equals the sum of the variances:
    Var⁡(X)=Var⁡(I1)+Var⁡(I2)+⋯+Var⁡(In)=pq+pq+⋯+pq⏟n terms=npq\operatorname{Var}(X) = \operatorname{Var}(I_1) + \operatorname{Var}(I_2) + \dots + \operatorname{Var}(I_n) = \underbrace{p q + p q + \dots + p q}_{n\text{ terms}} = n p q
  3. Standard Deviation: Taking the positive square root:
    σ=npq\sigma = \sqrt{n p q}

3. The Maximum Variance Property of pp

Consider the factor f(p)=p(1−p)=p−p2f(p) = p(1 - p) = p - p^2. What value of pp produces the greatest uncertainty (highest variance)?

On paper, this is a downward-opening quadratic function with roots at p=0p = 0 and p=1p = 1. The vertex occurs midway:

pmax=0+12=0.5=12p_{\text{max}} = \frac{0 + 1}{2} = 0.5 = \frac{1}{2}

At p=0.5p = 0.5:

Var⁡(X)max=n(0.5)(0.5)=n4=0.25n\operatorname{Var}(X)_{\text{max}} = n (0.5)(0.5) = \frac{n}{4} = 0.25 n
Success Probability pp(1−p)Variance for n=1000.10 (Rare event)0.10×0.90=0.09σ2=9.0  ⟹  σ=3.00.300.30×0.70=0.21σ2=21.0  ⟹  σ≈4.580.50 (Maximum uncertainty)0.50×0.50=0.25σ2=25.0  ⟹  σ=5.00.700.70×0.30=0.21σ2=21.0  ⟹  σ≈4.580.90 (Almost certain)0.90×0.10=0.09σ2=9.0  ⟹  σ=3.0\begin{array}{|c|c|c|} \hline \text{Success Probability } p & p(1-p) & \text{Variance for } n = 100 \\ \hline 0.10 \text{ (Rare event)} & 0.10 \times 0.90 = 0.09 & \sigma^2 = 9.0 \implies \sigma = 3.0 \\ 0.30 & 0.30 \times 0.70 = 0.21 & \sigma^2 = 21.0 \implies \sigma \approx 4.58 \\ \mathbf{0.50\ (Maximum\ uncertainty)} & \mathbf{0.50 \times 0.50 = 0.25} & \mathbf{\sigma^2 = 25.0 \implies \sigma = 5.0} \\ 0.70 & 0.70 \times 0.30 = 0.21 & \sigma^2 = 21.0 \implies \sigma \approx 4.58 \\ 0.90 \text{ (Almost certain)} & 0.90 \times 0.10 = 0.09 & \sigma^2 = 9.0 \implies \sigma = 3.0 \\ \hline \end{array}

[!TIP] When an event is extremely rare (p→0p \to 0) or virtually guaranteed (p→1p \to 1), the outcome is highly predictable, meaning the variance is very small. The spread is greatest when an outcome is completely uncertain (p=0.5p = 0.5).


4. The Two-Standard-Deviation (μ±2σ\mu \pm 2\sigma) Rule for Outliers

In paper examinations, you are often asked: "Is an observed count of successes unusually high or low?"

A standard statistical guideline classifies an observation as unusual (an outlier) if it lies more than 22 standard deviations away from the mean:

Lower Usual Bound=μ−2σUpper Usual Bound=μ+2σ\begin{aligned} \text{Lower Usual Bound} &= \mu - 2\sigma \\ \text{Upper Usual Bound} &= \mu + 2\sigma \end{aligned}
  • An observed value kk is considered usual if μ−2σ≤k≤μ+2σ\mu - 2\sigma \le k \le \mu + 2\sigma.
  • An observed value kk is considered unusual if k<μ−2σk < \mu - 2\sigma or k>μ+2σk > \mu + 2\sigma.

5. Step-by-Step Worked Examples

Worked Example 1: Hundred Coin Flips and Unusual Outliers

Problem: A researcher tests a suspected loaded coin by tossing it n=100n = 100 times. Assuming the coin is fair (p=0.50p = 0.50):

  1. Calculate the expected number of Heads μ\mu.
  2. Calculate the variance σ2\sigma^2 and standard deviation σ\sigma.
  3. Establish the usual range [μ−2σ,μ+2σ][\mu - 2\sigma, \mu + 2\sigma].
  4. The coin lands on Heads 6868 times. Is this result statistically unusual?

Step 1: Identify Parameters

  • n=100n = 100
  • p=0.5p = 0.5
  • q=1−0.5=0.5q = 1 - 0.5 = 0.5

Step 2: Compute Mean and Variance

μ=np=100×0.5=50 headsσ2=npq=100×0.5×0.5=25 heads2σ=σ2=25=5 heads\begin{aligned} \mu &= n p = 100 \times 0.5 = 50\text{ heads} \\ \sigma^2 &= n p q = 100 \times 0.5 \times 0.5 = 25\text{ heads}^2 \\ \sigma &= \sqrt{\sigma^2} = \sqrt{25} = 5\text{ heads} \end{aligned}

Step 3: Compute the Usual Range

Lower Bound=μ−2σ=50−2(5)=50−10=40Upper Bound=μ+2σ=50+2(5)=50+10=60\begin{aligned} \text{Lower Bound} &= \mu - 2\sigma = 50 - 2(5) = 50 - 10 = 40 \\ \text{Upper Bound} &= \mu + 2\sigma = 50 + 2(5) = 50 + 10 = 60 \end{aligned}

The interval of typical outcomes is [40,60][40, 60].

Step 4: Evaluate the Observation

The experiment produced k=68k = 68 Heads. Since 68>6068 > 60 (k>μ+2σk > \mu + 2\sigma), obtaining 6868 heads is unusually high for a fair coin. In fact, the deviation is:

z=68−505=185=+3.6σz = \frac{68 - 50}{5} = \frac{18}{5} = +3.6\sigma

There is strong paper evidence that the coin is biased toward Heads.


Worked Example 2: Industrial Defect Inspection

Problem: An automated assembly line produces smartphone batteries with an established defective rate of 4%4\% (p=0.04p = 0.04). A daily production batch contains n=400n = 400 batteries.

  1. Find the mean number of defective batteries per batch.
  2. Find the variance and standard deviation.

Step 1: Identify Parameters

  • n=400n = 400
  • p=0.04p = 0.04
  • q=1−0.04=0.96q = 1 - 0.04 = 0.96

Step 2: Mean

μ=np=400×0.04=16 defective batteries\mu = n p = 400 \times 0.04 = 16\text{ defective batteries}

Step 3: Variance and Standard Deviation

σ2=npq=400×0.04×0.96=16×0.96=16×(1−0.04)=16−0.64=15.36 batteries2\begin{aligned} \sigma^2 &= n p q = 400 \times 0.04 \times 0.96 \\ &= 16 \times 0.96 \\ &= 16 \times (1 - 0.04) = 16 - 0.64 = 15.36\text{ batteries}^2 \end{aligned}

Take the square root:

σ=15.36≈3.919 batteries\sigma = \sqrt{15.36} \approx 3.919\text{ batteries}

Worked Example 3: Reversing the Formulas (Exam Reverse Problem)

Problem: A discrete random variable XX follows a binomial distribution X∼B(n,p)X \sim B(n, p). A paper examination states that:

  • The mean is μ=24\mu = 24
  • The standard deviation is σ=4\sigma = 4

Find the number of trials nn and the probability of success pp.

Step 1: Set Up the System of Equations

{np=24(Equation 1)np(1−p)=4(Equation 2)\begin{cases} n p = 24 & \text{(Equation 1)} \\ \sqrt{n p (1 - p)} = 4 & \text{(Equation 2)} \end{cases}

Step 2: Square Equation 2 to find Variance

σ2=np(1−p)=42=16\sigma^2 = n p (1 - p) = 4^2 = 16

Step 3: Substitute Equation 1 into Variance

Replace npn p with 2424:

24(1−p)=161−p=1624=23p=1−23=13\begin{aligned} 24(1 - p) &= 16 \\ 1 - p &= \frac{16}{24} = \frac{2}{3} \\ p &= 1 - \frac{2}{3} = \frac{1}{3} \end{aligned}

Step 4: Solve for nn

Substitute p=13p = \frac{1}{3} back into Equation 1:

n(13)=24n=24×3=72\begin{aligned} n \left(\frac{1}{3}\right) &= 24 \\ n &= 24 \times 3 = 72 \end{aligned}

Step 5: Verification Check

  • μ=np=72×13=24✓\mu = n p = 72 \times \frac{1}{3} = 24 \quad \checkmark
  • σ=np(1−p)=72×13×23=24×23=16=4✓\sigma = \sqrt{n p (1 - p)} = \sqrt{72 \times \frac{1}{3} \times \frac{2}{3}} = \sqrt{24 \times \frac{2}{3}} = \sqrt{16} = 4 \quad \checkmark

Final Answer: n=72n = 72 and p=13p = \frac{1}{3}.


6. Common Mistakes & Paper Traps

[!CAUTION] Trap 1: Confusing σ\sigma (Standard Deviation) with σ2\sigma^2 (Variance). In the reverse problem above, students frequently write np(1−p)=4n p (1 - p) = 4 instead of 42=164^2 = 16. Always check whether the given information provides the standard deviation (σ\sigma) or the variance (σ2\sigma^2).

[!WARNING] Trap 2: Forgetting Units. If XX represents the number of defective cars:

  • The mean μ=8 cars\mu = 8\text{ cars}.
  • The standard deviation σ=2.8 cars\sigma = 2.8\text{ cars} (same unit as XX).
  • The variance σ2=7.84 cars2\sigma^2 = 7.84\text{ cars}^2 (squared units). Never attach the unit "cars" to variance on an examination paper.

7. Pencil & Paper Practice

Practice 1

A fair 20-sided die (icosahedron numbered 11 to 2020) is rolled n=300n = 300 times. Let XX count the number of times a multiple of 55 appears (the outcomes {5,10,15,20}\{5, 10, 15, 20\}).

  1. Determine the parameters n,p,qn, p, q.
  2. Calculate the expected count μ=E(X)\mu = E(X).
  3. Calculate the variance and standard deviation of XX.

??? success "Solution to Practice 1" 1. There are 44 multiples of 55 out of 2020 possible faces: math p = \frac{4}{20} = \frac{1}{5} = 0.20 \implies q = 1 - 0.20 = 0.80 = \frac{4}{5} Number of trials: n=300n = 300.

2. Expected count:
```math
\mu = n p = 300 \times \frac{1}{5} = 60\text{ times}
```

3. Variance:
```math
\sigma^2 = n p q = 300 \times \frac{1}{5} \times \frac{4}{5} = 60 \times \frac{4}{5} = 48
```
Standard deviation:
```math
\sigma = \sqrt{48} = \sqrt{16 \times 3} = 4\sqrt{3} \approx 6.928
```

Practice 2

For a binomial distribution X∼B(n,p)X \sim B(n, p), the mean is μ=15\mu = 15 and the variance is σ2=6\sigma^2 = 6.

  1. Find the probability of success pp.
  2. Find the number of trials nn.

??? success "Solution to Practice 2" 1. We know: math \frac{\sigma^2}{\mu} = \frac{n p (1 - p)}{n p} = 1 - p Substitute the numerical values: math 1 - p = \frac{6}{15} = \frac{2}{5} = 0.4 \implies p = 1 - 0.4 = 0.6

2. Now solve for $n$ using $\mu = n p$:
```math
n (0.6) = 15 \implies n = \frac{15}{0.6} = \frac{150}{6} = 25
```

**Check:** $\sigma^2 = 25 \times 0.6 \times 0.4 = 15 \times 0.4 = 6 \quad \checkmark$.

Test yourself

A binomial experiment has n=50n = 50 trials with success probability p=0.2p = 0.2. What is the standard deviation σ\sigma?

  1. 1010
  2. 8≈2.83\sqrt{8} \approx 2.83
  3. 88
  4. 10≈3.16\sqrt{10} \approx 3.16

For a fixed number of trials nn, at what value of pp is the variance of a binomial distribution at its absolute maximum?

  1. p=0.1p = 0.1
  2. p=0.5p = 0.5
  3. p=0.9p = 0.9
  4. p=1.0p = 1.0

If a binomial distribution has mean μ=40\mu = 40 and standard deviation σ=6\sigma = 6, what is the probability of failure q=1−pq = 1 - p?

  1. 0.900.90
  2. 0.150.15
  3. 0.600.60
  4. 0.400.40