@Satbir ,
Then out of n! cases there is only 1 correct way of giving the hat back to the customers so probability = 1/n!
What is it that you're calculating? Is it the probability to give everyone their correct hat?
X : 1 1 1 1 1 .......... 1 (Till n terms)
fx : 1/n 1/n 1/n 1/n 1/n 1/n (probability that he gets the correct hat back out of n hats)
Now, expectation (or in other words mean)= x * $f_x$
= n* (1/n)
= 1.
64.3k questions
77.9k answers
244k comments
80.0k users