Calculating the density of a joint distribution For the joint density function $$P\big((X,Y) \in A\big) = \int_A f_{(X,Y)} (x,y) \, dx\,dy$$ how would you show that if $(X,Y)$ is a random vector in $\mathbb{R}^2$ with density $f_{(X,Y)}$ and $f_{(X,Y)}(x,y) = f(x)g(y)$ for a pair of non-negative functions $f$ and $g$ then $X$ has density $$\frac{f}{\int_\mathbb{R}f(t)\,dt}$$ and $Y$ has density $$\frac{f}{\int_\mathbb{R}g(t)\,dt}\, \, ?$$
 A: $$
\Pr(X\in B) = \Pr((X,Y)\in B\times\mathbb R) = \int\limits_{B\times\mathbb R} f(x)g(y)\,dx\,dy.
$$
Do we believe that this double integral is equal to the following iterated integral?
$$
\int_B \left( \int_{\mathbb R} f(x)g(y)\,dy \right)\,dx
$$
Tonelli's theorem will tell you that you have equality here, since $f,g\ge 0$.  Now
$$
\int_{\mathbb R} f(x)g(y)\,dy = f(x)\int_{\mathbb R} g(y)\,dy
$$
because $f(x)$ does not depend on $y$.  "Constant" always means not depending on something, and there are times when one should explicitly say what something does not depend on.  Now we're looking at
$$
\int_B\left( f(x)\int_{\mathbb R} g(y)\,dy\right)\,dx.
$$
. . . and we say: $\int_{\mathbb R} g(y)\,dy$ does not depend on $x$.  Therefore it is a "constant" and can be pulled out of $\int\cdots\cdots\,dx$.  But I'm not going to do that this time!  Instead, let's observe that we have proved
$$
\Pr(X\in B) = \int_B(\text{a certain function of }x)\,dx.
$$
Therefore that certain function of $x$ is the density that we seek.
A: Given $f_{(X,Y)}(x,y) = f(x)g(y)$ it looks as though $X$ and $Y$ are independent, and so the density of $X$ is just $f(x)$.
As $ \int_{X \le a, y \in \mathbb{R}} f_{(X,Y)}(x,y) = \int_{0}^{a}f(x)\int_\mathbb{R}g(y)dy  \ dx $
$= \int_{0}^{a}f(x)dx = F(a)$
So $x$ has density $\frac{d}{dx}(F(x))=f(x)$
Similarly the integrals in the denominators would be unity. Is the numerator in the latter equation intended to be $g$?
Could be wrong though  - hope I understood the question:)
