X~U(0, 1) and Y~Bin(1, 0.5) are independent random variables, Z = X^Y For each possible value of y, find the E(Z) and V(Z).
I know I should start by E(Z|Y) and V(Z|Y).
I can't figure it out... Can anyone help me to solve this problem? Thanks in advance for any help whatsoever!
Note that, \begin{align*} E(Z) &= E\left(E(X^Y\mid X)\right)=E(0.5(1+ X)) = 0.75, \end{align*} and \begin{align*} E(Z^2) &= E\left(E(X^{2Y}\mid X)\right)=E(0.5(1+ X^2)) = \frac{2}{3}. \end{align*}