Expected flips to get three heads in a row
Asked at Jane Street, Optiver
You flip a fair coin repeatedly.
What is the expected number of flips until you first see three heads in a row (HHH)?
Show a hint
Use states for progress toward the pattern: , , or heads in a row so far. One equation per state.