Expected value round, frequently paired with a Markov chain follow-up.
Waiting for two heads in a row
The question
What is the expected number of fair coin flips until you see two heads in a row?
Have a go before you open the solution. If you are stuck after a few minutes, the first paragraph below is usually enough of a nudge.
Show the worked solution
The answer
6.
Define states by progress: S0 with no trailing head, S1 with one trailing head.
From S0, one flip either moves to S1 or returns to S0, so E0 = 1 + (E1 + E0)/2.
From S1, one flip either finishes or drops back to S0, so E1 = 1 + E0/2.
Substituting gives E0 = 6. The general result for k heads in a row with a fair coin is 2^(k+1) - 2, which is worth knowing because the follow-up is usually 'now do three'.
What it is testing
Whether you build a small state machine rather than guessing.
Try these next
The final roll
HardYou roll a fair six-sided die until the running total first exceeds 12. What is the probability the final roll is a 6?
Two children, one is a boy
Warm-upA family has two children. You are told at least one of them is a boy. What is the probability both are boys?
The three doors
Warm-upThree doors hide one prize. You pick a door. The host, who knows where the prize is, opens a different door and reveals it is empty, then offers you the swap. Do you swap?
First head wins
StandardYou and I alternate flipping a fair coin, you first. The first person to flip heads wins. What is your probability of winning?
Preparing properly
Live opportunities
Interviewing soon? See who is hiring
Open vacancies we track at quant firms, grouped by role and city. Adverts are anonymised.
Hiring for these roles? Brief the desk on a hire or check your fit for a role.
Research desk
Speak to a quant market specialist
Ask what a firm really pays, how a desk hires, or where your profile sits. One reply from the research desk, in confidence, no obligation.