Expected Heads in a Lineup
Expected visible heads in a line is an easy quant interview question on Expected Value, reported to have been seen at DRW and Hudson River Trading.
MyQuantPartner is not affiliated with, endorsed by, or sponsored by these companies, and all trademarks belong to their respective owners.
This expected value question is about how many standout observations you see in a random sequence when each draw comes from an unknown continuous distribution. Instead of caring about the distribution itself, it focuses on the ordering and how often a new maximum appears as you move along the line. It's a clean example of using randomness in rankings rather than in exact numerical values.
It trains your intuition for record processes, exchangeability, and linearity of expectation, which are core tools in quant prep. You build comfort turning a verbal description into indicator variables and a sum of probabilities. It also reinforces how to separate distribution-free structure from unnecessary detail, a key habit in fast-paced interviews.
This matters for quant interviews because trading models often depend on order statistics, ranks, and relative extremes. Interviewers use it to see whether you recognize symmetry, avoid brute force, and express a complex process in a simple probabilistic framework. Strong performance on such questions signals readiness for more advanced quant interviews involving stochastic processes, optimal stopping, and microstructure.
What it tests
Whenever you have a sequence of objects with values drawn from a continuous distribution and you ask for the expected number of 'records' (entries that exceed all previous entries), the key is that each object's chance of being a record depends only on its position, not the distribution itself. For the $i$th position, the probability that it is a new maximum is $1/i$, because among the first $i$ objects, each is equally likely to be the largest due to the symmetry of continuous random variables. This is a consequence of exchangeability: the ordering of values is uniformly random, so the chance that any particular position is the maximum so far is $1/i$. The expected total number of records in a sequence of $n$ such objects is thus the sum $1 + 1/2 + 1/3 + \\dots + 1/n$, the $n$th harmonic number. This principle holds regardless of the underlying distribution, as long as it is continuous (so ties are impossible).
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free