🔴 Riddle #186 of 240
You flip a fair coin until the pattern HHH (three heads in a row) appears for the first time. On average, how many flips does it take? Compare with the pattern THH.
Think about it first. When you're ready:
HHH: 14 flips; THH: 8 flips
A pattern's expected wait is the sum of 2^k over its self-overlap lengths k (HHH: 2 + 4 + 8 = 14; THH: 8), confirmed by iteration.