I don't understand the calculation given in the answers for finding mean of a die throw.
edited because of errata in book: experiment: you throw a fair die. we define X: to be the result of the throw, and also defining Y=0 if the result is even and Y=1 if it's odd
Find: $E[3xy]$.
My attempt:
$E[3xy] = 3E[xy]$. so to find $E[xy]$ I have to calculate $$e[xy]=\sum_x\sum_y xyP(x=i)P(y=j)$$
(is it correct?), or can I calculate it otherwise? so the calculation is, when $(n(S) = 1/6), n(S) \cdot 3 \cdot (1+3+5) \cdots $
and my question is: do we calculate it by the result of a die?
I mean we don't care if its $1$ or $3$, we care that the probability is the same, i.e $1/6$.
what is the difference between the mean of e[x] and e[y]? that we calculate in e[y] only the odd values and e[x] = 3.5?
on a side question, if possible: can we calculate $e[xy]$ using the marginal probability function(using only one variable, $x$ or $y$ for instance)?
would really appreciate an explanation if possible.
thank you
It is not correct to state that $\mathbb E[XY]=\sum_x\sum_yxyP(X=x)P(Y=y)$.
It is correct to state that: $$\mathbb E[XY]=\sum_x\sum_yxyP(X=x\wedge Y=y)$$
Note that $X$ and $Y$ are not independent here. Actually the value taken by $Y$ is completely determined by the value taken by $X$.
The term $xyP(X=x\wedge Y=y)$ takes value $0$ if $x$ is even or if $y=0$
Leaving these terms out then we find:$$\mathbb E[XY]=1\cdot1\cdot P(X=1)+3\cdot1\cdot P(X=3)+5\cdot1\cdot P(X=5)=(1+3+5)\frac16=\frac32$$
So that: $$\mathbb E3XY=3\mathbb E[XY]=\frac92$$
More directly you could go for:$$\mathbb E[3XY]=3\mathbb E[XY\mid X\text{ is odd})P(X\text{ is odd})+3\mathbb E[XY\mid X\text{ is even})P(X\text{ is even})=$$$$3\mathbb E[X\mid X\text{ is odd})P(X\text{ is odd})+0=3\cdot\frac13(1+3+5)\frac12+0=\frac92$$