Line 14: | Line 14: | ||
Here there are N people. | Here there are N people. | ||
− | So P(Xi=1)= <math> | + | So P(Xi=1)= <math>\frac{1}{n}\!</math> |
and so that P(Xi=0)= 1-(1/n) | and so that P(Xi=0)= 1-(1/n) |
Revision as of 17:34, 6 October 2008
Question
Suppose n people throw their car keys in a hat and then each picks one key at random. SO what is the expected value of X , the number of people who gets back their own key.
SOLUTION
Lets denote for i th person, a random variable Xi.
If that person goes with his own key then Xi=1 and Xi=0 otherwise.
Here there are N people.
So P(Xi=1)= $ \frac{1}{n}\! $
and so that P(Xi=0)= 1-(1/n)
so E[Xi]=$ 1*\frac{1}{n}\ + 0*(1-\frac{1}{n}\!) $
=$ \frac{1}{n}\! $
Now we have X= X1+X2+X3+.....+Xn
So E[X]=E[X1]+E[X2]+E[X3]+.......+E[Xn]
=$ n*\frac{1}{n}\! $
=1