I've been trying to solve the question below, but I am very confused. If anyone could lend a hand in helping me understand this problem by studying their solution, it would be much appreciated. Thank you.
Let X and Y be two possibly related/dependent random variables. Express the mean and the variance of X in terms of conditional means and conditional variances of X|Y. I.e., find the functions f(.) and g(.) such that
$$E[X] = f( E[X|Y] )$$
$$V[X] = g( E[X|Y], V[X|Y] )$$
$$E[X] = E[E[X|Y]]$$
$f(X)$ then is $E[X]$
$$Var[X] = E[Var[X|Y]] + Var[E[X|Y]]$$
$g(X, Y)$ then is $E[Y] + Var[X]$