You flip a fair coin until you see heads in a row. What is the expected number of flips?
Reveal solutionHide solution
#Build the streak one rung at a time
Let be the expected number of flips to reach a run of heads. To get there, first reach a run of , which takes flips, then flip once more. With probability it is heads and the run is complete; with probability it is tails, which wipes the streak back to zero and leaves you needing a fresh flips. So
#Solve the recursion
Rearranging gives , that is . Starting from this unrolls to
#Read it off
Each extra head roughly doubles the wait, because one tail at the wrong moment costs the entire run and sends you back to the start. For three heads in a row, flips, and for ten in a row it is already .