TL;DR
If you repeatedly draw independent values from the same distribution and average them, the average settles down. As the number of draws grows, the sample mean gets close to the expected value of a single draw, and the chance that it is far away shrinks toward zero.
This is why casinos profit, why polls work, and why simulation can stand in for a hard calculation. It does not say the average is right after a few draws, and it does not say that a streak of bad results is "owed" a correction.
Where you'll see it: in Monte Carlo estimation of integrals, in A/B tests that run until the averages are stable, and in the reason that the empirical frequency of heads in a long run of coin flips approaches one half.
Intuition
Averages need a crowd
Flip a fair coin once and you get 0 or 1, never one half. Flip it ten times and you might see seven heads, a 70 percent rate, which looks lopsided. Flip it ten thousand times and the rate will almost always sit very close to 50 percent. Each flip is unpredictable, but their average is far more stable than any single flip.
The reason is that each draw pushes the average a little, and the pushes are independent. Some go up and some go down, and over many draws they cancel. Early on the luck of a few draws can dominate. With many draws, each new value moves the average less and less, because it is only one share among many.
- true mean 0.5
- running average of coin flips
The math
Setup
Let be random variables that are independent (see Statistical Independence) and identically distributed, each with expected value . Define the sample mean after draws as
Here is itself a random variable, because it depends on the draws. The law of large numbers says what happens to it as grows.
Weak law
The weak law states that for every fixed tolerance ,
In words: the chance the sample mean is farther than from goes to zero. This is called convergence in probability.
If each has finite variance , the weak law follows from a short calculation. The variance of a sum of independent variables is the sum of their variances (this is where independence is used), so . Chebyshev's inequality then gives
The right side goes to zero as grows, with fixed. That is the whole proof.
Strong law
The strong law states that with probability 1. That is a stronger claim: the set of outcomes where the sample mean fails to converge has probability zero. It says that for almost every infinite sequence of draws, the running average really does settle. The weak law only says that at each large , a bad average is unlikely.
Rate
The weak law says nothing about speed. The central limit theorem fills that in: the typical size of is about . To cut the typical error in half you need four times as many draws.
Worked examples
A fair six-sided die has . Its variance is .
- Take rolls and tolerance . The bound is .
- So the chance that the average of 100 rolls is off from 3.5 by at least 0.5 is at most about 12 percent.
- Take rolls and . The bound is .
- So with 10,000 rolls, the chance of being off by 0.1 or more is at most about 3 percent.
Interpretation: the bound is loose, because Chebyshev's inequality works for any distribution. The real probabilities are smaller. The useful part is the scaling: multiplying by 100 cuts the bound by a factor of 100 at fixed and .
This is the simplest Monte Carlo calculation. Pick a point uniformly at random in the unit square . Let if the point lies inside the quarter circle of radius 1, and otherwise.
- The quarter circle has area and the square has area 1, so .
- Each indicator has variance .
- The estimate of pi is . Its standard error is .
- For points, the standard error is .
- So a typical run lands within about 0.03 of , which is roughly two standard errors.
- To get the error down to 0.001 you would need about times as many points, around 2.7 million.
Interpretation: the law of large numbers guarantees the estimate converges to . The standard error tells you how fast, and it shows why Monte Carlo is useful for high-dimensional problems where grids would be impossible, but slow for high precision.
Tradeoffs and failure modes
The law is powerful, but its conditions matter.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Draws are not independent (correlated time series) | The average can converge to something other than , or converge slowly | Model the dependence, for example with a [[markov-chain |
| Expected value does not exist (heavy tails, such as the Cauchy distribution) | The sample mean does not settle at all | Use the median, or a different scale |
| Too few draws for the question | Early averages look stable but are not | Look at the standard error, not the point estimate |
| Believing in "the law of averages" as a correction | After five heads, tails is not more likely next flip | Remember the law concerns the long-run ratio, not compensation |
| Biased sampling | Averages converge to the wrong value confidently | Fix the sampling process, since more samples cannot remove bias |
The most common error is the gambler's fallacy. The law says the ratio of heads to flips approaches one half. It does not say the excess heads get paid back by future tails. The coin has no memory, so the absolute gap typically grows even as the ratio shrinks.
History
Jakob Bernoulli proved the first version, for coin-like events, and it was published posthumously in his Ars Conjectandi in 1713. He called it his "golden theorem" and hoped it could turn observed frequencies into estimates of probabilities. Siméon Denis Poisson gave the result its French name, "loi des grands nombres", in the 1830s.
Pafnuty Chebyshev proved a general version in the 1860s using the inequality that now bears his name. The modern forms came in the early twentieth century: Aleksandr Khinchin proved the weak law for independent identically distributed variables that need only a finite mean, and Andrey Kolmogorov proved the strong law in the early 1930s. These results made it possible to justify simulation and statistical estimation rigorously, and they are the reason the sample mean is trusted everywhere in data work.
Check yourself
QuestionA coin is fair. After 50 flips you have 30 heads. Does the law of large numbers say the next flips will be mostly tails?Show answer
No. The law concerns the long-run fraction of heads, and each flip is independent of the previous ones. The next flip is still heads with probability one half. The fraction 30/50 = 0.6 will drift toward 0.5 only because later flips add a large number of ordinary, unbiased results, not because tails are owed.
QuestionA variable has mean 10 and variance 4. Using Chebyshev's bound, how large an n do you need so that the probability the sample mean is off by 1 or more is at most 0.01?Show answer
The bound is . Setting gives . Four hundred independent draws are enough for this guarantee, though it is conservative.
QuestionCompute for draws with mean , and explain why it is not the reason the average converges.Show answer
By linearity of expectation, for every , so the expected sample mean is always 7 and never moves toward anything new. Convergence is about the spread of around 7, which shrinks as . Expected value alone does not show the average is stable.
QuestionYou want a Monte Carlo estimate of an integral to within 0.01 with a standard error of about that size. Roughly how does the number of samples scale as you halve the target error?Show answer
The standard error scales as , so halving the error requires four times as many samples. Each halving of the error costs a factor of four in compute, which is why very high precision by plain Monte Carlo is expensive.
QuestionWhy is independence needed for the simple proof of the weak law, and what would break without it?Show answer
The proof uses , which holds when the covariances vanish. Independence guarantees that. Without it, correlated draws can add their deviations together, so the variance of the sample mean may not fall like , and the average can settle slowly or to the wrong value.