Runs of Heads

Predict the longest run of heads in a sequence of coin flips, then check your intuition against an exact calculation and a repeated simulation.

Established Supported by convergent, high-quality evidence.

Make a prediction first

Flip a fair coin 100 times. How long a run of consecutive heads would you guess is likely to turn up somewhere in those 100 flips? Most people guess something short — three or four in a row feels like it’s already pushing it. Set your guess below, then check the exact figure.

Probability a single experiment contains a run of at least your guess: 54.6%

Probability the longest run is exactly your guess: 22.9%

Click "Run simulation" to see the distribution across many repeated experiments.

What changed and why

The two exact figures update as soon as you change your guess, the number of flips, or the probability of heads — they come from a closed-form calculation (a Markov chain over “current run length so far”), not a simulation, so there’s nothing to wait for. The distribution only appears once you click “Run simulation”: it runs the requested number of independent experiments in a background worker and reports the longest run observed in each one, so you can see the spread of outcomes rather than just one dramatic result.

Why the answer feels too high

If your gut guess for “longest run in 100 flips” was 3 or 4, you’re in good company — and also demonstrating exactly the intuition gap this interactive is built to correct. A genuinely random, unbiased process produces longer streaks than most people expect, which is the whole reason real winning or losing streaks get over-interpreted as meaningful. See clustering and runs for the full discussion, including the “hot hand” case where this exact intuition gap shaped decades of research.(Gilovich, Vallone & Tversky, 1985)

Model assumptions

  • Flips are treated as fully independent — no “streaks breed streaks” or “it’s due for a tail” effect, which is exactly the gambler’s-fallacy intuition this model deliberately excludes.
  • The probability of heads is fixed for the whole sequence; real-world processes with a drifting or unknown probability would need a different model.
  • A run only counts consecutive heads — a single tail resets the streak to zero, however long it was.

Reproducibility

Every simulation run is seeded: the same flips-per-experiment, repetitions, and seed will always produce the same distribution, using a documented seeded generator (mulberry32). Running the simulation updates this page’s URL with your current parameters, so you can copy the link to share the exact setup.

Sources and method

The Markov-chain calculation for the exact “at least” and “exactly” probabilities is standard probability theory, verified here against hand-computed small cases (for example, exactly 3/8 = 37.5% of all 3-flip sequences contain a run of at least 2 heads) rather than taken on faith. The interpretive point about intuition underestimating streak length connects directly to the “hot hand” research on clustering and runs.(Gilovich, Vallone & Tversky, 1985)

Sources

  1. Gilovich, Vallone, Tversky (1985). The Hot Hand in Basketball: On the Misperception of Random Sequences. Cognitive Psychology, 17(3), 295-314. https://doi.org/10.1016/0010-0285(85)90010-6 ↩