# Expectation of a Joint Distribution

1. Jul 21, 2013

### cborse

The below gives all the information I was given. I'm pretty sure my answer is right, but a part of me isn't, and that's why I'm asking here.

1. The problem statement, all variables and given/known data
Let (X,Y) have the joint pdf:

$f_{XY}(x,y)=e^{-y}, 0 < x < y < \infty$

Find E(XY).

2. Relevant equations

$E(XY)=\int^{\infty}_{-\infty}\int^{\infty}_{-\infty}xyf_{XY}(x,y)dxdy$

3. The attempt at a solution
Using the limits 0 < x < y and 0 < y < ∞,

$E(XY)=\int^{\infty}_{0}\int^{y}_{0}xye^{-y}dxdy=\frac{1}{2}\int^{\infty}_{0}y^{3}e^{-y}dy=3$

Also, are my bounds correct?

2. Jul 21, 2013

### Staff: Mentor

Looks good, and I can confirm the result of the integrations.

3. Jul 21, 2013

### cborse

Thank you very much. Now if I was trying to find $f_{X}(x)$ and $f_{Y}(y)$, which bounds would I use? I tried this (same info as above):

Since $f_{X}(x)=\int^{\infty}_{-\infty}f_{XY}(x,y)dy$,

$f_{X}(x)=\int^{\infty}_{x}e^{-y}dy=e^{-x}$

and

$f_{Y}(y)=\int^{y}_{0}e^{-y}dx=ye^{-y}$

Assuming those are correct, which bounds do I use for E(X) and E(Y)? Because if I use the same bounds that I used for the marginal functions, I'll get the variable x in Y's mean, and the variable y in X's mean.

4. Jul 21, 2013

### Staff: Mentor

Why? You can calculate E(X) and E(Y) with the original distribution and get a real number, or calculate it with your new distributions (in post 3) and get a real number.

5. Jul 21, 2013

### cborse

If I use 0 < x < y for E(X) and x < y < ∞ for E(Y), they'll each contain the other variable. For example,

$E(X)=\int^{y}_{0}xe^{-x}=1-e^{-y}(y+1)$

I have a very strong feeling I'm using the wrong bounds...

EDIT: If I use 0 < x < ∞ and 0 < y < ∞,

$E(X)=\int^{∞}_{0}xe^{-x}=1$

$E(Y)=\int^{∞}_{0}y^2e^{-y}=2$

Is that correct?

Last edited: Jul 21, 2013
6. Jul 21, 2013

### Staff: Mentor

No. You seem to be plugging into formulas without understanding what you are doing. The marginal $f_X(x)$ has no $y$ in it, and the marginal $f_Y(y)$ has no $x$ in it. Here is how it works:
$$f_X(x) \, \Delta x = P\{ x < X < x+\Delta x \} = \int_{y=x}^{\infty} f(x,y)\, \Delta x \, dy = \Delta x \times \int_{y=x}^{\infty} f(x,y)\, dy,$$
so $y$ is gone: it has been "integrated out".