1

A group of n professors attend a meeting, all wearing hats. At the beginning of the meeting, they put their hats away. At the end of the meeting, each picks a hat at random. The probability that none of them gets the right hat is:

$\frac{1}{2!}-\frac{1}{3!}+\frac{1}{4!\:}-...+\frac{\left(-1\right)^n1}{n!}$

The probability that at least one professor will get the right hat is:

$1-(\frac{1}{2!}-\frac{1}{3!}+\frac{1}{4!\:}-...+\frac{\left(-1\right)^n1}{n!})=1-\sum_{k=2}^{n}\frac{(-1)^k}{k!}$

What is the probability that exactly one of them gets the right hat?

An5Drama
  • 166
  • 2
    can you find the probability of at least 2 ? –  Sep 28 '17 at 22:50
  • 1
    A generalization: https://math.stackexchange.com/questions/574613/probability-that-exactly-k-of-n-people-matched-their-hats-sross-p63-ex-2g?rq=1 – David K Sep 28 '17 at 23:18

2 Answers2

4

Let $E_i$ be the event that professor $i$ gets their hat back. First find $P(E_1\cap E_2^c\cap E_3^c\cap \dots\cap E_n^c)$, the probability that the first professor gets their hat back and no one else does. The final answer is $n$ times this probability. $$ \begin{align} P(E_1\cap E_2^c\cap E_3^c\cap \dots\cap E_n^c) =P(E_2^c\cap \dots \cap E_n^c|E_1)P(E_1) \end{align} $$ Now, given that $E_1$ has occurred, we are just down to the $n-1$ professor situation, so $$ P(E_2^c\cap \dots \cap E_n^c|E_1)= \frac1{2!}-\frac1{3!}+\dots +\frac{(-1)^{n-1}}{(n-1)!} $$ Putting this all together gives you your answer.

Mike Earnest
  • 75,930
  • 1
    What if the 8th out of n professor picks the right hat? Does that change the answer? – user485656 Sep 28 '17 at 23:08
  • 1
    That's why you multiply by $n$ (see third sentence). Letting $F_i$ be the event that the $i^{th}$ professor gets their hat back and no one else does, you want $P(F_1)+\dots+P(F_n)=nP(F_1)$.@user485656 – Mike Earnest Sep 28 '17 at 23:10
  • Thank you so much for your help! Why do we multiply by n? – user485656 Sep 29 '17 at 00:05
3

There are $n$ people who might be lucky enough to get the right hat, we require that the other $n-1$ do not. So there are $n d(n-1)$ where $d(m)$ denotes the number of derrangements of $m$ elements. The probability is $ \color{blue}{\frac{d(n-1)}{(n-1)!}}$.

Donald Splutterwit
  • 36,613
  • 2
  • 26
  • 73