The Gambler's Fair Coin Sequence
You repeatedly flip a fair coin. What is the expected number of flips until the pattern HH first appears? What about until HT first appears?
Both patterns require seeing two specific consecutive outcomes โ yet their expected waiting times are different. Find both expected values and explain intuitively why they differ.
Answer: HH vs HT: Waiting Times for Coin Patterns
Key Idea / Intuition
At first glance, HH and HT seem symmetric โ each is a sequence of two fair-coin outcomes. But they behave very differently because of what happens when a "near-miss" occurs. If you're waiting for HH and you see HT, you've wasted both flips. But if you're waiting for HT and you see HH, the second H can still serve as the start of a future HT. This asymmetry in "overlap structure" makes HH harder to achieve, giving it a longer expected waiting time.
Formal Proof / Solution
Expected time to HH
Let = expected number of flips to see HH from a fresh start.
Let = expected additional flips to see HH, given the last flip was H.
Setting up equations:
From a fresh start, flip once:
- With prob , get T โ back to fresh start. Cost: 1 flip.
- With prob , get H โ now in state . Cost: 1 flip.
From state (last flip was H), flip again:
- With prob , get H โ done! Cost: 1 flip.
- With prob , get T โ back to fresh start. Cost: 1 flip.
Substituting into the first equation:
Expected time to HT
Let = expected flips to HT from fresh start.
Let = expected additional flips, given last flip was H.
From a fresh start:
- With prob , get T โ back to fresh start. Cost: 1 flip.
- With prob , get H โ state . Cost: 1 flip.
From state (last flip was H), flip again:
- With prob , get T โ done! Cost: 1 flip.
- With prob , get H โ stay in (the new H can still start HT). Cost: 1 flip.
Substituting back:
Why the difference? (Intuition recap)
| Pattern | Near-miss behavior | Expected time | |---------|-------------------|---------------| | HH | Getting HT resets you completely | 6 | | HT | Getting HH keeps you in a "H seen" state | 4 |
For HH: a failure (getting T after H) wastes everything.
For HT: a "false start" (getting HH) is not fully wasted โ the second H still counts as a potential head toward HT.
This is an instance of the general theory of pattern waiting times, where the overlap structure of the pattern determines how quickly it appears. HH has a self-overlap (its first H is also a valid start of HH), which paradoxically hurts it, because each near-miss costs more.
Source: Fifty Challenging Problems in Probability with Solutions (Frederick Mosteller) โ related folklore; pattern waiting time is classical probability