Joint distribution: show the components of the joint distribution are independent. Very odd question I think...
Show that if $(X,Y)$ is a random vector in $\mathbb{R}^{2}$ with density $f_{(X,Y)}(x,y) = f(x)g(y)$ for a pair of non-negative functions $f$ and $g$, then $X$ has density $\displaystyle \frac{f}{\int_{\mathbb{R}}f(t)dt}$, $Y$ has density $\displaystyle \frac{g}{\int_{\mathbb{R}}g(t)dt}$ and $X$ and $Y$ are independent. 
I had some thoughts that this may be to do with marginal distributions in some way, but am pretty stuck where to start, as obviously $f(x)$ does not correspond to the density of $X$, etc...
Thanks for your help,
Sam
 A: $\displaystyle f_X(x) = \int_{-\infty}^\infty f_{X.Y}(x,y)\,\mathrm dy
= \int_{-\infty}^\infty f(x)g(y)\,\mathrm dy = f(x)\int_{-\infty}^\infty g(y)\,\mathrm dy = A\cdot f(x)$ where 
$A\displaystyle=\int_{-\infty}^\infty g(y)\,\mathrm dy$
$\displaystyle f_Y(y) = \int_{-\infty}^\infty f_{X.Y}(x,y)\,\mathrm dx
= \int_{-\infty}^\infty f(x)g(y)\,\mathrm dx = g(y)\int_{-\infty}^\infty f(x)\,\mathrm dx = B\cdot g(y)$ where $\displaystyle B=\int_{-\infty}^\infty f(x)\,\mathrm dx$
Now, to prove that $X$ and $Y$ are independent, we need to show that
$f_{X,Y}(x,y)$, which we have been told equals $f(x)g(y)$, is the
same as $f_X(x)f_Y(y)$. But, our calculations show that
$$f_X(x)f_Y(y) = (A\cdot f(x))\cdot (B\cdot g(y)) = (AB)\cdot f(x)g(y)
\neq f(x)g(y) ~ ~\text{unless}~~ AB =1$$
Fortunately for us, $f_X(x)$ is a valid density, and so 
$\displaystyle \int_{-\infty}^\infty f_{X}(x)\,\mathrm dx
= \int_{-\infty}^\infty A\cdot f(x)\,\mathrm dx = A\cdot B = 1$, that
is, $f_X(x)f_Y(y)$ does equal $f(x)g(y)$ which we have already
been told equals
$f_{X,Y}(x,y)$. We conclude that $f_{X,Y}(x,y)=f_X(x)f_Y(y)$ and so $X$ and $Y$
are independent random variables.
A: $$
\Pr(X\in A) = \Pr(X\in A\ \&\ Y\in(-\infty,\infty)) = \int_A \left( \int_{-\infty}^\infty f(x)g(y)\,dy\right) \,dx.
$$
As $y$ runs from $-\infty$ to $\infty$, the factor $f(x)$ does not change, so that can be pulled out of the integral:
$$
\int\left(f(x) \int_{-\infty}^\infty g(y)\,dy \right)\,dx.
$$
Now as $x$ runs through $A$, the factor $\int_{-\infty}^\infty g(y)\,dy$ does not change, so that can be pulled out of $\int\cdots\cdots\,dx$:
$$
\int_A f(x)\,dx \cdot \int_{-\infty}^\infty g(y)\,dy.
$$
Therefore
$$
\Pr(X\in A) = \left(\int_A f(x)\,dx \cdot(\text{some quantity not depending on }x). \right)
$$
Hence the density of $X$ is $f(x)$ times some constant.  And the constant must be so chosen that the integral of the density is $1$.
The same applies to $Y$ for the same reason, and then we see that
$$
\Pr(X\in A\ \&\ Y\in B) = \int_A f_X(x)\,dx\cdot\int_B f_Y(y)\,dy = \Pr(X\in A)\cdot\Pr(Y\in B),
$$
so we have independence.
