Optimal Stopping
The 37% rule: explore first, then commit to the first option that beats your best. Mathematically optimal strategy for sequential decision-making.
๐ฏ The Secretary Problem
You must hire one candidate from N applicants. You interview them one at a time, and must decide immediately (accept or reject forever). How do you maximize your chance of picking the best?
The 37% Rule
- 1. Look: Reject the first ~37% of candidates
- 2. Note: Record the best you've seen
- 3. Leap: Pick the first one who beats that benchmark
Why 37%?
This is the mathematically optimal explore/exploit boundary. It gives you a ~37% chance of picking the best candidate.
Better than guessing (1/N) and better than any other fixed rule.
Parameters
๐ Simulation Results
Success Rate by Explore %
Peak around 35-40%. Both too little and too much exploration hurt performance.
The Mathematics
Optimal Threshold
Reject the first n/e candidates, then take first that beats best seen.
Success Probability
Probability of picking the absolute best candidate.
๐ Betting Applications
Line Shopping
Check 37% of books, then take first that beats best seen
Player Selection
Evaluate 37% of options, then pick first above threshold
Cashout Decision
Wait until 37% of game, then cashout if value exceeds best prior
Season Betting
Observe 37% of season, then bet when pattern beats baseline
R Code Equivalent
# Optimal stopping simulation
secretary_problem <- function(n, look_pct = 1/exp(1), trials = 1000) {
look_n <- floor(n * look_pct)
wins <- 0
for (t in 1:trials) {
candidates <- runif(n)
best_idx <- which.max(candidates)
# Look phase
look_best <- max(candidates[1:look_n])
# Leap phase
picked <- NA
for (i in (look_n + 1):n) {
if (candidates[i] > look_best) {
picked <- i
break
}
}
if (is.na(picked)) picked <- n
if (picked == best_idx) wins <- wins + 1
}
return(wins / trials)
}
# Test different look percentages
results <- sapply(seq(0.1, 0.8, by = 0.05), function(p) secretary_problem(20, p))
cat(sprintf("Optimal at ~37%%: %.1f%% success\n", secretary_problem(20) * 100))โ Key Takeaways
- โข 37% rule: explore first, then commit
- โข Gives ~37% chance of picking the best
- โข Better than guessing or any fixed strategy
- โข Apply to line shopping, player selection
- โข Too little exploration = poor benchmark
- โข Too much exploration = best option passed