0

Given that $\mathbb{E}|X| < \infty$, then the min of $\mathbb{E}|X-a|$ is taken at $a$ = median of X, and nowhere else.

The proof my professor gave is the following:

$\mathbb{E}|X| < \infty $ => $\mathbb{E}|X-a| < \infty$. Assume $0$ is the median of X, then $$ \mathbb{P}(X\leq 0) \geq 0.5 $$ $$ \mathbb{P}(X\geq 0) \geq 0.5 $$ given that $a>0$ $$\mathbb{E}(|X-a|-|X|) \geq a \cdot \mathbb{P}(X\leq0) - a \cdot \mathbb{P}(X > 0) \geq 0$$ Can someone please elaborate more on this proof? I'm not quite sure where did $a \cdot \mathbb{P}(X\leq0) - a \cdot \mathbb{P}(X > 0)$ comes from.

Greg Martin
  • 78,820

3 Answers3

1

$\vert x-a\vert-\vert x\vert\ge a1_{\{x\le0\}}-a1_{\{x>0\}}$.

Indeed if $x\le0$ then $\vert x-a\vert-\vert x\vert=\vert x-a\vert+x\ge a-x+x=a$ and if $x>0$ then $\vert x-a\vert-\vert x\vert=\vert x-a\vert-x\ge x-a-x=-a$.

So $$ \mathbb E[\vert X-a\vert-\vert X\vert]\ge\mathbb E[a1_{\{X\le0\}}-a1_{\{X>0\}}]=a\mathbb P(X\le0)-a\mathbb P(X>0). $$

Will
  • 6,842
0

It comes from the convenient observation that \begin{align*} |X-a|-|X| &= \begin{cases} a, &\text{if } X\le0, \\ a-2X, &\text{if } 0<X<a, \\ -a, &\text{if } X\ge a \end{cases} \\ &\ge \begin{cases} a, &\text{if } X\le0, \\ -a, &\text{if } X>0. \end{cases} \end{align*}

Greg Martin
  • 78,820
0

A more detailed proof can be derived in an analytical way.

As an example, let's suppose that $X$ is continuous

$$\xi(a)=\mathbb{E}|X-a|=\int_{-\infty}^a (a-x)f(x)dx+\int_a^{\infty} (x-a)f(x)dx$$

Derivating you obtain

$$\frac{d}{da}\xi(a)=\int_{-\infty}^af(x)dx-\int_a^{+\infty}f(x)dx=F_X(a)-\left[1-F_X(a)\right]$$

Setting it =0 you get

$$F_X(a)=0.5$$

that is

$$a=F_X^{-1}(0.5)$$

which is exactly the definition of median

tommik
  • 32,733
  • 4
  • 15
  • 34