Example 3-11 6 people attend a meeting, hanging their hats on a coat rack upon entry, and in their haste to leave, they each grab a hat at random. What is the probability that no one gets their own hat?
The probability $p=\frac{D_{6}}{6!}=1-\frac{1}{1!}+\frac{1}{2!}-\frac{1}{3!}+\frac{1}{4!}-\frac{1}{5!}+\frac{1}{6!}$
$$
\begin{aligned}
= & (720-C(6,1) 5!+C(6,2) 4! \\
& -C(6,3) 3!+C(6,4) 2!-C(6,5) 1!+1) / 720 \\
= & (720-6 \times 120+15 \times 24-20 \times 6+15 \times 2-6+1) / 720 \\
= & (720-720+360-120+30-6+1) / 720=265 / 720 \\
\approx & 0.368
\end{aligned}
$$

It can be proven that when $n$ is relatively large, $\frac{D_{n}}{n!} \approx \frac{1}{e} \approx 0.36788$.