Laws of Large Numbers
Weak and strong laws, convergence in probability vs almost surely, and what they justify about sample means.
Assumes you know
Laws of Large Numbers
Intuition first
Flip a fair coin ten times and you might see 7 heads. Flip it ten thousand times and the proportion will be very close to 0.5. The law of large numbers is the formal version of that observation: sample averages converge to the true mean as the sample grows.
This is the theorem that licenses statistics. Without it, there would be no reason to think a sample mean tells you anything about a population mean.
Two versions exist, differing in the sense in which convergence happens. The weak law says the sample mean is probably close to for large . The strong law says the sequence of sample means actually converges to along almost every infinite run. The weak law allows rare excursions to keep occurring forever; the strong law does not.
Both require a finite mean. Neither says anything about how fast convergence happens — that is the Central Limit Theorem's job.
The weak law
For i.i.d. with finite mean , for every :
Written , read "converges in probability".
Proof from Chebyshev, assuming finite varianceAdvanced
Assume additionally that . We know exactly:
Apply Chebyshev's inequality to , whose standard deviation is :
For fixed , the right side tends to 0 as . That is the weak law.
Three lines, and it also hands you a quantitative version: to make the failure probability at most ,
The finite-variance assumption is convenient but not necessary — Khinchine's theorem proves the weak law under a finite mean alone, using characteristic functions rather than Chebyshev.
The strong law
Written , read "converges almost surely".
| Symbol | Meaning | Read aloud |
|---|---|---|
| X̄ₙ | Sample mean of the first n observations | X bar n |
| →ᴾ | Convergence in probability (weak law) | converges in probability |
| →ᵃ·ˢ· | Almost sure convergence (strong law) | converges almost surely |
| ε | Tolerance for being 'close' | epsilon |
Solved problem 1 · How much data does the LLN actually need?
A fair die is rolled times. Using Chebyshev, find such that the sample mean is within of with probability at least . Then compare with the CLT's answer.
Step 1 — the parent moments
From earlier lessons:
Step 2 — apply the Chebyshev bound
We need , and Chebyshev gives
Step 3 — solve
So .
Step 4 — the CLT answer, for comparison
Assuming is approximately normal with SE , a 95% interval needs
Step 5 — interpret the gap
Chebyshev demands 5.2 times more data. The difference is the price of making no shape assumption: Chebyshev must hold even for the most adversarial distribution with variance , while the CLT exploits the fact that averages of 1,000 dice rolls really are near-normal.
Answer
Chebyshev requires ; the CLT-based calculation gives . Both are correct — the first is a guarantee, the second an approximation that is very accurate at this sample size.
Where the law fails
Infinite or undefined mean. The Cauchy distribution has no finite mean, and its sample mean has the same Cauchy distribution as a single draw. Averaging a million Cauchy values is no more informative than taking one.
Dependence. Strongly correlated observations break the step. If every observation is identical, and no convergence occurs at all. Weak-dependence versions of the law exist, with an effective sample size smaller than .
Heavy but finite variance. The law still holds, but convergence can be so slow as to be useless in practice — a Pareto distribution with tail index just above 2 may need millions of observations before the sample mean stabilises.
import numpy as np
rng = np.random.default_rng(0)
# Convergence of the running mean for a fair die.
rolls = rng.integers(1, 7, 1_000_000)
running = np.cumsum(rolls) / np.arange(1, len(rolls) + 1)
print("n running mean |error|")
for n in (10, 100, 1_000, 10_000, 100_000, 1_000_000):
print(f"{n:>9,} {running[n-1]:12.5f} {abs(running[n-1] - 3.5):.5f}")
# Sample size: Chebyshev guarantee vs CLT approximation.
sigma2, eps, delta = 35/12, 0.1, 0.05
print(f"\nChebyshev n >= {np.ceil(sigma2/(delta*eps**2)):.0f}")
print(f"CLT n >= {np.ceil((1.96*np.sqrt(sigma2)/eps)**2):.0f}")
# The gambler's fallacy: proportion converges, absolute surplus does not.
flips = rng.integers(0, 2, 1_000_000)
surplus = np.cumsum(2*flips - 1) # heads minus tails
print("\nn proportion heads-minus-tails")
for n in (100, 10_000, 1_000_000):
print(f"{n:>9,} {flips[:n].mean():10.5f} {surplus[n-1]:+8d}")
# Cauchy: the law does not apply.
c = rng.standard_cauchy(1_000_000)
cr = np.cumsum(c) / np.arange(1, len(c) + 1)
print("\nCauchy running mean (never settles):")
for n in (1_000, 100_000, 1_000_000):
print(f" n={n:>9,} {cr[n-1]:+10.4f}")The third block is the instructive one: the proportion of heads marches towards 0.5 while the absolute surplus drifts further from zero — both at once, and not in contradiction.
Exercise 1
Explain why the law of large numbers does not guarantee that a casino always profits on any given night.
Show solutionHide solution
The law is asymptotic. It says the average outcome per bet converges to the expected value as the number of bets grows without bound, and says nothing about any finite number.
For a game with a 2% house edge, the casino's average profit per unit staked tends to 0.02. But over a single night's bets, the realised average has standard error , and for modest that can easily exceed 0.02 — so a losing night is entirely possible.
The relevant quantity is the ratio of edge to noise:
which grows like . The edge accumulates linearly in while the fluctuation grows only as , so the probability of an overall loss falls as volume rises — but it is never zero for finite .
This is also why casinos impose table limits. A single enormous bet makes effectively 1, where the edge is irrelevant and variance dominates. Their business model requires many small independent bets, which is precisely the setting the law of large numbers describes.
Exercise 2
Give an example of a sequence converging in probability but not almost surely, to show the two laws genuinely differ.
Show solutionHide solution
Let be independent with
Convergence in probability to 0. For any ,
So .
No almost sure convergence. By the second Borel–Cantelli lemma, since the are independent and
the event occurs infinitely often with probability 1. So along almost every infinite sequence there are arbitrarily late times at which , and the sequence never settles at 0.
The two notions differ exactly here: the probability of a deviation at each fixed time goes to zero, yet deviations keep happening forever because diverges. Had the probabilities been instead, the sum would converge and Borel–Cantelli would give almost sure convergence too.
Next: The Central Limit Theorem, which describes not just that the sample mean converges but the shape of its distribution on the way.