I've been trying to find the expected value $E(Z-XY)$ when $f_{x,y,z}=24x$ for $0<x<y<z<1$ and 0 otherwise
I've tried to extract the density function for each variable, and then calculate $EXY$ by the law of total expectation. That got quite complicated pretty fast, and I don't think that's the best way to solve this.
Is there any kind of beautiful shortcut here? and if there isn't, what's the best way find each variable density? (I mean, how to decide what are the integration limits required for each integral)
The answer should be $\frac{8}{15}$
if you integrate the joint density with respect to Z you get the joint density of $(X,Y)$
$$f_{XY}(x,y)=\int_y^1 24x dz=24x(1-y)$$
$0<x<y<1$
and easily find
$$\mathbb{E}[XY]=\int_0^1\int_x^1 xy f(x,y)dxdy=\frac{4}{15}$$
Similarly you can get $f_Z$ obtaining
$$f_Z(z)=4z^3\mathbb{1}_{(0;1)}(z)$$
with mean $\mathbb{E}[Z]=\frac{4}{5}$
thus
$$\mathbb{E}[Z-XY]=\frac{4}{5}-\frac{4}{15}=\frac{8}{15}$$
as desired...