# How to show that $E|X-\mu| \leq E|X-Y|$?

Suppose $$X$$ and $$Y$$ are independent and from the same distribution whose cumulative distribution function is $$F$$. Suppose $$X$$ is integrable.

How to show that $$E|X-\mu| \leq E|X-Y|,$$ where $$\mu=E(X)$$?

I tried using $$E|X-Y| = 2\int_{-\infty}^{\infty}F(x)(1-F(x))\,dx$$ and $$E|X-\mu|=2\int^{\mu}_{-\infty}F(x)\,dx$$ And got $$\frac{1}{2}[E|X-Y|-E|X-\mu|] = \int_{\mu}^{\infty}F(x)\,dx-\int_{-\infty}^{\infty}[F(x)]^2\,dx$$ I don't know how to prove that this is greater than $$0$$.

• Do you know about the Jensen's inequality? Dec 27, 2020 at 6:48
• $\int_{-\infty}^{+\infty} F^2(x)\,\text{d}x=+\infty$ Dec 27, 2020 at 10:13
• It is just the triangle inequality: $E_X[|X-E_Y[Y]|]=E_X[|E_Y[X-Y]|]\le E_X[E_Y[|X-Y|]=E[|X-Y|]$, no need for Jensen.
– TMat
Dec 27, 2020 at 16:06
• @TMat, Perhaps you would be surprised that some people consider the triangle inequality (as you stated) as a special case of the Jensen's. (And some people would consider this the triangle inequality: $E|X + Y| \le E|X| + E|Y|$ for the $L_1$ norm.) In any case, learning about Jensen if they don't know would be the more valuable outcome of this question. Dec 27, 2020 at 17:18

Some hints:

Define $$\DeclareMathOperator{\E}{\mathbb{E}} g(y)=\E |X-y|$$ and show that $$g$$ is a convex function. See for instance https://math.stackexchange.com/questions/2591194/convexity-concavity-preserving-under-integral. The look up Jensen's inequality.

Compare $$g(\mu)=g(\E Y)$$ and $$\E g(Y)$$.

It's also possible without using Jensen's inequality.

For $$x > \mu$$, $$E(|x-Y|) \ge E(x - Y) = x - E(Y) = x - \mu = |x - \mu|$$

For $$x \le \mu$$, $$E(|x - Y|) \ge E(Y - x) = E(Y) - x = \mu - x = |x - \mu|$$

So for any value of $$x$$, conditional on $$X = x$$, $$E(|X - Y|) \ge E(|X - \mu|)$$.