$X,Y$ are two random variables with density function
$$f(x,y)=\begin{cases} \frac{4}{3}-\frac{1}{3}x-\frac{1}{3}y&\mbox{if }1<x<2, 0<y<2 \\ 0&\mbox{else}\end{cases}$$
It is known that $E(X) = \frac{13}{9}$ and $E(Y) = \frac{7}{9}. \;\;\;\;$ Calculate $E(XY)$
I like to know how this is done correctly because I'm pretty sure it will be a part of the exam I write soon?
$$E(XY) = \int_{1}^{2} \int_{0}^{2}xy \cdot f(x,y)\, dy \;dx$$
Now we should firstly calculate $$F_Y(y) = \int_{0}^{2} y \cdot f(x,y) \, dy = \int_{0}^{2} \frac{4}{3}y-\frac{1}{3}xy-\frac{1}{3}y^2 \, dy = 2-\frac{2}{3}x$$
Then we have that $$E(XY)=\int_{1}^{2}x\cdot F_Y(y)\;dx = \int_{1}^{2}2x-\frac{2}{3}x^2\;dx = \frac{13}{9}$$