Continuous Version of Law of total probability for random variables

68 Views Asked by At

Let $X$ be random variable which admits a density function $f_X$. Then due to wikipedia page there exist continuous version of the law of total probability

which states that for every event $A$ on $(\Omega, \mathcal{F}, P)$ there holds the equality

$$ P(A)= \int_{- \infty}^{+\infty} P(A \ \vert \ X=x)f_X(x) dx $$

How it can be proved?
Moreover can this statement be adapted to a version about denisity functions?

Say $X$ and $Y$ are two real RV with density functions $f_X$ and $f_Y$. Let $f_{(X,Y)}$ be the common density function of $(X,Y)$. Then does hold

$$ f_X(x)= \int_{- \infty}^{+\infty} f_{(X,Y)}(x,y) dy $$

and if yes, how to prove it?