[Math] If 3 people put their hat in a box, but the hats are mixed up. How likely is it that AT LEAST one person getting their hat back.

probability

If 3 people put their hat in a box, but the hats are mixed up. How likely is it that AT LEAST one person gets their hat back. Consider all possibilities. Then what about 4 people. Please use simplicity (I know similar questions have been posted before, but none make sense to me.)

I believe there are 24 possible outcomes, 15 being favorable that at least 1 person get their hat back, which comes out to 62.5% is this correct?

Best Answer

For three people there are six possibilities. Simply number the people 1, 2, 3. Then suppose they pick a hat out of the box in that order, then the possible hat id's are:

123 (everyone gets their own hat back)

132 (only person 1 gets their hat back)

213 (only person 3 gets their hat back)

231 (nobody gets their hat back)

312 (nobody gets their hat back)

321 (only person 2 gets their hat back)

These are the possibilities. There are 6 of them (corresponding to $3! = 6$ permutations of three distinct objects, and in 3 cases someone gets their hat back (ie, the permutation has at least one fixed point)

For four people, there are $4! = 24$ permutations. In this case you could simply list the permutations and count the number of cases where at least 1 person got their own hat back), or you could argue as follows:

How many permutations have exactly 1 fixed point? There are 4 possibilities for the 1 element fixed, and for each such choice there are 2 arrangements for the other 3 elements which do not introduce additional fixed points (using the result for 3 people), for a total of $4\cdot 2 = 8$.

How many permutations have exactly 2 fixed points? There are (4 choose 2) = 6 possible choices for the pair of elements fixed. The remaining elements must be fixed, so there are 6 permutations with exactly 2 fixed points.

How many permutations have exactly 3 fixed points? Note that if three elements are fixed, the fourth must also be fixed, so there are no permutations in this category.

How many permutations have exactly 4 fixed points? Of course there is just 1, namely 1234.

Thus, the total is $8 + 6 + 1 = 15$ permutations with at least one fixed point.

Related Question