Expectation of a conditional density I'm trying to figure out why the following equation holds: 
$$f_{Y}(y) = E(f_{Y|X}(y|X))$$
I have sort of "worked out" the RHS to be: 
\begin{align}
f_{Y}(y) &= E(f_{Y|X}(y|X))  \\[5pt]
         &= \int \frac{f_{X,Y}(x,y)}{f_{X}(x)} f_{X}(x) dx  \\[5pt]
         &= \int f_{X,Y}(x,y)dx  \\[5pt]
         &= f_{Y}(y)
\end{align}
Is this approach correct? If so, why do integrate with respect to $f_{X}(x)dx$ ?
 A: To close this one:
$f_{Y|X}(y|X)$ is a function of the random variable $X$. When we write $E(f_{Y|X}(y|X))$ it is understood that the expected value is taken with respect to all "sources of randomness" present. In our case the only source of randomness is $X$, so translating $E$ to an integral we have 
$$ E[f_{Y|X}(y|X)] =  \int_{-\infty}^{\infty} f_{Y|X}(y|X) f_{X}(x) dx$$
Using Baye's law for densities we also have
$$f_{Y|X}(y|X) = \frac{f_{X,Y}(x,y)}{f_{X}(x)}$$
and inserting into the expected value expression and simplifying we get 
$$E[f_{Y|X}(y|X)] = \int_{-\infty}^{\infty} f_{X,Y}(x,y)dx$$
Integrating out $X$ from the joint density, leads in turn to $f_{Y}(y)$, as we are asked to show, because
$$f_Y(y) = \frac {d}{dy} \text {lim}_{x \to \infty} F_{X,Y}(x, y)$$
where $F_{X,Y}(x,y)$ is the joint distribution function, 
$$f_Y(y) = \frac {d}{dy} \text {lim}_{x \to \infty} \int^y_{-\infty} \int_{-\infty}^x f_{X,Y}(s, t)ds\,dt$$
$$ = \frac {d}{dy}  \int^y_{-\infty} \int_{-\infty}^{\infty} f_{X,Y}(x, t)dx\,dt = \int_{-\infty}^{\infty} f_{X,Y}(x, y)dx$$
