# Two-dimensional random variable - determine $E(XY)$

Given random variables $$X,Y$$ with density function $$f(x,y)=\begin{cases} \frac{1}{3}(4-x-y) & \text{if } \,\,\,\,\,1 < x < 2, \,\, 0 < y < 2 \\0 & \text{otherwise}\end{cases}$$

How do you determine $$E(X \cdot Y)$$ ?

I have looked up the formula of how you can calculate the expected value of continuous distributions as this one, but I'm having trouble with this example because it's multidimensional :c

Using the formula I found here (https://en.wikipedia.org/wiki/Expected_value) , I think it would be correct to start like that:

$$E(XY) = \int_{1}^{2} \int_{0}^{2} xy \cdot f(x,y) \,\, dy \, dx$$

And then I need to do 2 separate calculations; one time for the inner-integral, and another for the outer-integral, right?

So first determine $$f_{X}(x) =\int_{0}^{2} y \cdot f(x,y) \,\, dy$$

And after that, determine $$E(XY) =\int_{1}^{2} x \cdot f_{X}(x) \,\, dx$$

Can you please tell me if it's correct like that? Because I'm having an exam soon and this could be one part of it :/

• I would recommend you do: $\int_0^2 \int_1^2 xy f(x,y)dx dy$. In the inner integral treat $y$ as a constant. – fGDu94 Jan 17 at 15:50

$$\mathbb E(XY)=\int_{\text{for all }x}\int_{\text{for all }y} xyf(x,y)\:dy\:dx$$ In order to perform double integral take a look at here. Remember when they are independent, then $$\mathbb E(XY)=\mathbb E(X)\mathbb E(Y)$$
Just simply substitute $$f(x,y)$$ in $$E\{XY\}$$ and use $$\iint x^my^ndxdy={x^{m+1}y^{n+1}\over (m+1)(n+1)}$$