Probability that exactly k out of n candidates are hired in the Hiring Problem

combinatoricsprobabilityprobability theory

Here's the description of the hiring problem.

Hiring Problem

• Need an office assistant

• Employment Agency sends one candidate every day

• Interview that person, either hire that person (and fire the old
one) or keep the old person

• Always want the best person – always hire if an interviewee is
better than the current person.

You can read more about the problem here to have a better understanding of the problem.

This question is similar to the one asked here. I am not sure if the answer given for that question is a correct one.

Best Answer

Let $P(n,k)$ be the probability of exactly $k$ hires among $n$ candidates. I'm not sure that there's a compact algebraic formula for $P(n,k)$, but there's a simple recursive one. We have the boundary conditions, $$ \begin{align} P(n,k)=0,\ k>n\\ P(n,1)=\frac1n\\ P(n,n)=\frac1{n!} \end{align} $$ Call the least favorable candidate $1$, the second-worst $2$, and so on. If candidate $m$ comes on day $1$ the $m-1$ candidates worse than $m$ may be ignored and we will hire $k$ candidates if and only if we hire exactly $k-1$ from the remaining $n-m$. Since the probability that candidate $m$ is the first to show up is $\frac1n$, we have $$P(n,k)=\frac1n\sum_{m=1}^kP(n-m,k-1),\ 1<k\leq n$$

P.S

As you suspected the accepted answer for the cited question is wrong, but a correct one has been posted recently.

Related Question