Flip a coin 10 times. You get 8 heads. Does the universe now owe you extra tails to even things out?
No. And that gap between what feels true and what's actually true is exactly what the law of large numbers is about.
Flip that same coin 10,000 times, and you'll land almost exactly on 50% heads. Not because of some cosmic correction. Not because tails "catch up." Because of something much simpler: one weird flip barely matters once it's diluted by thousands of ordinary ones.
That's the whole idea. Let's build it up from scratch.
What does "in the long run" actually mean?
Every time you flip a coin, you get a number: 1 for heads, 0 for tails. After flips, you can compute the running average, the fraction of heads so far.
After 1 flip, that average is either 0 or 1. Wildly unstable. After 10 flips, it might be 0.3 or 0.7. Still noisy. But keep flipping, and something happens: the average stops swinging around and settles in, closer and closer to 0.5.
Watch the running average of coin flips settle down. It doesn't correct toward 0.5, it just gets buried under more data.
Press play and watch the line. Early on it jerks around, a few heads in a row can send it way up. But as grows, each new flip is worth less. Flip number 5 can move the average by a lot. Flip number 5,000 barely moves it at all.
That's the law of large numbers, in its most basic form: as you collect more data, your running average converges toward the true expected value.
Why does averaging kill the noise?
Here's the intuition. Every single flip has some "error", the difference between that flip's outcome (0 or 1) and the true average (0.5). Some flips are +0.5 off, some are −0.5 off.
When you average flips together, you're not just averaging the outcomes, you're averaging their errors too. And errors from independent flips don't all point the same direction. Some cancel out. The total error grows slower than the number of flips does.
Here's the part that actually explains the shrinking: the total error across flips grows roughly like , but you're dividing that error by itself. So the error in your average shrinks like:
where is how spread out a single flip's outcome is. Double , and your error shrinks, but only by a factor of , not 2. Quadruple , and the error is cut in half.
Each faint line is one full run of coin flips. Drag the slider to add more runs, and watch them all get trapped inside the same shrinking funnel.
Drag the slider up and add more independent runs to the chart. Every single one wanders early on, but they all end up squeezed inside that same shrinking funnel, because they're all governed by the same shrinkage, regardless of what any individual run happened to do early.
Does averaging more actually shrink the spread, or does it just look that way?
Let's test it with something less abstract than coins: dice. Roll one die, and the outcome could be anywhere from 1 to 6. Roll dice and average them, and that average is way more likely to land near 3.5 than at either extreme.
Roll n dice, average them, repeat 400 times. Drag n up and watch the spread of those averages tighten around 3.5.
Set and the histogram is flat, every outcome from 1 to 6 is equally likely, no surprise there. Now drag up to 20 or 30. Watch the histogram collapse into a tight spike around 3.5. Same dice, same randomness per roll, but the average of many rolls is far more predictable than any single roll.
Notice the "predicted σ/√n" readout tracks the observed spread almost exactly. That's not a coincidence, it's the same shrinkage from the last section, just measured on a different random process.
Doesn't the universe owe you a correction after a streak?
Here's where people usually get it backwards. Say you flip 15 heads in a row. Surely tails is "due", right? The average has to catch up somehow?
It doesn't. Each flip is independent. The coin has no memory of the last 15 flips. The probability of heads on flip 16 is exactly 0.5, no matter what came before. This mistaken belief that outcomes "owe" a correction is called the gambler's fallacy, and it's the single most common misunderstanding of the law of large numbers.
Force a streak of heads at the start, then let the rest of the flips run free. The next flip is still 50/50, always, no matter how long the streak.
Force a long streak of heads with the slider, then look at what happens next. The average doesn't dip below 0.5 to compensate. It just keeps flipping normally, 50/50, flip after flip, and given enough of them, that early streak gets diluted into irrelevance, not corrected.
If you forced 15 heads and then flip 485 more times normally, that early streak contributes 15 out of 500 flips. Its influence on the final average shrinks automatically, just from being outnumbered. The law of large numbers works by swamping, not by correcting.
The formal statement
Now that the idea is solid, here's how to write it. Let be independent outcomes of the same random process (like our coin or die), each with true expected value (0.5 for a fair coin, 3.5 for a die). Define the running average as:
The law of large numbers says:
And the rate of that convergence, how fast the wobble dies down, comes from the variance formula we saw earlier:
Notice this says nothing about individual outcomes becoming predictable. Flip 10,001 is still a coin flip, still 50/50. What becomes predictable is the average, and only because is in the denominator, quietly shrinking every source of randomness as it grows.
The short version
Individual random outcomes stay random forever. No amount of flipping makes flip number one million more predictable than flip number one. But averages of random outcomes get more predictable, because each new data point contributes less to the total than the last, mathematically, its weight is , and that weight shrinks as grows.
There's no correction happening. No compensation. No universe balancing the books. Just more flips, more dice, more data, quietly diluting whatever randomness came before. That's the entire mechanism behind casinos, insurance companies, polling, and pretty much every statistic you've ever trusted.
All visualizations are interactive React components running entirely in your browser, generating fresh random flips and rolls on every load. No libraries beyond React.