# Need help with a joint density function

• Feb 18th 2010, 07:55 AM
tralli
Need help with a joint density function
First let me apologise for my poor english, it's not my first language.

Here is the joint density function:

$\displaystyle f(y,x)=\left\{\begin{array}{cc}e^{-y},&\mbox{ if } 0 \leq x \leq y \leq 0,\\0, & \mbox{ elsewhere. } \end{array}\right.$

I'm trying to find $\displaystyle E(Y-X)$ and subsequenty $\displaystyle V(Y-X)$.

I started by finding the marginal density functions:

$\displaystyle f_1(Y)= \int_{0}^{y} e^{-y} dx = xe^{-y}\Big|^{y}_{0}=ye^{-y}$

and

$\displaystyle f_2(X)= \int_{x}^{\infty} e^{-y} dy = -e^{-y}\Big|^{\infty}_{x} =e^{-x}$

Integration isn't really my strong suit, but I think I'm on the right path here. Next, finding $\displaystyle E(Y)$ and $\displaystyle E(X)$

$\displaystyle E(Y)= \int_{x}^{\infty} y^2e^{-y}dy= -\frac{y^3}{3}e^{-y}\Big|^{\infty}_{x}=\frac{x^3}{3}$

$\displaystyle E(X)= \int_{0}^{y} xe^{-x}dx=-\frac{x^2}{2}e^{-x}\Big|^{y}_{0}=-\frac{y^2}{2}e^{-y}$

This seems really counter-intuitive, but I'm not sure what I'm doing wrong (or right for that matter). I'd really appreciate any help. Thanks in advance.
• Feb 18th 2010, 11:36 AM
statmajor
Haven't done this in a while, so I just looked on wikipedia. This is what it said (for expected value):

Expected value - Wikipedia, the free encyclopedia
http://upload.wikimedia.org/math/4/f...9a0614a7f4.png result is valid even if X is not statistically independent of Y.

So in your case E(Y - X) = E(Y) - E(X).

To find your V(Y-X), you'll need to use the following property:

Variance - Wikipedia, the free encyclopedia
http://upload.wikimedia.org/math/c/4...d500f2b304.png since in your case X and Y are not independent, their covariance is not 0.
• Feb 18th 2010, 01:17 PM
tralli
Thank you.

Could you maybe look over my integrations for E(Y) and E(X). I'm not really confident I've done them correctly and would appreciate any help
• Feb 18th 2010, 01:23 PM
statmajor
In your calculations of E(Y) and E(X), did you use integration by parts? If you didn't, then you made a mistake.
• Feb 19th 2010, 05:24 AM
tralli
That's the mistake I made. Now it makes sense. Thanks again for your help.
• Feb 19th 2010, 06:58 AM
statmajor