Help understanding expected values and probabilities

87 Views Asked by At

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.

2

There are 2 best solutions below

2
On BEST ANSWER

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}

0
On

Variance is calculated as follows: $$\begin{align} \mathsf{Var}(X) & = \mathsf E(X^2)-\mathsf E(X)^2 \\[1ex] & = \mathsf E\Big(\big(\sum_{i=1}^{10} X_j\big)\big(\sum_{i=1}^{10} X_j\big)\Big)-\mathsf E\Big(\sum_{i=1}^{10} X_j\Big)^2 \\[1ex] & = \sum_{i=1}^{10}\mathsf E(X_i^2) + \raise{1ex}{\mathop{\sum_{i=1}^{10}\sum_{j=1}^{10}}_{i\neq j}}\; \mathsf E(X_iX_j)-\Big(\sum_{i=1}^{10} \mathsf E(X_i)\Big)^2 \\[1ex] & = 10\;\mathsf E(X_1^2) + 90\; \mathsf E(X_1X_2)-\Big(10 \mathsf E(X_1)\Big)^2 & \textrm{because iid} \end{align}$$

Did you grok that?

Now we already know that $\mathsf E(X_1)= \frac 1{10}$

Similarly $\mathsf E(X_1^2) = 1^2\cdot \mathsf P(X_1^2=1^2) = \frac{1}{10}$

That leaves $\mathsf E(X_1X_2) = 1\cdot \mathsf P(X_1=1\cap X_2=1) + 0\cdot \mathsf P(X_1=0\cup X_2=0) \\ = \frac{1}{10}\frac{1}{9} = \frac 1 {90}$

Next, put it together. $\mathsf{Var}(X) = \frac{10}{10}+\frac{90}{90}-\Big(\frac{10}{10}\Big)^2 = 1$


Also use this for the Covariance question.