# Finding $Var(X)$ from conditional PDF

Let $$X$$ and $$Y$$ be random variables such that $$X \vert Y=y$$ is normal distributed as $$N(y,1)$$ and Y is a continues random variable with PDF:

$$f_Y(y)=3y^2$$

for $$0

and $$0$$ otherwise.

Find $$Var(X)$$

My idea is to find the marginal PDF for X and from there it's easy to find the variance. Now since the conditional is normal distributed, I should be able to find the simulatanous PDF by multiplying the the conditional PDF by the marginal PDF for Y. However when I try to use integration to find the marginal PDF for X with limits 0 and infinity, I get an uncomputable integral.... Why is this happening and/or is there another easier method? Thanks in advance!

• You can find the variance from $E(X)=E\, [E(X\mid Y)]$ and $E(X^2)=E\, [E(X^2\mid Y)]$. – StubbornAtom Jan 8 '19 at 14:58

Use law of total variance, $$\mathbb{Var}(X)=\mathbb{E}[\mathbb{Var}(X|Y)]+\mathbb{Var}(\mathbb{E}[X|Y])$$
• @CruZ You are almost there. Think what random variable $\mathbb{E}[X|Y]$ is, and find its variance. – kludg Jan 8 '19 at 17:04