Skip to main content

    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