When to stop thinking and start choosing.

Look at too few options and you settle. Look at too many and you run out of time to use what you found. Two small games show where the balance sits, and how wide it is.

  • Probability
  • 9 min read
  • 2 simulations

Twenty candidates, one chance

Partway through any search, you start to wonder whether to take what is in front of you or keep looking. Here is the smallest version of that worry.

Say you are hiring, and twenty people will walk in one at a time, in random order. After each interview you know only how that person ranks against the ones you have already seen. Say yes and it is over. Say no and they are gone for good. You win only if you pick the best of all twenty.

So when do you stop looking? Decide how many to let pass, then play.

Ten thousand seeded games score every look at once. The pin shows the rule's chance at the number you let pass. You chose by feel, so it is not the chance of your own pick.

Pass too few and you settle before you know what good looks like. Pass too many and the best may already have walked by.

Look, then leap

The best rule is short. Let the first kk candidates pass, whatever they are. Then take the first one who beats everyone you have seen. If nobody does, you are left with the last.

For nn candidates, it wins with probability

Rule

P(k)=kn∑j=kn−11jP(k)=\frac{k}{n}\sum_{j=k}^{n-1}\frac{1}{j}

You win when the best candidate arrives after your look phase, and the best of everyone before them sat inside it. Then nobody in between beats the bar you set, so the first one who does is the best of all.

Let nn grow and write x=k/nx=k/n for the share you look at. The curve settles to

P(x)=−xln⁡x,P(x)=-x\ln x,

which peaks at x=1/e≈0.37x=1/e\approx 0.37, at a height of 1/e≈0.371/e\approx 0.37.

So look at about 37% of the candidates. Even then you win only about 37% of the time. That sounds low, but no rule does better when all you have is ranks. For 20 candidates the best look phase is 7, and it wins 38.4%. Taking one at random wins 5%.

The top of the curve is wide, and that is the good news. For 100 candidates, any look phase from 22% to 54% keeps at least 90% of the best chance. Looking at 10% wins 23.5%. Looking at 80% wins 18.0%.

What 37% does not say

People quote 37% as if it were a deadline. It only holds under conditions. You know nn, you get one choice, a passed candidate cannot return, you see only ranks, and you win only by taking the very best. Change one and the answer moves.

If half your offers are refused, look at 25% and win 25% of the time. If you care about rank and not only the single best, commit sooner. For 100 candidates, start accepting best-so-far candidates from the 28th, not the 38th, and expect rank 3.6. That rule takes the single best only 26% of the time. If you see actual values from a known distribution instead of ranks, the best chance rises to about 58%. If you can call back anyone you passed, looking costs nothing and you take the best of all.

Looking can also cost something. If each candidate seen costs a thousandth of the prize, the best look phase shrinks from 37% to 33%. A cost shortens the look, but only gently.

Many turns instead of one

Most choices come back. You pick a lunch place today, and you will pick one again next week, knowing a little more. A choice that repeats is a different game from one that happens once. Take five slot machines that pay at hidden rates. You have 100 pulls. Each pull pays one coin or nothing. Every pull on a worse machine gives up what the best machine would have paid, on average. That loss is called regret.

This is the multi-armed bandit problem. Pull by hand, then let an agent play the same machines.

Five fixed machines, picked by the lab, so the numbers depend on them. The averages are seeded plays on the same machines. Regret here is the expected loss, not the luck of the draw.

An agent can follow a simple rule, called epsilon-greedy. With probability ε\varepsilon it pulls a random machine. Otherwise it pulls the machine with the best record so far. Averaged over many plays, the result is an arch. At ε=0\varepsilon=0 the agent sticks with the first machine that pays, and spends only about one pull in three on the best one. At ε=1\varepsilon=1 it pulls at random.

On these machines, 100 turns earn about 55 coins with no exploring, 64 with ε=0.15\varepsilon=0.15, and 46 with pure exploring. The best possible is 77. The top of the arch is wide here too.

Turns left change the answer

Move the turns slider. With 10 turns, exploring adds nothing, because there is no time to use what you learn. With 100 turns it adds about 8 coins. With 500 turns it adds more than 80.

Exploring is an investment, and it pays back only over the turns that remain. So explore early and commit later.

An agent can shift from one to the other by itself. Thompson sampling draws a plausible rate for each machine from what it has seen, then pulls the highest draw. It explores about 4 in 10 of its first ten pulls and about 1 in 6 of its last ten. Over 100 turns here it collects about 66 coins, more than any fixed ε\varepsilon.

What carries over, and what does not

Neither game tells you how long to think about your own decisions. Both assume you know how many options or turns there are, that payoffs stay fixed, and that you can rank or sample what is in front of you. Both are about trying options before committing. Neither says anything about brooding over a single one.

What carries over is the shape. Looking has a price, because candidates leave and turns run out. The best split is wide, so being roughly right costs little. And looking is worth only what you can still do with what you learn.

The number does not carry over. 37% is no deadline for a job search or a house hunt.

A neighbouring question is how much detail a model needs before it stops helping. That is Why simpler explanations win.

Findings

The plain results.

  • With 20 candidates, taking the first or the last wins 5% of the time. Letting 7 pass, then taking the first who beats everyone seen, wins 38.4%, and any look from 5 to 10 keeps at least 90% of that.
  • On five fixed machines, 100 turns earn about 55 coins with no exploring, 64 with an exploring rate of 0.15 and 46 with pure exploring, against a ceiling of 77. At 10 turns exploring adds nothing, and at 500 it adds more than 80.
Sources
  1. Ferguson, T. S. (1989). Who solved the secretary problem? Statistical Science, 4(3). The first print appearance (Gardner, 1960), early solutions, and the classic assumptions.
  2. Gardner, M. (1960). Mathematical Games. Scientific American, February 1960. The game of googol, as described in Ferguson (1989).
  3. Lindley, D. V. (1961). Dynamic programming and decision theory. Applied Statistics, 10(1).
  4. Dynkin, E. B. (1963). The optimum choice of the instant for stopping a Markov process. Soviet Mathematics Doklady, 4.
  5. Chow, Y. S., Moriguti, S., Robbins, H., and Samuels, S. M. (1964). Optimal selection based on relative rank (the secretary problem). Israel Journal of Mathematics, 2. Choosing for rank, not only the best.
  6. Gilbert, J. P., and Mosteller, F. (1966). Recognizing the maximum of a sequence. Journal of the American Statistical Association, 61(313). Seeing values, not only ranks: about 0.58 for many candidates. Read from a search excerpt.
  7. Smith, M. H. (1975). A secretary problem with uncertain employment. Journal of Applied Probability, 12(3). Refused offers. The 25% for half refused is computed by the lab from the exact formula and checked by simulation, not quoted from the paper.
  8. Hill, T. P. (2009). Knowing when to stop. American Scientist, 97(2). A survey of optimal stopping.
  9. Seale, D. A., and Rapoport, A. (1997). Sequential decision making with relative ranks: an experimental investigation of the secretary problem. Organizational Behavior and Human Decision Processes, 69(3). People tend to stop too early. Confirmed through a summary of its findings.
  10. Bearden, J. N., Murphy, R. O., and Rapoport, A. (2005). A multi-attribute extension of the secretary problem: theory and experiments. Journal of Mathematical Psychology, 49(5). The same finding.
  11. Thompson, W. R. (1933). On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3/4).
  12. Robbins, H. (1952). Some aspects of the sequential design of experiments. Bulletin of the American Mathematical Society, 58(5).
  13. Sutton, R. S., and Barto, A. G. (2018). Reinforcement Learning: An Introduction, 2nd ed., chapter 2. The shape of the epsilon-greedy result. Every number here comes from the lab’s own runs.
  14. Marsaglia, G., and Tsang, W. W. (2000). A simple method for generating gamma variables. ACM Transactions on Mathematical Software, 26(3). The sampler behind Thompson sampling here.