The Secretary Problem
Reject the first 1/e of candidates, then take the best so far. The classic optimal-stopping problem and its famous 1/e answer.
also known as: sultan's dowry problem · optimal stopping problem · 1/e stopping rule
You interview n candidates in random order. After each interview you must immediately decide: hire (ending the process) or reject forever. Goal: maximise the probability of hiring the best candidate overall. What's your optimal strategy, and what's the probability of success as n → ∞?
ANSWER
Reject the first n/e candidates; then accept the first one who exceeds every prior candidate. P(success) → 1/e ≈ 36.8%.
CANONICAL SOLUTION
Let k be the number of candidates you reject before switching to 'accept the first best-so-far'. Given this rule, we win if and only if the best candidate appears at position i > k AND the best among the first i-1 candidates appeared in the first k positions (so we haven't accepted anyone yet when the true best arrives).
For fixed i > k, the probability that the best candidate is at position i is 1/n, and (conditional on the best being at i) the probability that the best of the first i-1 was in the first k is k/(i-1). Summing:
As n → ∞, with x = k/n, this tends to . Maximising over x: take the derivative, set to zero: , so . At the optimum, success probability is also .
AI ALTERNATIVE FRAMING
Think of it as balancing two error types. If you reject too few candidates at the start, you don't know what 'great' looks like in this particular applicant pool, so you'll accept an early mediocre candidate who happens to be the best-so-far of a small prefix. If you reject too many, the actual best candidate has likely already passed — and you'll end up with whoever happens to come last. The 1/e split minimises the sum of these two errors. Intuitively, e arises because you need enough samples to calibrate the distribution, and the information-theoretic sweet spot lies at of the stream.
On QuantPrep, every practice problem gets an AI-generated alternative explanation like this — tailored to the canonical solution, streaming live.
COMMON VARIATIONS
Instead of a binary 'hired the best or not' payoff, your payoff equals the rank of the person you hired (or their actual 'quality' score from a known distribution).
The optimal stopping ratio changes — rejecting fewer candidates becomes optimal since partial credit matters.
You can hire up to k candidates instead of one. Maximise the probability that your k picks include the true best.
The threshold strategy generalises: reject an initial pool of size k*(n), then accept the next k best-so-far candidates.
You know the distribution that generates candidate qualities (e.g. uniform(0, 1)). Maximise expected hired quality.
Reduces to a standard dynamic programming problem; threshold policy solvable in closed form.
FIRMS THAT ASK THIS
TECHNIQUE
When to stop and take the offer — the secretary problem and its cousins.
Not ready to sign up? Get 5 hand-picked quant interview problems every week. No spam, unsubscribe any time.
TRY A PROBLEM NOW · NO SIGNUP
In the classical secretary problem, as n → ∞, what fraction should you reject outright before accepting the next best-so-far candidate?
FAQ
It comes from maximising , which arises from the success-probability expression. More deeply, is the unique base that makes at , which shows up whenever you're optimising logarithmic quantities.
Yes — Jane Street and SIG occasionally ask it verbatim, but more often they'll ask a variant (different payoff, multiple picks, noisy observations) to probe whether you understand the mechanism or just memorised the answer.
Order execution algorithms, option exercise decisions, and position-sizing under uncertainty are all optimal-stopping problems. The secretary problem is the cleanest warm-up for that family.
RELATED PROBLEMS
Practice variants of this problem
400+ problems on QuantPrep, including variants of the secretary problem and every technique it draws on.
Start practicing free