Independence of $(X,Y)$ with joint PDF $f_{X,Y}(x,y)=8xy$ on $ 0<y<x<1$ I know that as a general property, if

$f_{X,Y}(x,y)=g(x)h(y)$, then we say X and Y are independent random variables.

However, I am having trouble to accept this statement. Take the case:

$f_{X,Y}(x,y)=8xy, 0&lt;y&lt;x&lt;1$

Then, $f_{X}(x)=4x$ and $f_{Y}(y)=4y$, where $f_{X}(x).f_{Y}(y)\ne f_{X,Y}(x,y)$ 

Maybe I am getting something wrong over the limits of integration, I often trip on simple things... Or maybe, in this case, since the variables are dependent in the limits of integration, then they cannot be independent. But I havent seen any book point that as a requirement... So I suppose I got something wrong in my calculations. 

If someone could please clarify this for me, I would be grateful.
Take the case: $f_{X,Y}(x,y)=8xy, 0&lt;y&lt;x&lt;1$. 


Yet again an excellent example of the fact that densities should include restrictions on their domain.

Recall that any density of the couple of random variables $(X,Y)$ should be a function $f:\mathbb R\times\mathbb R\to\mathbb R_+$ such that what-you-know holds. In the present case, $f:\mathbb R\times\mathbb R\to\mathbb R_+$, $(x,y)\mapsto8xy$ is (obviously) not a density. Rather, a density of $(X,Y)$ is  $f:\mathbb R\times\mathbb R\to\mathbb R_+$, $(x,y)\mapsto8xy\mathbf 1_{0&lt;y&lt;x&lt;1}$ (for example $f(1,2)=0$, not $16$).

Now the result you mention is correct:


  The random variables $X$ and $Y$ with density $f$ are independent if and only if there exist $g$ and $h$ such that $f(x,y)=g(x)h(y)$ for (almost) every $(x,y)$ in $\mathbb R\times\mathbb R$.


Which does not hold for the density $f$ in the example.

This remark is also useful when computing marginals. In general,
$$
f_X(x)=\int_\mathbb Rf(x,y)\mathrm dy,
$$
hence in the present case,
$$
f_X(x)=\mathbf 1_{0&lt;x&lt;1}\int_\mathbb R8xy\mathbf 1_{0&lt;y&lt;x}\mathrm dy=x\mathbf 1_{0&lt;x&lt;1}\int_0^x8y\mathrm dy=4x^3\mathbf 1_{0&lt;x&lt;1}.
$$
Note the absence of cases and the automaticity of the computations, thanks to adequate notations.

To sum up:


  When a joint distribution is given by its PDF, a détour by the joint CDF is useless (and frankly often cumbersome) provided one uses the true PDF, which should include indicator functions if need be.
I think you're slightly confused with this characterization of independence. If we assume that $X$ and $Y$ have density functions $f_X$ and $f_Y$ and joint distribution $f_{X,Y}$, then $X$ and $Y$ are independent iff $f_{X,Y} = f_x \cdot f_y$. This is not the same as the property you listed above, the $g(x)$ and $h(y)$ must be the marginal density functions and not just any function of $x$ and $y$.