The Secretary Game

Description

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 game, the candidates are represented as balls. The app has buttons for starting a new game, rejecting a candidate, and accepting a candidate. The labels on the balls in the top row show the relative ranks of the candidates (1 is best). Candidates with relative ranks greater than 1 (non-optimal) are colored red; the candidate with relative rank 1 (the best so far) is colored green. Once a candidate is accepted, the game is over and the second row of balls shows the absolute ranks, again with non-optimal candidates red and the best candidate green. Random variable \(X\) is the number (arrival order) of the selected candidate. Random variable \(Y\) is the number of the best candidate, and variable \( W \) indicates a win. These are recorded in the data table, and the empirical distribution of \(W\) is described in the distribution graph and table. The number of candidates can be varied with the input control.