# Minimum Value of Absolute Deviation

1. Apr 11, 2008

### maverick280857

Hi,

How can I rigorously prove that the quantity

$$S = \sum_{i=1}^{n}|X_{i} - a|$$

(where $X_{1},\ldots,X_{n}$ is a random sample and a is some real number) is minimum when a is the median of the $X_{i}$'s?

Thanks.

Last edited: Apr 11, 2008
2. Apr 11, 2008

### maverick280857

Ok I think I got it. If a is the median, then there are just as many numbers less than it than there are greater than it...but how do I write the median in terms of the random sample?

3. Apr 11, 2008

There's no simple way to write it like you can with, say, the mean. What you can do is re-order the sample in increasing order, such that $X_1 \leq \ldots \leq X_{n/2} \leq a \leq X_{n/2 + 1} \leq \ldots \leq X_n$. For the actual proof, you might try working by contradiction: assume some other value of a results in the lowest value for the sum, and then show that you can construct an even lower value by moving a towards the median.