Let $X$ and $Y$ be stochastic variables such that $X|Y=y$~$N(y,1)$ and Y is a continuous stochastic variable with PDF $3y^2$ for $0<y<1$ and $0$ else.
Find $var(X)$
I know $Var(X)=E(X^2)-E(X)^2$.
So I'm thinking I need to find EX. But I'm not certain how to find EX? I would normally try and find EX given X's PDF. So I'm left trying to figure out how to find the PDF of X.
This is exam prep and I know the result should be $Var(X)=1.04$
By the law of total variance, we have
$$\operatorname{Var}(X) = E[\operatorname{Var}(X|Y)]+\operatorname{Var}[E(X|Y)]$$
From the information given, we have $\operatorname{Var}(X|Y)=1$ and $E(X|Y)=Y$
Hence,
$$\operatorname{Var}(X) = 1+\operatorname{Var}[Y]$$
I will leave the rest as an exercise.