Median of Random Variable

446 Views Asked by At

Let X be an integrable random variable. Show that the function $a \mapsto E|X −a|$ attains its minimum at $a = \mathrm{Med}(X)$.

I think this means as $a$ approaches median of X. This makes intuitive sense since the expected value of a random variable indicates its weighted average. I know that if $a \mapsto E|X −a|^2$ then its minimum is at $a = E(X)$ which is $0$. But this here is a little confusing. Any hints would be appreciated.

sorry but this is actually a duplicate...

1

There are 1 best solutions below

0
On BEST ANSWER

We have $$E(|X-a|)=\int_{-\infty}^{\infty}|x-a|f(x)\,\mathrm dx\\=\int_{-\infty}^a(a-x)f(x)\,\mathrm dx+\int_a^{\infty}(x-a)f(x)\,\mathrm dx\\ =aP(X<a)-aP(X>a)-\int_{-\infty}^axf(x)\,\mathrm dx+\int_a^{\infty}xf(x)\,\mathrm dx.$$ Try differentiating this with respect to $a$.