3

For a continuous random variable $X$, I want to show that $E|X-m|$ is minimum implies $m$ is the median of the distribution. Assume that the distribution function is $F$ and the density function is $f$.

In this case, we basically need to minimize

$$\int_x |x-m|f(x)\,dx=\int_{x>m}(x-m)f(x)\,dx+\int_{x<m}(m-x)f(x)\,dx.$$

I am finally being left with $2mF(m)-m+E(X)-2\int_{x<m}xf(x)\,dx$. What does it mean to minimise this expression? Is there some way out?

Well, my intuition says that since I have to prove that $F(m)=0.5$, I somehow will need to show that $E|X-m|$ is minimised if $2mF(m)-m=0$ (as then I will get $F(m)=0.5$

Landon Carter
  • 12,906
  • 4
  • 32
  • 79

1 Answers1

2

I'll denote your expression by $R(m)$; then

$$R'(m) = 2 F(m) + 2 m f(m) - 1 + 0 - 2 m f(m) = 2 F(m) - 1$$

where I used the FTC on the last term. So $R'(m)=0$ if and only if $F(m)=1/2$, as desired. That gives you a critical point. Now it is a minimum provided that $f(m)>0$, because

$$R''(m) = 2 f(m).$$

If it is a minimum then it is a global minimum, because $R$ is convex. If it is not a minimum then, because $R'' \geq 0$ globally, $R$ is actually locally constant near the candidate for the median. This implies that there is not a unique median. One important case where this occurs is with a uniform distribution on a discrete set with an even number of elements. In this case, supposing the elements are listed in order as $\{ x_i \}_{i=1}^{2k}$, any number in $[x_k,x_{k+1})$ will be a median.

Ian
  • 101,645
  • I had done exactly this and even did the derivative test but it did not come. And now when I look back I find that I had made a casual silly error. Darn!! – Landon Carter Feb 06 '15 at 16:49