The Law of Large Numbers (LLN)
The Law of Large Numbers is a fundamental theorem in probability that describes the result of performing the same experiment a large number of times.
It mathematically proves what our intuition already tells us: over the long run, random events balance out to their expected averages.
Core Concept
There are two versions of the Law of Large Numbers (Weak and Strong), but both share the same practical application:
As the number of identically distributed, randomly generated variables increases, their sample mean (average) approaches their theoretical expected value (true mean).
Let be the average of independent trials, and let be the true expected value. As , we have:
Mathematical Depth: Weak vs. Strong
Statisticians distinguish between two "levels" of how this average approaches the mean.
1. The Weak Law (Convergence in Probability)
The Weak Law states that for any small number , the probability that the average is far from the mean vanishes as grows. Intuition: It's very unlikely that the average will be wrong if you have enough data.
2. The Strong Law (Almost Sure Convergence)
The Strong Law is more powerful. It states that the average will converge to the mean with "probability 1." Intuition: The average is guaranteed to be right eventually. The "jagged lines" in the simulation below are mathematically forced to settle on the mean.
Why Does This Matter?
- Casinos & Insurance: A casino doesn't know if the next person to play roulette will win or lose. But because of the LLN, they know with absolute mathematical certainty that if 100,000 people play, the casino will keep exactly 5.26% of the money bet.
- Machine Learning: We train neural networks over thousands or millions of iterations (epochs) because we rely on the LLN to average out noisy gradients and converge on a true optimal solution.
The Gambler's Fallacy
The LLN only applies to large numbers. It does not mean a small sample will perfectly balance out. If you flip a coin and get 5 Tails in a row, the LLN does not say that the next flip is "due" to be Heads. The coin has no memory. The LLN simply says that if you keep flipping 10,000 more times, those 5 initial Tails will be mathematically drowned out by the massive volume of new 50/50 flips.
Interactive Visualization: The Drunkard's Walk to the Mean
In this simulation, we are flipping a fair coin where the True Mean (Expected Value) is exactly 0.5. Click "Start Flipping Coin" to simulate flipping the coin rapidly.
Notice how wildly the running average swings in the beginning when the sample size is small. But as the number of flips crosses 100, 500, and 1000, the jagged line flattens out and stubbornly locks itself to the red dashed line (the true mean).
Law of large numbers
Flip a fair coin and watch the running average converge to 0.5.
Test Your Knowledge
Example: Law of Large Numbers (Casino)
A roulette wheel has an expected value of -50. The casino owner isn't worried. Why does the LLN explain the casino's confidence?
View Step-by-Step Solution
The Law of Large Numbers states that as the number of trials () approaches infinity, the actual sample average converges strictly to the theoretical Expected Value.
You only played times. In small samples, variance rules and extreme outcomes (like you winning n = 1,000,0000.05 per spin, cementing their edge regardless of short-term anomalies.