Three Heads in a Row Flip Count

Coin tosses until three heads straight is a medium quant interview question on Expected Value, reported to have been seen at Jane Street.

Difficulty Medium Topic Expected Value Reported at Jane Street

MyQuantPartner is not affiliated with, endorsed by, or sponsored by these companies, and all trademarks belong to their respective owners.

This classic expected value question is about random waiting times in a simple stochastic process and how long it takes, on average, for a rare configuration to appear. Although the setting looks elementary, the underlying structure is a small Markov process whose states encode partial progress toward the goal. It is a staple of serious quant prep because it links discrete probability, sequences, and expectation in a compact form.

It trains your ability to formalize "memoryless" evolution into states, write down interdependent expectations, and translate an informal story into a clean probabilistic model. It also develops comfort with solving small systems that encode random dynamics and reasoning about convergence toward a pattern.

This matters for quant interviews because many trading and risk problems involve waiting times, hitting probabilities, and path-dependent events. Interviewers use it to test whether you can turn a simple description into a rigorous stochastic framework, reason clearly under uncertainty, and perform structured quant analysis under time pressure.

What it tests

Problems involving waiting for a specific sequence in a random process, such as consecutive heads in coin tosses, are governed by Markov chains and the principle of state-based recursion. The key is to model the process as a set of states, each representing the progress toward the target pattern, and to express the expected waiting time for each state in terms of the others. The transitions between states are determined by the outcome probabilities, and the recurrence relations capture the expected cost of moving between these states. This structure holds because the process 'forgets' its history except for the current state, making the expected time from each state depend only on that state and not on the path taken to get there. The solution emerges by solving these coupled equations, often revealing a pattern or closed-form expression for the expected waiting time.

Practise this question with written feedback, or hear it in a spoken mock interview.

Get started free