The Drunk Hat-Checker

The problem
N people check hats · returned in random orderP(nobody gets their own hat back) as N → ∞ ?

NN people walk into a restaurant and each checks their hat. The hat-checker is drunk — at the end of the night, hats are returned in a uniformly random order.

What is the probability that nobody gets their own hat back, in the limit NN \to \infty?

Tempting (but wrong)
"0 or 1 as N grows large?"N = 536.67%N = 10036.79%but the probability is essentially constant!

Two opposite intuitions:

  • "Goes to 0 as NN \to \infty" — with so many people, somebody must accidentally get their own hat back. Surely the chance of zero matches collapses.
  • "Goes to 1 as NN \to \infty" — any specific person matches with probability 1/N1/N, which vanishes. So nobody matches in the limit.

Both intuitions are about specific people, not the joint event. The right answer is a clean constant strictly between 0 and 1.