Expected value (sequences) · Interview Question
Flipping a fair coin repeatedly: expected number of flips to first see HH versus first see HT? Why aren't they equal?
How to answer
E[flips to HH] = 6, E[flips to HT] = 4. For HT: once you have an H, you just wait for any T (each flip is T w.p. ½, so 2 more flips on average), giving E=4. For HH: a tail right after an H self-overlaps and sends you back to the start, costing extra, so E=6. The asymmetry comes from whether the pattern can overlap itself.
Key idea: After getting an H, ask what a 'wrong' next flip costs you for each target.
More: Quant interview prep · Quant salary
Related Expected value (sequences) questions
- 25 horses, races of 5 at a time, no clock. Minimum races to find the top 3, and why exactly that many?
- Approximate e^0.05 and e^x for small x. What's the rule?
- Convert 7/8 and 5/16 to decimals instantly. Why memorize the eighths/sixteenths table for timed rounds?
- Convert between log base 2 and base 10 in your head. What's log2(10)?