Medium · Probability & Combinatorics · Numerical · ~8 min · #1
Waiting for Two Heads in a Row
Real interview · Goldman Sachs, Morgan Stanley +1
You flip a fair coin repeatedly. What is the expected number of flips until you see two heads in a row (HH) for the first time?
Constraints
- •
Flips are independent with .
Hints · 0 of 3 shown
Worked solution
Give the problem an honest attempt first, then reveal the full explanation.
Reported in interviews
- Goldman SachsGlassdoor interview question
- Goldman SachsGlassdoor interview question
Reported with three heads in a row (answer 14).
- Morgan StanleyGlassdoor interview question
- Two SigmaThird-party prep site
Listed as a Two Sigma question in a public compilation.
Candidate-reported and unverified; the firm may phrase it differently or no longer ask it. The wording here is our own paraphrase, and the solution was written and checked independently of any answers posted at the source.
Related questions
Concepts
First-step analysisMarkov chainsLinearity of expectation
Relevant for
Quant TraderQuant ResearcherDesk Quant