A mathematical love letter

After the 37.

An essay on optimal stopping
Scroll or press any key to enter
After the 37
Essay № 001 Optimal Stopping Reading · 14 min
The Secretary Problem · a mathematical love letter

When must you stop
looking, and choose?

One hundred candidates arrive in random order. You see each one, once. You must commit instantly, with no going back. At what point do you stop observing, and take the next one better than all before? Mathematics answers with a single, astonishing number.

P(x) = − x ln x  ·  maximised at   x* = 1e0.3679
Begin
The 37% Rule

Reject the first 37% of options you see, then pick the next one that's better than everything you've rejected so far.

Why 37%?

  • Look too little, and you don't learn what good looks like.
  • Look too long, and you run out of chances.
37% is the perfect balance.
§ IThe
Magic
Number

A function that peaks once, and never again.

Plot the probability of winning against the fraction of candidates you skip first. The curve is simple, elegant, and refuses to be symmetric. It rises sharply, crests at a single point, and falls away. That crest is x = 1/e, and its height is also 1/e.
§ IIThree
Strategies

Stop too early, stop too late, or stop at 37.

With ten candidates and a fixed order, the choice of threshold is everything. Skip one, you settle. Skip nine, you are forced. Skip four, and the best reveals itself.
A scenario

You are apartment hunting in New York. Twenty viewings. One month. After each viewing you must decide on the spot — take it, or walk away. Once you leave, it's gone. You want the very best one.

What's your strategy?

Research Question

What is the optimal stopping strategy that maximises the probability of selecting the best candidate from a sequentially observed pool of n candidates, where each rejected candidate cannot be recalled and the decision must be made immediately upon observation?

A  ·  Too EarlySkip 10%

Impatient.

You commit to the second decent face you see. You never met the best.

OutcomeRank 2 · Settled
B  ·  The 37% RuleSkip 37%

Patient. Precise.

You observe without deciding. Then, the first to surpass them all is yours.

OutcomeRank 1 · The Best
C  ·  Too LateSkip 90%

Paralysed.

You watched forever, and the last face left is the face you get.

OutcomeRank 10 · Forced
37%
The Rule

The Optimal Stopping Rule.

Observe the first 37% of candidates without choosing anyone — use them to calibrate your sense of quality. Then select the very next candidate who beats every single one you have already seen. This strategy maximises your probability of finding the best option at exactly 36.79% — the mathematical ceiling, provably unbeatable.

§ IIIPlay
the Rule

N apartments. One lease. No going back.

You're apartment-hunting in New York. Each listing you tour, you decide on the spot — sign or walk. The rule says observe the first N/e without committing, then take the next listing that beats every one you've seen.
Candidate 0 / 20 Exploration
?

Awaiting

Press Begin to view listings

You'll tour listings one at a time. You see the price, layout and square footage — but you'll only know how each one ranks against the ones you've already viewed.

Best-seen-so-far: ·
Result
·
§ IVThe
Derivation

Five lines of calculus, and the number falls out.

The continuous approximation turns a sum into an integral; a maximum condition sets a derivative to zero; and the substitution closes the loop. The same constant that defines e defines the optimal strategy.
§ VMonte
Carlo

Run the trials. Watch the crest form.

For every threshold k from 0 to N, we simulate thousands of independent random orderings and record the win-rate. The empirical curve converges to −x ln x. Keep clicking, and the line sharpens.
Trials
0
Best threshold
·
Peak win rate
·
N candidates
50
Each trial draws a fresh permutation of 50 candidates, runs every threshold k ∈ [0, 50], and increments a counter if the chosen candidate is rank 1. The bar in amber is whatever threshold is winning right now.
§ VIApply
the Rule

The math doesn't care what you're choosing.

An apartment, a job, a life partner: the structure is the same. You have a horizon. You observe. Then you commit.
A · Apartment hunt

You will visit N apartments.

Do not sign a lease for the first 37%. After that, take the first unit that beats every one you've seen.

Observe first
11 apartments
Then choose the 12th apartment that beats all previous ones.
B · Dating horizon

Your dating years: SE.

Treat 37% of your window as exploration. After the switch age, commit to the next partner who surpasses everyone before.

Switch age
26
Explore freely from 18 to 26 (the 37% mark). After that, commit to the next person who surpasses all before.
§ VIIEdges &
Assumptions

What breaks the rule?

The theorem assumes candidates arrive in uniformly random order. When that fails (when better ones tend to arrive later), the win rate collapses. Below: what happens at every possible threshold, and what happens when ordering goes bad.
Four core assumptions of the model

Like all mathematical models, the 37% rule rests on precise assumptions. Understanding where those assumptions hold — and where they break down — is essential for applying it responsibly.

A · Random Arrival Order

Every permutation, equally likely.

Candidates must arrive in a uniformly random order. In practice, rental listings sorted by price, recruitment agencies filtering candidates, and dating apps using recommendation algorithms all introduce systematic ordering that violates this assumption.

B · Known Pool Size

