Textbook’s version of the problem

If people write their names on a card, place the cards in a hat, and each person draws a card at random (and independently, without replacement), what is the expected number of people that draw their own name?

We can let be the r.v. that equals the number of people that draw their own name. We want to find . We can use an Indicator variable for each person, and let if the th person draws their own name. By LOE, we have .

For the th person to draw their name, the previous people must not have drawn their name. then we can express as a chain of probabilities:

The final term is the probability that the th person draws their own card.

The result seems counterintuitive at first. Since we’re drawing cards without replacing, it seemed like the probability should depend on what is. But every indicator variable only depends on .

We have .

Original question

The original version of this question involves returning hats back to their respective owner, and asked what the probability that no one gets their own hat back is, hence the name of the problem.

It turns out that as , the probability approaches .

Also see