Why it happens
Why Random Things Come in Streaks
Because a long run has many places to start. In 100 fair flips, a run of 6 or more heads or tails in a row turns up 80.7% of the time, counted exactly, and a run of 7 or more 54.2%. The longest run grows like log2 of the number of flips: double the flips and it gains about one.
100 fair flips, read a run at a time
- CH1 heads
- CH2 tails
How to read the stage
- Objective
- Read the flips, the runs and the exact odds, and find the longest run as it grows.
- How this step gets you there
- The text names each panel and what it tracks, then points to where the default run's record lands.
The flips fill in ten at a time, H for heads and T for tails, 20 to a row. Runs of 4 or more are bracketed with their length, and the longest so far is lit. The bars count runs by length, and the exact odds show how often the longest run in 100 flips reaches each length. With seed 15, the longest is 7 heads, flips 92 to 98.
Why long runs are likely
- Objective
- Explain why a run that is unlikely at any one spot is likely somewhere in 100 flips.
- How this step gets you there
- The text works out the chance at one spot, counts the spots, then gives the exact totals the odds panel shows.
A run of 6 starting at a given flip needs the next 5 to match it, a 1 in 32 chance. That's rare at one spot, but 100 flips give 95 spots for a run of 6 to start. Counting every sequence, a run of 6 or more of one side comes up in 80.7% of them; for heads alone it's 54.6%. A run of 5 or more is 97.2%.
Counting without listing
- Objective
- Describe how the exact odds are counted without listing every sequence.
- How this step gets you there
- The text gives the recursion's one idea, splitting on the first tail, and its simplest case.
100 flips make 2^100 sequences, far too many to list. Mark Schilling's 1990 recursion counts them instead: split each sequence on how many heads come before the first tail, and the number with no more than x heads in a row is a sum of the same counts for shorter lengths. With no two heads in a row, those counts are the Fibonacci numbers.
1,000 sequences, measured
- Objective
- Compare measured longest runs with the exact odds, and see how little the longest run varies.
- How this step gets you there
- The stage fills a histogram of longest runs batch by batch beside the exact chance of each length.
The second stage flips 1,000 sequences of 100 and keeps each one's longest run. 80.5% had a run of 6 or more, against an exact 80.7%, and 54.1% a run of 7 or more, against 54.2%. The longest runs ranged from 4 to 15 and averaged 6.96 flips, against an exact 6.98.
1,000 sequences of 100 flips, and the longest run in each
The log2 law
- Objective
- State how the longest run grows with the number of flips, and how predictable it is.
- How this step gets you there
- The text reads the exact averages off the growth chart and gives Schilling's rule with its tested coverage.
The longest run grows with the logarithm of the flips. Its exact average is 6.98 for 100 flips, 7.98 for 200 and 10.3 for 1,000: about one more each time the flips double. Its spread barely changes as the flips grow. Schilling's rule of thumb puts the longest run of heads within 3 of log2(n/2) rounded: 4 to 10 for 200 flips, more than 95% of the time. Rényi proved the log2 law.
How fake coin flips give themselves away
- Objective
- Say how the longest run separates real coin flips from ones a person made up.
- How this step gets you there
- The text tells the classroom experiment and its result, using the same longest-run test the stage measures.
In a classroom experiment Schilling credits to Révész, one group of students flips a coin 200 times and the other writes down 200 flips that look random. The fakes are easy to spot: their longest run is almost always too short. Schilling ran it in his own courses and sorted about 85% of students correctly. Very few students faking 200 flips write a run longer than 5; a real coin's longest run of either side averages about 8.
What the model leaves out
- Objective
- Say what the model assumes about the coin, and what it can and can't say about real streaks.
- How this step gets you there
- The text lists the model's assumptions and draws the line between chance streaks and streaks with a cause.
The model's coin is exactly fair and each flip independent of the last, drawn from a seeded generator rather than a thumb. Streaks in sport or markets come from things that change between tries, such as form, opponents or news. This page shows what chance alone produces.
Questions
- How many times in a row can a coin land the same way?
- Any number, given enough flips. In 100 fair flips the longest run of heads or tails is most often 6, in 26.4% of sequences. It reaches 7 or more 54.2% of the time and 10 or more 8.7% of the time.
- After 5 heads in a row, is tails more likely?
- No. Each flip is independent and still 50-50. A run of 6 is unlikely before it starts, but once 5 heads are down, the sixth is an even bet. Expecting the run to end because it's gone on long is the gambler's fallacy.
- How can you tell if a sequence of coin flips is fake?
- Look at the longest run. People making up random-looking flips keep heads and tails too balanced in short stretches, which leaves no room for long runs. Schilling reports that very few students faking 200 flips write a run longer than 5, while a real coin's longest run of either side in 200 flips averages about 8.
- Why does the longest run grow like log2?
- About n/2 runs of heads start in n flips, one after each tail, and each reaches length k with chance 1 in 2^k. The longest sits near the k where those two multiply to about one: log2(n) minus 1 for heads, log2(n) for either side.
Practice the pattern
The exact odds are dynamic programming: each count is built from counts for shorter sequences, and capped at one head in a row it's the Fibonacci recurrence of Climbing Stairs. Reading the longest run is a one-pass scan that resets when the side changes, which is Longest Repeating Character Replacement with no replacements allowed.