n is given in advance.

The total number of candidates must be known up front. When apartment hunting you may not know how many listings will appear over the next month. Poisson-arrival extensions address unknown n, but the clean 1/e result no longer holds exactly.

C · Irreversible Rejection

Once passed, gone forever.

Once a candidate is passed, they cannot be recalled. Many real-world situations allow for negotiation or return — a landlord may still accept your application, an employer may reopen a position. When recall is possible, a less aggressive threshold is optimal.

D · Perfect Relative Ranking

Any two candidates, reliably compared.

You can always rank the current candidate perfectly against all previous ones. In reality, noise, incomplete information, and changing preferences make consistent ranking unreliable — especially over long horizons such as a multi-year search for a life partner.

Small-n behaviour

The 1/e guarantee is asymptotic.

It tightens only as n grows large. For small pools, the exact optimal threshold k can differ from ⌊n/e⌋, and the success probability is meaningfully above 36.8%.

n k · 37% rule k · exact optimum P(best) · 37% P(best) · exact
31150.0%50.0%
51241.7%43.3%
103339.9%39.9%
207738.4%38.4%
⌊n/e⌋⌊n/e⌋36.8%36.8%

Highlighted: for n = 5, the 37% rule selects k = 1 (41.7% success), while the exact optimum of k = 2 yields 43.3% — a real gap the asymptotic formula misses.

Extension · When n is Unknown

The rule survives, with small shifts.

The classic model requires knowing n in advance. Two natural extensions relax this requirement:

Known horizon T, unknown count. If candidates arrive uniformly over a known interval [0, T] and you do not know how many will appear, the optimal strategy is to observe until time t* and then commit to the next record-setter:

t* = T / e ≈ 0.368 · T

The 37% threshold re-emerges, now in units of time rather than candidate count — the mathematical structure is identical.

Unknown T and n (geometric prior). If even the horizon is unknown and the number of candidates follows a geometric distribution, the optimal cutoff rises above 1/e:

x*geo > 1 / e  ·  (explore more, commit later)

The 1/e result is a robust anchor: moderate uncertainty in n shifts the optimal threshold by only a few percentage points, so the 37% rule remains a useful heuristic even when the pool size is approximately — but not exactly — known.

VIII · A  ·  P(x) at every threshold

Nothing else even gets close.

At x = 37%, win rate = 36.8%. Skip 10% → 23%. Skip 75% → 21.6%. The function is brutally concentrated around 1/e.
VIII · B  ·  Ordering bias, N = 50

Random order is load-bearing.

Mild bias (30% sorted) cuts the win rate by roughly a third. Fully sorted arrival collapses it near zero. The rule is optimal under uniform randomness, and fragile without it.
§ VIIIWhen 37%
Fails

The math is clean. Life isn't.

Every failure mode in § VIII was mathematical: an assumption of the theorem quietly broken. The interesting failures are the ones the theorem never claimed to cover in the first place.

You can almost always go back.

The secretary problem forbids recall: reject a candidate and they vanish forever. Few real decisions work that way. Apartments get re-listed. People stay reachable. Jobs reopen. The rule's discipline (commit and never look back) solves a problem most of us don't actually have.

N is almost never known.

The formula takes N as given. In practice you don't know how many apartments you'll tour, how many candidates you'll meet, how many years you have left. The 37% of what? The rule degrades gracefully under uncertainty, but it degrades.

You have to recognize a "best" when you see it.

The theorem assumes a total order on candidates: any two can be compared, and the comparison is reliable. Real preferences are noisy, multi-dimensional, and revised in hindsight. The number you thought was a 9 at 25 can look like a 6 at 40, and vice versa.

What the rule optimizes isn't what most people want.

37% maximizes the probability of picking the single best option. It makes no promise about the expected quality of your pick, and those are different problems with different answers. If a very-good outcome is nearly as good as the best, the optimal strategy shifts. Most lives are graded on expected quality, not on whether you caught the global maximum.

Regret isn't linear.

The win rate is 36.8%. Which means roughly two-thirds of the time, you don't get the best, and a meaningful fraction of the time, you walk away with nothing at all. The math treats those outcomes as uniformly "a loss." People don't.

The rule is still the best answer to the question it was asked. The quiet move is learning which questions it was asked, and which ones it wasn't.

§ IXBeyond
the Rule

1/e is everywhere.

The number e⁻¹ ≈ 0.3679 appears throughout mathematics with remarkable regularity. The 37% rule is just one of its many beautiful faces.
X · A  ·  Derangements

No card in its original place.

Shuffle a deck of n cards. The probability that no card ends up in its original position approaches 1/e as n → ∞.

P(derangement of n)  ⟶  e−1   as n → ∞
X · B  ·  Compound Interest

Interest, compounded forever.

The definition of e itself: compounding interest infinitely often produces a factor of exactly e per unit time.

limn→∞ (1 + 1/n)n = e
Mathematics has a habit of finding the same profound truth from completely different directions.
Tweaks
Accent hue
Type feel
Grain