[Math] Expected value of the absolute value of the difference of two independent normal random variables

expectationprobability

Let $X$ and $Y$ be two independent identically distributed normal random variables with mean $1$ and variance $1$. Find $c$ so that $E[c|X – Y |] = 1$. That is,
$$E[|X – Y |] = 1/c$$

Progress

What I have done is forming the joint probability of $f(x,y)$. Then I double-integrated
$(x-y)f(x,y)$ and $(y-x)f(x,y)$, both $x$ and $y$ from $0$ to infinity as it is an absolute value.

What I got for the answer is $c = \pi e^{1/2}$. However, the answer given is $(1/2)\sqrt{\pi}$. I would appreciate if someone help me.

Best Answer

If $W=X-Y$ then $W$ is normal with mean $0$ and variance $2$ (so standard deviation $\sqrt{2}.$) This means if we define $Z=W/\sqrt{2}$ we have $Z=N(0,1)$ and we can use the usual density formula $p(z)=(1/\sqrt{2\pi})\exp(-z^2/2)$ for $Z$.

We now can find the expected value of $|Z|$ by integration of $z\cdot p(z)$ from $0$ to $+\infty$ and then doubling that. This gives the expected value for $|Z|$ as $2/\sqrt{2\pi}.$ Now from $E(|W|/\sqrt{2})=2/\sqrt{2\pi},$ we get $E(|W|)=2/\sqrt{\pi}.$