Problem created by Tao Steven Zheng (郑涛)
Problem[]
Suppose you and five of your friends each brought a hat to a party. The hats are then put into a large box for a random hat draw. What is the probability that nobody selects his or her own hat?
Solution[]
There are six people in total (you + 5 friends), so the number of possibilities that each person can get their hat is:
The number of possibilities that nobody selects their own hat is called the derangement problem. For six people, the number of derangements is:
so the probability of each person get their wrong hat is:
Therefore, the probability that nobody selects his or her own hat is 36.81%.
Note that a faster way of calculating the number of derangements is