- 26 people put their name in a hat.
- Each person picks a name out of the hat to buy a gift for.
- If a person picks out themselves they put the name back into the hat
What is the probability of the last person picking themselves?
I only ask this because it just happened!!
After the first $25$ people have picked names, there are two possibilities:
$\bullet$ We have a derangement of the first $25$ names, in this case the last person picks his own name.
$\bullet$ The last person picks the name of another person, and then we get a derangement of all names.
The number of derangements of $n$ objects is equal to $\left[ \frac{n!}{e}\right]$ (see link), so the probability of the last person picking his own name is equal to $$\frac{\left[ \frac{25!}{e}\right]}{\left[ \frac{25!}{e}\right] + \left[ \frac{26!}{e}\right]} = \frac{5706255282633466762357224}{154068892631103602583645049} \approx \frac{1}{27} - 2.4 \cdot 10^{-28}$$