At a party, ten men throw their hats into the center of a room. The hats are mixed up and each man randomly selects one. (Where we assume that if a hat is chosen, it can't be chosen again).
A) Define $X_i$ appropriately, such that for i = 1,2,..,10 $X = \sum_i^{10} X_i$ = X
So if we define X as a Bernoulli $X_i= 1$ if the ith man selects his own hat and $X_i = 0$ Else.
B)Compute $E[X_1]$ and use it to Compute E[X].
$E[X_1]=1*P(X_1=1)+0*P(X_1=0) = 1* \frac{1}{10}$
$E[X]=\sum_1^{10} E[X_i] = 10*\frac{1}{10}=1$
C) Compute Var[X]
$Var[X_1] = E[X_1^2]-E[X_1]^2=9/100$
Now this is the part I'm confused about...
D)Compute the $Cov(X_1,X_2)$
$Cov(X_1,X_2) = E[X_1X_2]-E[X_1]E[X_2]$
I understand how to compute $E[X_1X_2]$ However I don't understand my professors solution for $E[X_2]$.
Her solution is... $E[X_2]=E[X_1]=\frac{1}{10}$
but shouldn't you use Law of total probability to compute it?
$E[X_2] = 1*P(X_2=1) = 1*[P(X_2=1\|X_1=1)+P(X_2=1\|X_1=0)]$?
And I feel like this would open a whole can of worms because if $X_1$ chose $X_2$'s hat vs if he chose someone else's hat... etc. I hope this makes sense.
Thank you for the help in advance.
The total probability theorem tell us that
\begin{align} P(X_2 = 1) &= P(X_2 = 1 \cap X_1=1) + P(X_2 = 1 \cap X_1=0)\\ &= P(X=1)P(X_2 = 1 \mid X=1) + P(X_2 = 1 \cap X_1=0)\tag{1}\\ \end{align}
The tricky term is the second one...let's divide and conqueror! Let $A^1_{3\text{-}10}$ denote the event where person $1$ chooses the hat of one of the persons from $3$ to $10$ and $A^1_2$ the event where he chooses person $2$'s hat. In that way the event $X_1=0$ is equivalent to $A^1_{3\text{-}10} \cup A^1_{2}$. Since $A^1_{3\text{-}10}$ and $A^1_{2}$ are disjoint, we can write the second term of $(1)$ as
\begin{align} P(X_2=1 \cap X_1=0) &= P(X_2=1 \cap \{A^1_{3\text{-}10} \cup A^1_{2}\})\\ &= P(X_2=1 \cap A^1_{3\text{-}10}) + P(X_2=1 \cap A^1_{2})\\ &= P(A^1_{3\text{-}10})P(X_2 = 1 \mid A^1_{3\text{-}10})\\ &= \frac{8}{10}\frac{1}{9} \end{align}
Finally,
\begin{align} P(X_2 = 1) &= P(X=1)P(X_2 = 1 \mid X=1) + P(X_2 = 1 \cap X_1=0)\\ &= \frac{1}{10}\frac{1}{9} + \frac{8}{10}\frac{1}{9}\\ &= \frac{1}{10} \end{align}