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$.

  • 2
    $\begingroup$ Do you know about the Jensen's inequality? $\endgroup$
    – passerby51
    Dec 27, 2020 at 6:48
  • 2
    $\begingroup$ $\int_{-\infty}^{+\infty} F^2(x)\,\text{d}x=+\infty$ $\endgroup$
    – Xi'an
    Dec 27, 2020 at 10:13
  • 1
    $\begingroup$ 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. $\endgroup$
    – TMat
    Dec 27, 2020 at 16:06
  • $\begingroup$ @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. $\endgroup$
    – passerby51
    Dec 27, 2020 at 17:18

2 Answers 2


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|)$.


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.