SOLUTION: One evening, n men enter the restaurant and put their hats at the reception. Each man gets a random hat back when going back after having dinner. Find the expected number of men

Algebra ->  Probability-and-statistics -> SOLUTION: One evening, n men enter the restaurant and put their hats at the reception. Each man gets a random hat back when going back after having dinner. Find the expected number of men       Log On


   



Question 1042549: One evening, n men enter the restaurant and put their hats at the reception. Each man gets a random hat back
when going back after having dinner. Find the expected number of men who get their right hat back.
A. 1
B. 1/2
C. 1/n
D. n/2

Found 2 solutions by ikleyn, robertb:
Answer by ikleyn(52803) About Me  (Show Source):
You can put this solution on YOUR website!
.
One evening, n men enter the restaurant and put their hats at the reception. Each man gets a random hat back
when going back after having dinner. Find the expected number of men who get their right hat back.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It is a good problem and the formulation is good.

But, in order to be solved, it should be reformulated in mathematically correct form.

In my view, this correct formulation is as follows.

Among n! permutations of "n" numbers 1, 2, 3, . . . , n how many are those where the number "k" is in the k-th place (in k-th position) ?

Then the answer is obvious: there are (n-1)! of such permutations.

And we are interested in this ratio %28n-1%29%21%2Fn%21, which is equal to 1%2Fn.

Answer.  1%2Fn.  Option C.

On permutations, read the lesson
    - Introduction to Permutations
in this site.


Answer by robertb(5830) About Me  (Show Source):
You can put this solution on YOUR website!
There are n hats and each person picks a hat uniformly at random hence each gets their right hat back with probability 1%2Fn.
Since expectation is linear even when the random variables are dependent, it follows that the mean of the total number of persons who
get their right hat back is 1%2Fn+%2B+1%2Fn+..+ 1%2Fn+=+n%2A%281%2Fn%29+=+highlight%281%29.
***This is the famous "hat-matching problem". The one given above is the most intuitive but the least rigorous of all the proofs I've seen,
but does the job well in giving the correct answer. The other rigorous proofs involve finding the pmf of "mismatches", or derangements of n objects (in mathematical parlance) and then applying the definition of expectation of a random variable.***