0

This question has already answer in mathstackexchange.see here But I am approaching the problem in this way which is not present in mathstackexchange I think.

So Let $X$ be an RV such that $E|X| \lt \infty$. We have to Show that $E|X −c|$ is minimized if we choose $c=med(X)$. Now what I have tried this:

Let $m=med(x)$ and $c \geq m$ So I want to show $E|X-c|-E|X-m| \geq 0$

Now $|x-c|-|x-m|= \begin{cases} m-c & \text{ if $X \gt c$ } , \\ m-c+2(c-X) & \text{ if $m \leq X \leq c$}\\ c-m & \text{if $X \lt m$} \end{cases}$

Now if $X$ has a pdf $f$ then

$E|X-c|-E|X-m|= (m-c)P(X \gt c)+ (m-c) P(m \leq X \leq c) +2\int_{m}^{c} (c-X)f(x)dx+(c-m)P(X \lt m)$

After few steps we have

$E|X-c|-E|X-m|=-(c-m) +2(c-m)P(X \leq m)+ 2\int_{m}^{c} (c-X)f(x)dx$

Now the first two terms of rhs is greater than equal to 0 but how can I show $$2\int_{m}^{c} (c-X)f(x)dx \geq 0?$$

And similarly for $c \leq m$ we can show $E|X-c|-E|X-m| \geq 0$. So it is minimized at $c=med(X)$.

But in this way I think I never use any property of median. Is this correct way or am i missing something?

Any help is appreciated. Thanks

Alexander
  • 293
  • I would take the derivative with respect to $c$ of $\int_{x=-\infty}^\infty \left(|x-c|-|x-m|\right)f(x), dx$ which is also the derivative of $\int_{x=-\infty}^\infty |x-c|,f(x), dx$ – Henry Jun 14 '22 at 18:56
  • See whether the derivative is positive or negative, remembering that $F(m)=\frac12$ and $F(x)\gt \frac12$ when $x >m$. You may want to split the integral into two or three parts – Henry Jun 14 '22 at 20:58
  • Well, it's a bit previous problem. But thanks for your reply. I don't understand what are you trying to explain, if you could provide more details it will be really helpful. – Alexander Jun 15 '22 at 02:57

0 Answers0