The homeworks of $20$ students is collected, randomly shuffled and returned to the students. What is the average number of students who will get back their own homework?
PS: I tried doing this using $E(X)=E(X_1)+E(X_2)+\ldots+E(X_n)$ but I did not understand the concept clearly.

- 6,154

- 11
-
What are $X$, $X_1$, $X_2$, and $X_n$? – mikkola Nov 03 '15 at 18:46
-
The Random Variables that depict each students homework, n=20 here – Yashas BVN Nov 03 '15 at 18:47
-
A quick argument would be to note that each student has a $1/20$ probability of getting their own hw back. There are twenty students, which adds up to a total expectation of $1$. This is simplified, and while there is a possibility that it is correct, I wouldn't count on it (it would've been correct if instead of getting the hw back, they would get to look at a random hw and then put it back into the stack). I am, however, pretty certain that it is not far off. – Arthur Nov 03 '15 at 18:48
-
Yes but once a student gets his own book back the probability of the other students getting their own hw increases to 1/19 and so on – Yashas BVN Nov 03 '15 at 18:51
-
2Let $X_i=1$ if Student $i$ gets her own homework, and $0$ otherwise. We want $E(X_1+\cdots+X_{20})$. By linearity of expectation, this is $20E(X_1)$, which is $(20)(1/20)$. For much more please see Wikipedia on Derangements. – André Nicolas Nov 03 '15 at 18:54
-
Would you mind explaining the whole procedure once as I am finding it difficult to understand – Yashas BVN Nov 03 '15 at 18:57
-
1Identical to http://math.stackexchange.com/questions/1502113/the-homeworks-of-20-students-are-collected-in-randomly-shuffled-and-returned-to – MJD Nov 03 '15 at 19:32
1 Answers
We use the method of Indicator Random Variables. Let $n=20$, For $i=1$ to $n$, define random variable $X_i$ by $X_i=1$ if Student $i$ gets back her own homework, and by $X_i=0$ otherwise. Let $Y$ be the number of students who get back their own homework. Then $$Y=X_1+X_2+\cdots+X_n.$$ We want $E(Y)$, that is, $E(X_1+X_2+\cdots +X_n)$. By the linearity of expectation we have $$E(Y)=E(X_1+X_2+\cdots +X_n)=E(X_1)+E(X_2)+\cdots+E(X_n).\tag{1}$$ Note that (1) holds whether or not the $X_i$ are independent. In our case, the $X_i$ are not independent.
Finally, by symmetry, $E(X_i)=E(X_1)$ for all $i$. And $E(X_1)=\Pr(X_1=1)=\frac{1}{n}$. Ir follows that $E(Y)=n\cdot \frac{1}{n}=1$.
Remark: Note that we found $E(Y)$ without finding the distribution of $Y$. There are many situations in which finding $E(Y)$ by first finding the distribution of $Y$ is very difficult, but the method of indicator random variables works smoothly.
For more information about the "howework" problem, please see the Wikipedia article on Derangements (combinatorics).

- 507,029