Two in a Row
Expected Value
Coin Stopping Times
Medium
Hint 1
After the first flip, think about what happens on each subsequent flip relative to the previous one.
Hint 2
Every flip after the first independently matches the previous flip with probability , so the number of extra flips needed is geometric.
Show worked solution
1. Reduce to a geometric wait
The first flip is free. Every flip after that matches the immediately preceding flip with probability , independent of history, and the process stops the first time a match occurs.
2. Compute the expectation
Let be the number of flips after the first, which is geometric with success probability , so .
Answer: 3
Related roles: Browse quant jobs
This problem has 1 interviewer follow-up — unlock them by solving it in Practice.