Let $(X,Y)$ be a random vector with uniform distribution at $0 \leq x \leq 1$, $x \leq y \leq x+h$ with $0<h<1$.
Find $E(X)$ and $E(XY)$.
What i did:
(1) Find densities:
$f_X(x) = \left\{ \begin{array}{lr} 1 & : 0 \leq x \leq 1 \\ 0 & : otherwise \end{array} \right.$
$f_Y(y) = \left\{ \begin{array}{lr} 1/h & : x \leq y \leq x+h \\ 0 & : otherwise \end{array} \right.$
(2) Find expected values
$E(X) = \displaystyle\int_0^1xf_X(x)dx = \displaystyle\int_0^1xdx =1/2$
$E(XY) = \displaystyle\int_{-\infty}^{+\infty}\displaystyle\int_{-\infty}^{+\infty}xf_{X,Y}(x,y)dxdy$, this mean i should find $f_{XY}$ or there's another way to do it?. Because here i don't know how can i get $f_{XY}$, my first attempt was consider $f_{XY}= f_{X}f_{Y}$ but it's only true if $X$ and $Y$ are independent.