LuckPicker

Blog

What a Million Simulated Flips Show

Running the streak simulator to its limits, and what the longest-run numbers actually mean.

The streak simulator on this site will run a hundred thousand flips in a batch and fifty batches at a time. Running it to its limits is a fast way to see how badly intuition about runs performs.

The headline: the longest run of heads grows with the logarithm of the flip count, which means a hundred times more flips gives you about seven more heads in a row. Not seven hundred. Seven.

What the numbers look like

Theory says the expected longest head-run in n fair flips sits near the base-2 logarithm of n. For two hundred flips that is about 7.6; for twenty thousand it is about 14.3; for a hundred thousand it is about 16.6.

Running the simulator confirms the shape rather than the exact figure, which is what an approximation should do. Across ten batches of two hundred, the observed mean longest run lands close to 7.6 and the individual batches range from about five to about eleven.

That spread is the part people find hardest to accept. The same generator, the same settings, and one batch gives you five while the next gives you eleven — from a process that has not changed in any way.

Why logarithmic growth is so counter-intuitive

Most quantities people reason about grow linearly or faster. Twice the flips, twice the heads. Twice the flips, twice the time. Twice the flips, about one more head in a row is not a shape anyone's intuition supplies.

The consequence is that a streak carries almost no information about how long the sequence was. Someone reporting a run of eight is reporting something consistent with about 256 flips — and equally consistent with a hundred thousand flips, because the expected longest run there is only about twice as long.

It also means that streaks in short sequences are proportionally much more startling. In twenty flips, the expected longest run is about 4.3 — so a run of four in twenty flips is entirely ordinary and feels far more remarkable than a run of fourteen in twenty thousand.

The head count, which behaves differently

Alongside the streak figures, the simulator reports the head count per batch, and that number does grow linearly — which makes the contrast instructive when you look at both together.

In two hundred flips, expect about a hundred heads with a typical deviation of about seven. In twenty thousand, expect about ten thousand with a typical deviation of about seventy. The absolute deviation grew tenfold and the proportional deviation shrank tenfold.

Both facts are the same theorem, and holding them at once is what separates using the law of large numbers from misquoting it: averages converge while gaps widen.

What this is actually useful for

The practical application is settling arguments about whether a tool is rigged. A run that felt impossible almost always has an expected frequency you can compute, and computing it is more persuasive than explaining independence.

It is also the fastest available demonstration that a single observation proves nothing. Run ten batches, watch the longest run range from five to eleven, and the argument that one bad session is evidence of anything collapses without needing to be argued against.

And for anyone building something with randomness in it: run the simulation before your users do. Knowing in advance that a thousand encounters will contain a run of ten identical outcomes lets you decide whether that is acceptable, rather than finding out from a complaint.

What the simulation cannot tell you

Every number on this page describes a simulation of an ideal fair coin, and a physical coin is not one. Measurements of real tosses have found a small but genuine bias toward the face the coin started on, which no amount of simulating will reproduce because the simulation has no starting face.

That gap matters for anyone reasoning from these figures to a real coin. The streak arithmetic transfers because it depends only on the flips being independent and near-even; a bias small enough to need thousands of tosses to detect barely moves the expected longest run.

It also cuts the other way. A simulation passing every statistical test tells you nothing about whether the generator behind it is predictable — a seeded pseudo-random generator produces identical streak statistics and gives away its entire future to anyone who knows the seed.

Frequently asked questions

How long is the expected longest run?

Roughly the base-2 logarithm of the flip count. Two hundred flips gives about 7.6; a hundred thousand gives about 16.6.

Why does it grow so slowly?

Because it is logarithmic. Doubling the flips adds about one to the longest run, which is not a shape intuition supplies.

How much do batches vary?

Considerably. Ten batches of two hundred flips typically produce longest runs from about five to about eleven, from an unchanged generator.

Does a long streak tell me the sequence was long?

Barely. A run of eight is consistent with 256 flips and almost equally consistent with a hundred thousand.

How much does the head count vary?

By about the square root of the flip count. Two hundred flips has a typical deviation of about seven heads.

What is this useful for?

Settling arguments about rigged tools, and demonstrating that a single session proves nothing about a generator.

Tools mentioned in this guide