Law of Large Numbers
The law of large numbers says that the sample mean X̄ₙ of n independent random variables with the same distribution and mean μ gets close to μ as n grows. The weak law states that for every ε > 0, P(|X̄ₙ − μ| ≥ ε) → 0 as n → ∞. It is why long-run averages are stable.
Before this lesson: Markov and Chebyshev Inequalities, Independent Random Variables and Introduction to Limits
Why averages settle down
Flip a fair coin 10 times and you might get 8 heads, a proportion of 0.8. Flip it 1,000 times and the proportion is almost always close to 0.5. One flip is unpredictable, but the average of many flips is not.
The reason is variance. Each flip has variance 1/4, but the average of n independent flips has variance 1/(4n). As n grows, the spread of the average shrinks toward 0, so the average piles up around the true mean.
Law of large numbers statement
Let X₁, X₂, … be independent random variables with the same distribution, mean μ and finite variance σ². The sample mean of the first n is
\bar{X}_n = \dfrac{X_1 + X_2 + \cdots + X_n}{n}, \qquad E(\bar{X}_n) = \mu, \qquad \operatorname{Var}(\bar{X}_n) = \dfrac{\sigma^2}{n}Weak law of large numbers
For every ε > 0, the chance that X̄ₙ misses μ by ε or more goes to 0. This is called convergence in probability. Chebyshev’s inequality also gives a bound for each n:
\lim_{n \to \infty} P\left(|\bar{X}_n - \mu| \ge \varepsilon\right) = 0, \qquad P\left(|\bar{X}_n - \mu| \ge \varepsilon\right) \le \dfrac{\sigma^2}{n\varepsilon^2}Strong law of large numbers
With probability 1, the sequence X̄₁, X̄₂, X̄₃, … converges to μ. This is called almost sure convergence. It is a stronger statement, and its proof is beyond this course. The strong law needs only a finite mean, not a finite variance.
Proof of the weak law
E(\bar{X}_n) = \dfrac{1}{n}(\mu + \mu + \cdots + \mu) = \dfrac{n\mu}{n} = \muExpected values add; there are n terms.
\operatorname{Var}(\bar{X}_n) = \dfrac{1}{n^2}(\sigma^2 + \cdots + \sigma^2) = \dfrac{n\sigma^2}{n^2} = \dfrac{\sigma^2}{n}Independent, so variances add (see combining random variables); constants come out squared.
P\left(|\bar{X}_n - \mu| \ge \varepsilon\right) \le \dfrac{\sigma^2/n}{\varepsilon^2} = \dfrac{\sigma^2}{n\varepsilon^2}Chebyshev’s inequality with c = ε.
0 \le P\left(|\bar{X}_n - \mu| \ge \varepsilon\right) \le \dfrac{\sigma^2}{n\varepsilon^2} \to 0σ² and ε are fixed, so the bound goes to 0 as n → ∞.
\lim_{n \to \infty} P\left(|\bar{X}_n - \mu| \ge \varepsilon\right) = 0The probability is squeezed to 0 (see squeeze theorem).
Law of large numbers examples
Example 1: Ten thousand coin flips (word problem)
A fair coin is flipped 10,000 times. Use the weak law bound to estimate how likely it is that the proportion of heads p̂ is 0.02 or more away from 0.5.
\mu = 0.5, \quad \sigma^2 = 0.5(1 - 0.5) = 0.25
Each flip is 1 for heads and 0 for tails, a Bernoulli variable with p = 0.5.
P(|\hat{p} - 0.5| \ge 0.02) \le \dfrac{0.25}{10{,}000 \cdot 0.02^2}Weak law bound with n = 10,000 and ε = 0.02.
10{,}000 \cdot 0.02^2 = 10{,}000 \cdot 0.0004 = 4Simplify the denominator.
P(|\hat{p} - 0.5| \ge 0.02) \le \dfrac{0.25}{4} = 0.0625Divide.
Answer: at most 0.0625, so the proportion lands between 0.48 and 0.52 with probability at least 0.9375. The true probability is far smaller; the bound is a guarantee, not an estimate.
Example 2: How many die rolls?
A fair die has mean 3.5 and variance 35/12. How many rolls n guarantee, by the Chebyshev bound, that the average roll is within 0.1 of 3.5 with probability at least 0.95?
P(|\bar{X}_n - 3.5| \ge 0.1) \le \dfrac{35/12}{n(0.1)^2}Weak law bound with ε = 0.1.
\dfrac{35/12}{0.01n} \le 0.05The miss probability must be at most 1 − 0.95 = 0.05.
\dfrac{35}{12} \le 0.0005nMultiply both sides by 0.01n.
n \ge \dfrac{35}{12 \cdot 0.0005} = \dfrac{35}{0.006} \approx 5833.3Divide both sides by 0.0005.
Answer: n = 5,834 rolls are enough. The variance of a die comes from the expected value formula: E(X²) − 3.5² = 91/6 − 49/4 = 35/12.
Example 3: Insurance claims (word problem)
An insurer writes 10,000 independent policies. Each policy’s yearly claim has mean $500 and standard deviation $2,000. Bound the probability that the average claim per policy is $100 or more away from $500.
\sigma^2 = 2000^2 = 4{,}000{,}000Square the standard deviation.
n\varepsilon^2 = 10{,}000 \cdot 100^2 = 100{,}000{,}000n = 10,000 and ε = 100.
P(|\bar{X}_n - 500| \ge 100) \le \dfrac{4{,}000{,}000}{100{,}000{,}000} = 0.04Weak law bound.
Answer: at most 0.04. One policy is a gamble, since a single claim can be huge, but the average over many policies is predictable. This is why insurance works.
Example 4: Estimating an integral by simulation
To estimate the integral of x² from 0 to 1, a computer draws n = 1,000 values U from the uniform distribution on [0, 1] and averages U². Find the target value and bound the chance the estimate is off by 0.05 or more.
\mu = E(U^2) = \int_0^1 u^2\,du = \dfrac{1}{3}The average of U² estimates its mean, which is the integral (see uniform distribution).
E(U^4) = \int_0^1 u^4\,du = \dfrac{1}{5}Needed for the variance.
\sigma^2 = \dfrac{1}{5} - \left(\dfrac{1}{3}\right)^2 = \dfrac{9}{45} - \dfrac{5}{45} = \dfrac{4}{45}Var(U²) = E(U⁴) − [E(U²)]².
n\varepsilon^2 = 1000 \cdot 0.05^2 = 2.5
n = 1,000 and ε = 0.05.
P\left(|\bar{X}_n - \tfrac{1}{3}| \ge 0.05\right) \le \dfrac{4/45}{2.5} = \dfrac{8}{225} \approx 0.0356Weak law bound.
Answer: the estimate targets 1/3, and it misses by 0.05 or more with probability at most about 0.0356. This method of estimating a number by averaging random draws is called Monte Carlo simulation.
Example 5: What the law does not say (word problem)
After 100 flips of a fair coin, Dana has 60 heads. She flips 900 more times. Find the expected number of heads after all 1,000 flips, the expected proportion, and the expected excess of heads over 500.
E(\text{heads in next } 900) = 900 \cdot 0.5 = 450The coin has no memory, so each new flip has P(heads) = 0.5.
E(\text{total heads}) = 60 + 450 = 510Add the 60 heads already seen.
E(\text{proportion}) = \dfrac{510}{1000} = 0.51Divide by 1,000 flips.
E(\text{excess}) = 510 - 500 = 10Compare with half of 1,000.
Answer: 510 heads expected, a proportion of 0.51, with an expected excess of 10 heads, the same 10 as after 100 flips. The proportion moves toward 0.5 because the early surplus is diluted by many new flips, not because tails become “due”. Expecting tails to catch up is the gambler’s fallacy.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Gambler’s fallacy | “Ten heads in a row, so tails is due” | Each flip is still 50–50; the law works by dilution, not correction. |
| Expecting the count gap to shrink | Thinking heads − n/2 goes to 0 | Only the proportion settles; the gap in counts typically grows like √n. |
| Applying the law to small samples | Expecting 5 heads in 10 flips | The law is about large n; small samples vary a lot. |
| Using it when the mean does not exist | Averaging Cauchy variables and expecting them to settle | The law needs a finite mean; the Cauchy average never settles. |
| Confusing it with the central limit theorem | Saying the law makes X̄ₙ normal | The law says X̄ₙ → μ; the CLT describes the normal shape of the error. |
| Using σ instead of σ² in the bound | σ/(nε²) | The bound is σ²/(nε²). |
Related ideas
The central limit theorem
The law of large numbers says X̄ₙ → μ. The central limit theorem adds that the error X̄ₙ − μ is about normal with standard deviation σ/√n, which gives much sharper probabilities than Chebyshev’s bound.
Simulation
Every probability simulation relies on this law: the long-run proportion of trials where an event happens estimates its probability.
Sampling distributions
The formulas E(X̄ₙ) = μ and SD(X̄ₙ) = σ/√n are the center and spread of the sampling distribution of a sample mean in Statistics.
Practice problems
- X₁, …, X₁₀₀ are independent with mean 10 and variance 4. Find E(X̄₁₀₀) and Var(X̄₁₀₀).
- For the variables in Problem 1, bound P(|X̄₁₀₀ − 10| ≥ 0.5).
- A fair coin is flipped 2,500 times. Bound P(|p̂ − 0.5| ≥ 0.05).
- How many flips of a fair coin make the Chebyshev bound for P(|p̂ − 0.5| ≥ 0.01) at most 0.05?
- Waiting times are independent and exponential with mean 2 and variance 4. How large must n be so that the bound for P(|X̄ₙ − 2| ≥ 0.2) is at most 0.1?
- A $1 bet on red in American roulette wins $1 with probability 18/38 and loses $1 with probability 20/38. Find the expected result per bet and the approximate total result after 10,000 bets.
- After 20 flips of a fair coin you have 14 heads. You flip 180 more times. Find the expected proportion of heads after all 200 flips.
- How large must n be for SD(X̄ₙ) to be one tenth of σ?
- A simulation estimates P(U ≤ 0.3) = 0.3 by the proportion of n = 2,100 uniform draws below 0.3. Bound the chance that the estimate is off by 0.02 or more.
- Find the Chebyshev bound for P(|p̂ − 0.5| ≥ 0.1) with n = 10 coin flips. What does it tell you?
Show answers
1.
E(\bar{X}_{100}) = 10The mean of X̄ₙ is μ.
\operatorname{Var}(\bar{X}_{100}) = \dfrac{4}{100} = 0.04The variance of X̄ₙ is σ²/n.
Answer: mean 10, variance 0.04
2.
P(|\bar{X}_{100} - 10| \ge 0.5) \le \dfrac{4}{100 \cdot 0.25} = \dfrac{4}{25} = 0.16Weak law bound with ε² = 0.25.
Answer: at most 0.16
3.
P(|\hat{p} - 0.5| \ge 0.05) \le \dfrac{0.25}{2500 \cdot 0.0025} = \dfrac{0.25}{6.25} = 0.04σ² = 0.25 and ε² = 0.0025.
Answer: at most 0.04
4.
\dfrac{0.25}{n \cdot 0.0001} \le 0.05Bound with ε² = 0.0001.
0.25 \le 0.000005n \implies n \ge 50{,}000Multiply by 0.0001n, then divide by 0.000005.
Answer: 50,000 flips
5.
\dfrac{4}{n \cdot 0.04} = \dfrac{100}{n} \le 0.1Bound with σ² = 4 and ε² = 0.04.
n \ge \dfrac{100}{0.1} = 1000Solve for n.
Answer: n ≥ 1,000
6.
E(X) = 1 \cdot \dfrac{18}{38} + (-1) \cdot \dfrac{20}{38} = -\dfrac{2}{38} = -\dfrac{1}{19} \approx -0.0526Expected value of one bet.
10{,}000 \cdot \left(-\dfrac{1}{19}\right) \approx -526By the law, the average per bet is near −1/19, so the total is near 10,000 times it.
Answer: about −$0.053 per bet; a loss of about $526 over 10,000 bets
7.
E(\text{heads}) = 14 + 180 \cdot 0.5 = 14 + 90 = 104New flips average 0.5 heads each.
\dfrac{104}{200} = 0.52Divide by 200 flips.
Answer: 0.52
8.
\dfrac{\sigma}{\sqrt{n}} = \dfrac{\sigma}{10} \implies \sqrt{n} = 10 \implies n = 100SD(X̄ₙ) = σ/√n; square both sides.
Answer: n = 100
9.
\sigma^2 = 0.3(1 - 0.3) = 0.21
Each draw gives an indicator with p = 0.3.
P(|\hat{p} - 0.3| \ge 0.02) \le \dfrac{0.21}{2100 \cdot 0.0004} = \dfrac{0.21}{0.84} = 0.25Weak law bound.
Answer: at most 0.25
10.
\dfrac{0.25}{10 \cdot 0.01} = \dfrac{0.25}{0.1} = 2.5Bound with n = 10 and ε² = 0.01.
Answer: 2.5, which is more than 1, so it tells you nothing; the bound only becomes useful for large n.
Law of large numbers FAQ
What does the law of large numbers say in simple terms?
If you repeat an experiment many times independently, the average of the results gets close to the expected value and stays close. For example, the proportion of heads in many fair coin flips gets close to 0.5.
What is the difference between the weak and strong law of large numbers?
The weak law says that for each large n, a big miss |X̄ₙ − μ| ≥ ε is unlikely. The strong law says that with probability 1 the whole sequence X̄ₙ converges to μ, which is a stronger kind of convergence.
Does the law of large numbers mean things even out?
Not in the way most people think. Past results are never corrected; they are diluted by many new results. Believing a coin is “due” for tails is the gambler’s fallacy.
How is the law of large numbers different from the central limit theorem?
The law of large numbers says where the sample mean goes: to μ. The central limit theorem says how the sample mean is spread around μ along the way: approximately normal, with standard deviation σ/√n.
Summary
- X̄ₙ has mean μ and variance σ²/n, so its spread shrinks as n grows.
- Weak law: for every ε > 0, P(|X̄ₙ − μ| ≥ ε) → 0, with the bound σ²/(nε²) from Chebyshev’s inequality.
- Strong law: X̄ₙ → μ with probability 1.
- Averages settle by dilution, not by correction; the gambler’s fallacy is a misreading of the law.
- The law underlies insurance, polling and simulation.
Previous lesson: Markov and Chebyshev Inequalities
Next: this is the last lesson in Probability Theory. Review any topic from the course index below.
Back to the Probability Theory Index