Probability · Waiting times · Medium
Three heads running
A fair coin is flipped until heads has come up three times in a row. What is the expected number of flips?
a fraction, an expression or a decimal to two significant figures · 5/8 · ln 2 · pi · inf
Answer and solution
Answer
14
Solution
From a run of n − 1 heads, one more flip either completes the run or wipes it out, so each longer run costs twice the shorter one plus two.
Let E(n) be the expected flips to a run of n heads. After reaching a run of n − 1, one more flip finishes with probability 1/2 and otherwise restarts: E(n) = E(n − 1) + 1 + (1/2)E(n), so E(n) = 2E(n − 1) + 2. With E(0) = 0 this gives 2, 6, 14. The answer is 14.
Waiting times comes up in 8 firms' roundsCitadel Securities · Goldman Sachs · Jump Trading · +5
These 9 rounds ask this kind of problem live, with follow-ups. Every round on every track is in Premium.