The Technical Honeypot · Pattern

The Coin You Can't Fake

Imagine a coin. Flip it a hundred times in your head and write down what you see — make it look properly random. You can't. A person's imagined coin leaves fingerprints all over the page, and three lines of arithmetic lift them clean.

A real coin has no memory. Each flip forgets the last one completely, which is exactly why a fair sequence does something that feels wrong: it clumps. Six heads in a row, then a lonely tail, then five tails — a real hundred flips is lumpy with streaks. When a person tries to invent randomness, they smooth those lumps out. They switch sides too often, they never dare a long streak, and they keep the score close to even. Every one of those instincts is a tell, and every tell has a number attached.

First — you try

Fake a coin

Type a hundred flips of a coin that only exists in your head

Press H or T — or the buttons, or ← for tails and → for heads. Aim for a run a stranger would believe a real coin made. The machine keeps quiet until you say Judge it. (100 is best; it will judge from 40, but the tell needs a full hundred to bite.)

Your sequenceyou: 0 / 100

Then — the real thing

Flip a real one

Your browser carries a real source of randomness — the same cryptographic generator that seeds secure keys. Below, it flips a hundred honest coins. Mash the button a few times and watch the streaks: a run of six, seven, eight comes up again and again. They look planted. They aren't. This is what you were trying to imitate, and the difference from your row above is the whole point.

A hundred cryptographically-random flips

longest streak:
Real coin

Press the button. Then compare its chunky streaks to whatever you typed above.

And the proof

The tail you're standing in

Here is the exact distribution of a real coin's longest streak over a hundred flips — computed live, not sketched. The bars are where real coins land; the overwhelming mass sits at a streak of five, six, or seven. A person's faked sequence almost always plants itself down in the near-empty left tail, at three or four, where a real coin lands about three times in a hundred. Flip a few real hundreds and watch the dots drop into the bulk — never into the tail where the fakes live.

Where a real coin's longest streak falls — and where yours did

Gold marker: your faked sequence's longest streak. Green dots: sampled real coins. The exact mean is 6.98; the mode is 6.

What the machine actually knows

Notice what it is not doing. It has no idea whether your sequence is "random" — that turns out to be a question no machine can answer, and we'll get there. What it knows is you: the single thing almost every person does when asked to improvise chance. You avoid repeating yourself. A fair coin repeats its last result exactly half the time; a person repeats about 40% of the time and switches the other ~60% — a bias measured across half a century of studies. That one habit produces all three tells at once. Too many switches. Too few long streaks. A score kept too close to even.

Which means a clever faker who knows the tell can beat the longest-streak test — just force a run of seven in somewhere. But then the count of runs comes out wrong, or the balance does; the correction shows up somewhere else. You can fool one statistic by hand. Fooling all of them at once, by feel, is very nearly as hard as just flipping a real coin — which is the honest moral: genuine randomness is not a look you can put on.

Where it gets genuinely hard

Here is the twist that makes the word "random" so slippery. Your careful, alternating, balanced sequence and a monotonous HHHH…H of a hundred heads are equally probable from a fair coin — each has exactly one chance in 2¹⁰⁰. No specific hundred-flip string is more or less likely than any other. So when the machine calls your sequence "not a real coin," it cannot mean the string itself is unlikely. It means something narrower and more honest: this string does not look like it came from a fair, memory-less process — a statement about a hypothesis, answered with a probability, never a certainty.

Push further and the ground gives way. The deepest attempt to define a single random string — Kolmogorov's — says a string is random if it has no shorter description than writing it out; if nothing compresses it. HHHH…H compresses to "H ×100"; a real coin's mess usually doesn't. It's the right idea. But that shortest description is uncomputable: there is a theorem saying no program can ever take a string and certify that it is random. So the thing this whole page is about — randomness — cannot, in the end, be pinned to any one sequence at all. We can catch a human. We can reject a hypothesis. We can never hold up a string and prove it random. Harder to define than you'd think.

The check

Every probability above is recomputed in your browser from the exact distribution — no lookup tables, no fudging. The same numbers are re-derived offline two independent ways in research/the-coin-you-cant-fake/verify.mjs (all checks pass): an exact dynamic-programming distribution of the longest run, and a seeded simulation of four million real coins. They agree.

a real 100-flip coinexact4M-coin sim
mean longest streak6.9776.978
P(longest streak ≥ 6)80.68%80.70%
P(longest streak ≤ 3)0.03%0.03%
runs: mean, s.d.50.5, 4.9750.5, 4.97
mean |heads − tails|7.967.96

Run it yourself from a fresh checkout: node research/the-coin-you-cant-fake/verify.mjs. The exact longest-run mean 6.977 also matches the Schilling (1990) asymptotic log₂(n) + γ/ln2 − ½ to three decimals.

Honest apparatus

Sources — Nickerson, R. (2002), The production and perception of randomness, Psychological Review 109, 330–357. Wagenaar, W. (1972), Generation of random sequences by human subjects, Psychological Bulletin 77, 65–72. Schilling, M. (1990), The longest run of heads, College Mathematics Journal 21, 196–207. Wald, A. & Wolfowitz, J. (1940), On a test whether two samples are from the same population, Annals of Mathematical Statistics 11, 147–162. On the uncomputability of Kolmogorov complexity: Li & Vitányi, An Introduction to Kolmogorov Complexity. Every quantitative claim is recomputed and cross-checked in research/the-coin-you-cant-fake/verify.mjs.