Learn / Library / Probability
Waiting for a long run
A fair coin is tossed repeatedly with independent tosses. What is the expected number of tosses until heads in a row appear for the first time?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Define states by the current length of the heads streak and write linear equations for the expected remaining tosses.
Solution
- Let , , be the expected additional tosses when the current streak of heads has length , , .
- Conditioning on the next toss gives , and .
- The last equation simplifies to .
- Substituting the first equation into the second gives , and with this yields .
- Therefore .
Answer: