In the secretary problem, there are \(n\) candidates, totally ranked from best to worst, with no ties. The candidates arrive sequentially, in random order. We can not observe the absolute ranks of the candidates as they arrive, only the relative ranks. Our goal is to choose the best candidate; any other outcome is failure.
In the secretary experiment, the candidates are represented as balls. For \( k \in \{1, 2, \ldots, n\} \), strategy \( k \) is to let the first \( k - 1 \) candidates go by, and then pick the first candidate (if she exists) who is better than all previous candidates. If this candidate does not exist, we must pick the last candidate (regardless of rank). The first row of balls shows the relative ranks of the candidates, up to the candidate that is selected. The second row of balls shows all candidates with their absolute ranks. Random variable \(X\) is the number (arrival order) of the selected candidate. Random variable \(Y\) is the number of the best candidate, and random variable \(W\) is the indicator variable of a win. Variables \(X\), \(Y\), and \(W\) are recorded in the data table, and the distribution of \(W\) is described in the distribution graph and table. The number of candidates \( n \) and the strategy parameter \( k \) can be varied with input controls.