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.