Bet on Whether HHT or HTH Appears First in Coin Flips
Last updated: November 29, 2026
Quick Overview
A fair coin is flipped repeatedly. Find the expected number of flips until HHT appears and until HTH appears, then find the probability that HHT appears before HTH. Which side would you take at even odds?
SIG
November 29, 20260
0
0 solved
A fair coin is flipped repeatedly. Find the expected number of flips until HHT appears and until HTH appears, then find the probability that HHT appears before HTH. Which side would you take at even odds?
SIG likes pattern-waiting puzzles because the intuitive answer (all length-3 patterns are equivalent) is wrong, and the gap between intuition and calculation is exactly what a trader should notice. The interviewer checks a Markov chain setup, clean algebra, and a decision on which side to bet.
What the Interviewer Expects
- Model progress as states based on the longest matching prefix
- Solve linear equations for expected waiting times: 8 and 10
- Explain the overlap reason HTH takes longer
- Set up a separate chain for the race and get 2/3
- Turn the probability into a betting decision with edge
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What fair odds would you offer on HTH winning the race?
- Why can a pattern wait longer on its own yet still not lose every race? Give an example with THH vs HHT.
- How would you compute the expected waiting time for any pattern quickly?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Fair coin, independent flips. Two separate questions: the waiting time for each pattern alone, and a race where we stop at whichever pattern completes first....
Approach
First-step analysis on states named by the longest suffix of the flips that is a prefix of the target. Write for expected flips remaining from state ....