1
$\begingroup$

I have the random variables X and Y, with joint density function $f(x,y)$ over the plane $-\infty < x < \infty$ and $-\infty < y < \infty$. I am trying to find the expectation of $(X-Y)^2$.

Here is my strategy:

1) Let $Z=X-Y$

2) Find the cumulative distribution function of Z, $F_Z(z)$, by integrating over the joint density function of X and Y, using the parameters $-\infty<x<z+y$, and $-\infty<y<\infty$.

3) Differentiate $F_z(z)$ to get the probability density function of z, $f_z(z)$

4) Find the expected value of $Z^2$

I think that this method should work, but I was wondering if there is a simpler approach to solve it that doesn't use so many steps.

$\endgroup$
0
$\begingroup$

Integrate $(x-y)^2f(x,y)$ over the plane.

$\endgroup$
  • $\begingroup$ I see, this is a much better solution. However, I was wondering, would my original method have led me to the same answer? $\endgroup$ – Luchia Dec 7 '13 at 20:56
  • $\begingroup$ Yes, in principle it could have worked, sometimes. Finding the cdf of $Z$ may involve an "undoable" integral. You then differentiate it. There is a way (convolution) to bypass the integration, and get the density of $X-Y$ directly as an integral. One advantage of the expression I gave is that if integration poses difficulties, one can use numerical methods to approximate the answer. $\endgroup$ – André Nicolas Dec 7 '13 at 21:05
0
$\begingroup$

You could also use that $E[(X-Y)^2]=E[X^2-2XY+Y^2]=E[X^2]+2E[XY]+E[Y^2]$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.