A coin shows heads with probability 1/3. What is the expected number of flips until you first see three heads in a row?
A coin shows heads with probability 1/3. What is the expected number of flips until you first see three heads in a row?
Approach: Use first-step analysis on the number of consecutive heads accumulated so far, with every tail sending you back to the start, then solve the three-state linear system.
39. Let E_j be the expected further flips with j consecutive heads in hand, using a biased coin with p = 1/3. Each flip gives a head with probability p and otherwise resets to E_0, so E_0 = 1 + p E_1 + (1-p) E_0, E_1 = 1 + p E_2 + (1-p) E_0 and E_2 = 1 + (1-p) E_0, with E_3 = 0. First-step analysis on this run of successes gives the closed form E_0 = (1 - p^3)/(p^3 (1-p)) = (26/27)(81/2) = 39. The expected waiting time for a run of k is (1 - p^k)/(p^k (1-p)), so at k = 3 halving p multiplies the wait by roughly 8, and a fair coin gives 14.
Follow-up: How does the answer scale if the run length rises to k while p stays at 1/3?
Key concepts: first-step analysis, run of successes, biased coin, expected waiting time.