Law of Large Numbers: Why Averages Converge

simulator beginner ~8 min
Loading simulation...
μ → 0.500 — convergence guaranteed

For coin flips, the running average of heads (1) and tails (0) converges to 0.5. After 1000 trials, the average is typically within 0.03 of the true mean.

Formula

P(|X̄ₙ - μ| > ε) ≤ σ²/(nε²) — Chebyshev's inequality (weak LLN)
SE = σ/√n — Standard error of the mean

The Bedrock of Statistics

The law of large numbers is perhaps the most important theorem in probability. It states a simple but profound truth: as you collect more data, the average converges to the true expected value. Flip a fair coin 10 times and you might get 70% heads. Flip it 10,000 times and you'll be within a fraction of a percent of 50%. This convergence is not just likely — it's mathematically guaranteed for any distribution with a finite mean.

Convergence at 1/√n

The rate of convergence follows a precise mathematical law: the standard error of the mean equals σ/√n, where σ is the standard deviation and n is the sample size. This means quadrupling your data halves the uncertainty. To get 10× more precision, you need 100× more data. This square-root scaling is why political polls survey thousands (not millions) of people — 1,000 respondents give about 3% margin of error.

Watching Convergence

The simulation plots the running average as samples accumulate. Initially the line is volatile, jumping with each new sample. As more data arrives, the oscillations shrink and the average settles toward the dashed true-mean line. The shaded confidence bounds (±σ/√n) narrow visibly, funneling the average toward convergence. Try different distributions to see that convergence works for all of them.

Why It Matters Everywhere

The law of large numbers is why insurance companies can predict total claims, why casinos always win in the long run, and why scientific experiments are repeatable. It's the mathematical foundation for polling, clinical trials, quality control, and machine learning. Without it, collecting data would be pointless — no amount of evidence would bring us closer to the truth.

FAQ

What does the law of large numbers say?

The law of large numbers states that as the number of independent trials increases, the sample average converges to the expected value (population mean). The weak law guarantees convergence in probability; the strong law guarantees almost sure convergence.

How fast does the average converge?

The standard error of the mean decreases as σ/√n, where σ is the standard deviation and n is the number of trials. Quadrupling the sample size halves the deviation. This 1/√n rate applies regardless of the underlying distribution.

Does the law of large numbers apply to all distributions?

It applies to any distribution with a finite expected value. Distributions without finite means (like the Cauchy distribution) are exceptions — their sample averages don't converge. For all practical distributions (normal, exponential, uniform, Poisson, etc.), convergence is guaranteed.

Is the law of large numbers the same as the Central Limit Theorem?

No. The LLN says the sample mean converges to the population mean. The CLT says the distribution of the sample mean approaches a normal distribution. The LLN tells you where the average goes; the CLT tells you the shape of the uncertainty around it.

Sources

Embed

<iframe src="https://homo-deus.com/lab/probability/law-of-large-numbers/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub