The secretary problem demonstrates a scenario involving optimal stopping theory that is studied extensively in the fields of applied probability, statistics, and decision theory. It is also known as the marriage problem, the sultan's dowry problem, the fussy suitor problem, the googol game, and the best choice problem. Its solution is also known as the 37% rule. The basic form of the problem is the following: imagine an administrator who wants to hire the best secretary out of n {\displaystyle n} rankable applicants for a position. The applicants are interviewed one by one in random order. A decision about each particular applicant is to be made immediately after the interview. Once rejected, an applicant cannot be recalled. During the interview, the administrator gains information sufficient to rank the applicant among all applicants interviewed so far, but is unaware of the quality of yet unseen applicants. The question is about the optimal strategy (stopping rule) to maximize the probability of selecting the best applicant. If the decision can be deferred to the end, this can be solved by the simple maximum selection algorithm of tracking the running maximum (and who achieved it), and selecting the overall maximum at the end. The difficulty is that the decision must be made immediately. The shortest rigorous proof known so far is provided by the odds algorithm. It implies that the optimal win probability is always at least 1 / e {\displaystyle 1/e} (where e is the base of the natural logarithm), and that the latter holds even in a much greater generality. The optimal stopping rule prescribes always rejecting the first ∼ n / e {\displaystyle \sim n/e} applicants that are interviewed and then stopping at the first applicant who is better than every applicant interviewed so far (or continuing to the last applicant if this never occurs). Sometimes this strategy is called the 1 / e {\displaystyle 1/e} stopping rule, because the probability of stopping at the best applicant with this strategy is already about 1 / e {\displaystyle 1/e} for moderate values of n {\displaystyle n} . One reason why the secretary problem has received so much attention is that the optimal policy for the problem (the stopping rule) is simple and selects the single best candidate about 37% of the time, irrespective of whether there are 100 or 100 million applicants. The secretary problem is an exploration–exploitation dilemma.
Formulation Although there are many variations, the basic problem can be stated as follows:
There is a single position to fill. There are n applicants for the position, and the value of n is known. The applicants, if all seen together, can be ranked from best to worst unambiguously. The applicants are interviewed sequentially in random order, with each order being equally likely. Immediately after an interview, the interviewed applicant is either accepted or rejected, and the decision is irrevocable. The decision to accept or reject an applicant can be based only on the relative ranks of the applicants interviewed so far. The objective of the general solution is to have the highest probability of selecting the best applicant of the whole group. This is the same as maximizing the expected payoff, with payoff defined to be one for the best applicant and zero otherwise. A candidate is defined as an applicant who, when interviewed, is better than all the applicants interviewed previously. Skip is used to mean "reject immediately after the interview". Since the objective in the problem is to select the single best applicant, only candidates will be considered for acceptance. The "candidate" in this context corresponds to the concept of record in permutation.
Deriving the optimal policy The optimal policy for the problem is a stopping rule. Under it, the interviewer rejects the first r − 1 applicants (let applicant M be the best applicant among these r − 1 applicants), and then selects the first subsequent applicant that is better than applicant M. It can be shown that the optimal strategy lies in this class of strategies. For an arbitrary cutoff r, the probability that the best applicant is selected is
P ( r ) = ∑ i = 1 n P ( applicant i is selected ∩ applicant i is the best ) = ∑ i = 1 n P ( applicant i is selected | applicant i is the best ) ⋅ P ( applicant i is the best ) = [ ∑ i = 1 r − 1 0 + ∑ i = r n P ( the best of the first i − 1 applicants is in the first r − 1 applicants | applicant i is the best ) ] ⋅ 1 n = [ ∑ i = r n r − 1 i − 1 ] ⋅ 1 n = r − 1 n ∑ i = r n 1 i − 1 . {\displaystyle {\begin{aligned}P(r)&=\sum _{i=1}^{n}P\left({\text{applicant }}i{\text{ is selected}}\cap {\text{applicant }}i{\text{ is the best}}\right)\\&=\sum _{i=1}^{n}P\left({\text{applicant }}i{\text{ is selected}}|{\text{applicant }}i{\text{ is the best}}\right)\cdot P\left({\text{applicant }}i{\text{ is the best}}\right)\\&=\left[\sum _{i=1}^{r-1}0+\sum _{i=r}^{n}P\left(\left.{\begin{array}{l}{\text{the best of the first }}i-1{\text{ applicants}}\\{\text{is in the first }}r-1{\text{ applicants}}\end{array}}\right|{\text{applicant }}i{\text{ is the best}}\right)\right]\cdot {\frac {1}{n}}\\&=\left[\sum _{i=r}^{n}{\frac {r-1}{i-1}}\right]\cdot {\frac {1}{n}}\\&={\frac {r-1}{n}}\sum _{i=r}^{n}{\frac {1}{i-1}}.\end{aligned}}}
The sum is not defined for r = 1, but in this case the only feasible policy is to select the first applicant, and hence P(1) = 1/n. This sum is obtained by noting that if applicant i is the best applicant, then it is selected if and only if the best applicant among the first i − 1 applicants is among the first r − 1 applicants that were rejected. Letting n tend to infinity, writing x {\displaystyle x} as the limit of (r−1)/n, using t for (i−1)/n and dt for 1/n, the sum can be approximated by the integral
P ( x ) = x ∫ x 1 1 t d t = − x ln ( x ) . {\displaystyle P(x)=x\int _{x}^{1}{\frac {1}{t}}\,dt=-x\ln(x)\;.}
Taking the derivative of P(x) with respect to x {\displaystyle x} , setting it to 0, and solving for x, we find that the optimal x is equal to 1/e. Thus, the optimal cutoff tends to n/e as n increases, and the best applicant is selected with probability 1/e. For small values of n, the optimal r can also be obtained by standard dynamic programming methods. The optimal thresholds r and probability of selecting the best alternative P for several values of n are shown in the following table.
The probability of selecting the best applicant in the classical secretary problem converges toward 1 / e ≈ 0.368 {\displaystyle 1/e\approx 0.368} .
Alternative solution This problem and several modifications can be solved (including the proof of optimality) in a straightforward manner by the odds algorithm, which also has other applications. Modifications for the secretary problem that can be solved by this algorithm include random availabilities of applicants, more general hypotheses for applicants to be of interest to the decision maker, group interviews for applicants, as well as certain models for a random number of applicants.
Limitations The solution of the secretary problem is only meaningful if it is justified to assume that the applicants have no knowledge of the decision strategy employed, because early applicants have no chance at all and may not show up otherwise. One important drawback for applications of the solution of the classical secretary problem is that the number of applicants n {\displaystyle n} must be known in advance, which is rarely the case. One way to overcome this problem is to suppose that the number of applicants is a random variable N {\displaystyle N} with a known distribution of P ( N = k ) k = 1 , 2 , ⋯ {\displaystyle P(N=k)_{k=1,2,\cdots }} (Presman and Sonin, 1972). For this model, the optimal solution is in general much harder, however. Moreover, the optimal success probability is now no longer around 1/e but typically lower. This can be understood in the context of having a "price" to pay for not knowing the number of applicants. However, in this model the price is high. Depending on the choice of the distribution of N {\displaystyle N} , the optimal win probability can approach zero. Looking for ways to cope with this new problem led to a new model yielding the so-called 1/e-law of best choice.
1/e-law of best choice The essence of the model is based on the idea that life is sequential and that real-world problems pose themselves in real time. Also, it is easier to estimate times in which specific events (arrivals of applicants) should occur more frequently (if they do) than to estimate the distribution of the number of specific events which will occur. This idea led to the following approach, the so-called unified approach (1984): The model is defined as follows: An applicant must be selected on some time interval [ 0 , T ] {\displaystyle [0,T]} from an unknown number N {\displaystyle N} of rankable applicants. The goal is to maximize the probability of selecting only the best under the hypothesis that all arrival orders of different ranks are equally likely. Suppose that all applicants have the same, but independent to each other, arrival time density f {\displaystyle f} on [ 0 , T ] {\displaystyle [0,T]} and let F {\displaystyle F} denote the corresponding arrival time distribution function, that is
F ( t ) = ∫ 0 t f ( s ) d s {\displaystyle F(t)=\int _{0}^{t}f(s)ds} , 0 ≤ t ≤ T {\displaystyle \,0\leq t\leq T} . Let τ {\displaystyle \tau } be such that F ( τ ) = 1 / e . {\displaystyle F(\tau )=1/e.} Consider the strategy to wait and observe all applicants up to time τ {\displaystyle \tau } and then to select, if possible, the first candidate after time τ {\displaystyle \tau } which is better than all preceding ones. Then this strategy, called 1/e-strategy, has the following properties: The 1/e-strategy
(i) yields for all N {\displaystyle N} a success probability of at least 1/e, (ii) is a minimax-optimal strategy for the selector who does not know N {\displaystyle N} , (iii) selects, if there is at least one applicant, none at all with probability exactly 1/e. The 1/e-law, proved in 1984 by F. Thomas Bruss, came as a surprise. The reason was that a value of about 1/e had been considered before as being out of reach in a model for unknown N {\displaystyle N} , whereas this value 1/e was now achieved as a lower bound for the success probability, and this in a model with arguably much weaker hypotheses (see e.g. Math. Reviews 85:m). However, there are many other strategies that achieve (i) and (ii) and, moreover, perform strictly better than the 1/e-strategy simultaneously for all N {\displaystyle N} >2. A simple example is the strategy which selects (if possible) the first relatively best candidate after time τ {\displaystyle \tau } provided that at least one applicant arrived before this time, and otherwise selects (if possible) the second relatively best candidate after time τ {\displaystyle \tau } . The 1/e-law is sometimes confused with the solution for the classical secretary problem described above because of the similar role of the number 1/e. However, in the 1/e-law, this role is more general. The result is also stronger, since it holds for an unknown number of applicants and since the model based on an arrival time distribution F is more tractable for applications.
The game of googol In the article "Who solved the Secretary problem?" (Ferguson, 1989), it's claimed the secretary problem first appeared in print in Martin Gardner's February 1960 Mathematical Games column in Scientific American:Ask someone to take as many slips of paper as he pleases, and on each slip write a different positive number. The numbers may range from small fractions of 1 to a number the size of a googol (1 followed by a hundred zeroes) or even larger. These slips are turned face down and shuffled over the top of a table. One at a time you turn the slips face up. The aim is to stop turning when you come to the number that you guess to be the largest of the series. You cannot go back and pick a previously turned slip. If you turn over all the slips, then of course you must pick the last one turned.Ferguson pointed out that the secretary game remained unsolved, as a zero-sum game with two antagonistic players. In this game: Alice, the informed player, writes secretly distinct numbers on n {\displaystyle n} cards. Bob, the stopping player, observes the actual values and can stop turning cards whenever he wants, winning if the last card turned has the overall maximal number. Bob wants to guess the maximal number with the highest possible probability, while Alice's goal is to keep this probability as low as possible. The difference with the basic secretary problem are two:
Alice does not have to write numbers uniformly at random. She may write them according to any joint probability distribution to trick Bob. Bob observes the actual values written on the cards, which he can use in his decision procedures.
Strategic analysis Alice first writes down n numbers, which are then shuffled. So, their ordering does not matter, meaning that Alice's numbers must be an exchangeable random variable sequence X 1 , X 2 , . . . , X n {\displaystyle X_{1},X_{2},...,X_{n}} . Alice's strategy is then just picking the trickiest exchangeable random variable sequence. Bob's strategy is formalizable as a stopping rule τ {\displaystyle \tau } for the sequence X 1 , X 2 , . . . , X n {\displaystyle X_{1},X_{2},...,X_{n}} . We say that a stopping rule τ {\displaystyle \tau } for Bob is a relative rank stopping strategy if it depends on only the relative ranks of X 1 , X 2 , . . . , X n {\displaystyle X_{1},X_{2},...,X_{n}} , and not on their numerical values. In other words, it is as if someone secretly intervened after Alice picked her numbers, and changed each number in X 1 , X 2 , . . . , X n {\displaystyle X_{1},X_{2},...,X_{n}} into its relative rank (breaking ties randomly). For example, 0.2 , 0.3 , 0.3 , 0.1 {\displaystyle 0.2,0.3,0.3,0.1} is changed to 2 , 3 , 4 , 1 {\displaystyle 2,3,4,1} or 2 , 4 , 3 , 1 {\displaystyle 2,4,3,1} with equal probability. This makes it as if Alice played an exchangeable random permutation on { 1 , 2 , . . . , n } {\displaystyle \{1,2,...,n\}} . Now, since the only exchangeable random permutation on { 1 , 2 , . . . , n } {\displaystyle \{1,2,...,n\}} is just the uniform distribution over all permutations on { 1 , 2 , . . . , n } {\displaystyle \{1,2,...,n\}} , the optimal relative rank stopping strategy is the optimal stopping rule for the secretary problem, given above, with a winning probability P r ( X τ = max i ∈ 1 : n X i ) = max r ∈ 1 : n r − 1 n ∑ i = r n 1 i − 1 {\displaystyle Pr(X_{\tau }=\max _{i\in 1:n}X_{i})=\max _{r\in 1:n}{\frac {r-1}{n}}\sum _{i=r}^{n}{\frac {1}{i-1}}} Alice's goal then is to make sure Bob cannot do better than the relative-rank stopping strategy. By the rules of the game, Alice's sequence must be exchangeable, but to do well in the game, Alice should not pick it to be independent. If Alice samples the numbers independently from some fixed distribution, it would allow Bob to do better. To see this intuitively, imagine if n = 2 {\displaystyle n=2} , and Alice is to pick both numbers from the normal distribution N ( 0 , 1 ) {\displaystyle N(0,1)} , independently. Then if Bob turns over one number and sees − 3 {\displaystyle -3} , then he can quite confidently turn over the second number, and if Bob turns over one number and sees + 3 {\displaystyle +3} , then he can quite confidently pick the first number. Alice can do better by picking X 1 , X 2 {\displaystyle X_{1},X_{2}} that are positively correlated. So the fully formal statement is as below:
Does there exist an exchangeable sequence of random variables X 1 , . . . , X n {\displaystyle X_{1},...,X_{n}} , such that for any stopping rule τ {\displaystyle \tau } , the inequality P r ( X τ = max i ∈ 1 : n X i ) ≤ max r ∈ 1 : n r − 1 n ∑ i = r n 1 i − 1 {\displaystyle Pr(X_{\tau }=\max _{i\in 1:n}X_{i})\leq \max _{r\in 1:n}{\frac {r-1}{n}}\sum _{i=r}^{n}{\frac {1}{i-1}}} holds?
Solution For n = 2 {\displaystyle n=2} , if Bob plays the optimal relative-rank stoppings strategy, then Bob has a winning probability 1/2. Surprisingly, Alice has no minimax strategy, which is closely related to a paradox of T. Cover and the two envelopes paradox. Concretely, Bob can play this strategy: sample a random number Y {\displaystyle Y} . If X 1 > Y {\displaystyle X_{1}>Y} , then pick X 1 {\displaystyle X_{1}} , else pick X 2 {\displaystyle X_{2}} . Now, Bob can win with probability strictly greater than 1/2. Suppose Alice's numbers are different, then condition on Y ∉ [ min ( X 1 , X 2 ) , max ( X 1 , X 2 ) ] {\displaystyle Y\not \in [\min(X_{1},X_{2}),\max(X_{1},X_{2})]} , Bob wins with probability 1/2, but condition on Y ∈ [ min ( X 1 , X 2 ) , max ( X 1 , X 2 ) ] {\displaystyle Y\in [\min(X_{1},X_{2}),\max(X_{1},X_{2})]} , Bob wins with probability 1. Note the random number Y {\displaystyle Y} can be sampled from any random distribution, as long as Y ∈ [ min ( X 1 , X 2 ) , max ( X 1 , X 2 ) ] {\displaystyle Y\in [\min(X_{1},X_{2}),\max(X_{1},X_{2})]} has a nonzero probability. However, for any ϵ > 0 {\displaystyle \epsilon >0} , Alice can construct an exchangeable sequence X 1 , X 2 {\displaystyle X_{1},X_{2}} such that Bob's winning probability is at most 1 / 2 + ϵ {\displaystyle 1/2+\epsilon } . But for n > 2 {\displaystyle n>2} , the answer is yes: Alice can choose random numbers (which are dependent random variables) in such a way that Bob cannot play better than using the classical stopping strategy based on the relative ranks.
Heuristic performance The remainder of the article deals again with the secretary problem for a known number of applicants.
Stein, Seale & Rapoport 2003 derived the expected success probabilities for several psychologically plausible heuristics that might be employed in the secretary problem. The heuristics they examined were:
The cutoff rule (CR): Do not accept any of the first y applicants; thereafter, select the first encountered candidate (i.e., an applicant with relative rank 1). This rule has as a special case the optimal policy for the classical secretary problem for which y = r. Candidate count rule (CCR): Select the y-th encountered candidate. Note, that this rule does not necessarily skip any applicants; it only considers how many candidates have been observed, not how deep the decision maker is in the applicant sequence. Successive non-candidate rule (SNCR): Select the first encountered candidate after observing y non-candidates (i.e., applicants with relative rank > 1). Each heuristic has a single parameter y. The figure (shown on right) displays the expected success probabilities for each heuristic as a function of y for problems with n = 80.
Cardinal payoff variant Finding the single best applicant might seem like a rather strict objective. One can imagine that the interviewer would rather hire a higher-valued applicant than a lower-valued one, and not only be concerned with getting the best. That is, the interviewer will derive some value from selecting an applicant that is not necessarily the best, and the derived value increases with the value of the one selected. To model this problem, suppose that the n {\displaystyle n} applicants have "true" values that are random variables X drawn i.i.d. from a uniform distribution on [0, 1]. Similar to the classical problem described above, the interviewer only observes whether each applicant is the best so far (a candidate), must accept or reject each on the spot, and must accept the last one if he/she is reached. (To be clear, the interviewer does not learn the actual relative rank of each applicant. He/she learns only whether the applicant has relative rank 1.) However, in this version the payoff is given by the true value of the selected applicant. For example, if he/she selects an applicant whose true value is 0.8, then he/she will earn 0.8. The interviewer's objective is to maximize the expected value of the selected applicant. Since the applicant's values are i.i.d. draws from a uniform distribution on [0, 1], the expected value of the tth applicant given that x t = max { x 1 , x 2 , … , x t } {\displaystyle x_{t}=\max \left\{x_{1},x_{2},\ldots ,x_{t}\right\}} is given by
E t = E ( X t | I t = 1 ) = t t + 1 . {\displaystyle E_{t}=E\left(X_{t}|I_{t}=1\right)={\frac {t}{t+1}}.}
As in the classical problem, the optimal policy is given by a threshold, which for this problem we will denote by c {\displaystyle c} , at which the interviewer should begin accepting candidates. Bearden showed that c is either ⌊ n ⌋ {\displaystyle \lfloor {\sqrt {n}}\rfloor } or ⌈ n ⌉ {\displaystyle \lceil {\sqrt {n}}\rceil } . (In fact, whichever is closest to n {\displaystyle {\sqrt {n}}} .) This follows from the fact that given a problem with n {\displaystyle n} applicants, the expected payoff for some arbitrary threshold 1 ≤ c ≤ n {\displaystyle 1\leq c\leq n} is
V n ( c ) = ∑ t = c n − 1 [ ∏ s = c t − 1 ( s − 1 s ) ] ( 1 t + 1 ) + [ ∏ s = c n − 1 ( s − 1 s ) ] 1 2 = 2 c n − c 2 + c − n 2 c n . {\displaystyle V_{n}(c)=\sum _{t=c}^{n-1}\left[\prod _{s=c}^{t-1}\left({\frac {s-1}{s}}\right)\right]\left({\frac {1}{t+1}}\right)+\left[\prod _{s=c}^{n-1}\left({\frac {s-1}{s}}\right)\right]{\frac {1}{2}}={\frac {2cn-{c}^{2}+c-n}{2cn}}.}
Differentiating V n ( c ) {\displaystyle V_{n}(c)} with respect to c, one gets
∂ V ∂ c = − c 2 + n
