The law of
large numbers

An interactive guide to the theorem that makes averages tell the truth. Flip coins, throw darts, spin roulette and train a model, and see why every poll, casino and neural network leans on it.

Every night someone leaves Monte Carlo casino, early 1900s Monte Carlo richer, yet the casino rarely has a losing year. One theorem explains both.

Players around the roulette table in the Monte Carlo casino, engraving on an old postcard
The roulette table at Monte Carlo, on a postcard from about 1910.

Flip a coin, a lot

Flip a fair coin ten times and seven or more heads is unremarkable: it happens about one time in six. Flip it ten thousand times and seven thousand heads would be astonishing. The coin didn't change. Only the number of flips did.

Here is how it settles. Say you're unlucky and get 7 heads in the first 10. The coin has no memory, so the next 990 flips give about half heads, roughly 495.

FlipsHeadsAverage
First 1070.700
Next 990about 4950.500
All 1,000about 5020.502

The two extra heads are never cancelled. They are diluted. That is the whole trick, and it's why "tails is due" is wrong: the average settles by burying early luck under new data, not by correcting it.

Try it. Raise the flips and watch five independent runs squeeze into the shaded band, which narrows like 1/√n. Then switch to Cauchy samples, a distribution with no average at all, and watch the law give up.

Press flip to start.

What it actually says

Take independent samples X₁, X₂, …, Xₙ from the same distribution, whose true mean is μ. Their average gets as close to μ as you like, once n is large enough.

X̄ₙ = (X₁ + X₂ + ⋯ + Xₙ) / n  →  μ   as n → ∞

It comes in two strengths. The weak law: for any margin ε, the chance that the average misses μ by more than ε shrinks to zero. The strong law: with probability one, the sequence of averages actually converges to μ and stays there.

The weak law, in four lines

  1. Each sample has variance σ². Independent variances add, so the sum has variance nσ².
  2. Dividing the sum by n divides its variance by n², so Var(X̄ₙ) = σ²/n.
  3. Chebyshev's inequality: P(|X̄ₙ − μ| ≥ ε) ≤ Var(X̄ₙ)/ε² = σ²/(nε²).
  4. The right side goes to 0 as n grows. That is the weak law.

Notice what the proof leaned on: independence in line 1 and a finite σ² in line 3. Remove either and the guarantee goes with it. Sharper versions can drop the finite variance, but never the finite mean.

Portrait of Jacob Bernoulli
Jacob Bernoulli, painted by his brother Niklaus in 1687.

Where it came from

1713 Title page of Ars Conjectandi, Basel, 1713

Ars Conjectandi is published in Basel, eight years after Jacob Bernoulli's death. It holds the first proof that observed frequencies converge to the true probability: the bridge from "I saw heads 60% of the time" to "the chance of heads is 60%".

20 years

How long Bernoulli said he worked on it. He called it his golden theorem.

1837 Portrait of Siméon Denis Poisson

Siméon Denis Poisson names it la loi des grands nombres. The name sticks.

Precision is expensive

The typical error of an average is σ/√n, where σ is the spread of a single sample (0.5 for a coin). The square root is the price tag: to halve the error you need four times the data, and every extra decimal place costs a hundred times more.

So how large is large? Large enough that σ/√n is smaller than the error you can live with. Each pixel below is one flip, phosphor for heads.

100 flips

Typically within 5 points of 50%.

10,000 flips

Typically within half a point.

1,000,000 flips

Typically within 0.05 points. A hundred times the flips of the middle tile, for one more decimal.

Read the small print

Averaging removes noise. It never removes bias. Most real failures of the law are failures of its assumptions.

What it promises

Where it breaks

Where it runs today

Where it runs today

Training a model is the same bet: we can't measure its error on every possible input, so we minimise the average error on samples and trust the law that the two are close. That is empirical risk minimisation, and it works only while the samples look like the world.

Look at how they miss

Each experiment below is 100 coin flips. Each pixel is one experiment's final average, dropped into its column. The averages arrive near 0.5, as promised. Now watch the misses pile up.

Coins, darts, gradients, roulette: average anything and the misses stack into this same shape.

Why that shape, every time? That's the next issue.