0

Is it possible to minimize least absolute deviations (LAD) analytically?

Say given a sample $\{x_i\}_{i=1..n}$ find

$$\arg\min_\lambda{\sum_{i=1}^{n}{|x_i-\lambda|}}$$

Royi
  • 10,050

1 Answers1

0

The solution is any median. And as far as I am aware of there is not an "analytical" solution to computing a median in general.

A simple way to do this is to sort the data. There are more elaborate ways of doing this using data structures that maintain order implicitly. Somewhat surprisingly there is a way to compute a median of an unordered list in linear time, that is, time proportional to the length of the list.

shoda
  • 1,478
  • Is there a proof that solution is a median? Or can you give me a hint how to prove it? – Yevhen Yevsyuhov Apr 19 '16 at 18:53
  • This question is a duplicate of the very recent http://math.stackexchange.com/q/1744236, where the OP will find a nice proof (@shoda mentions the median, but it works only in the odd case) – Jean Marie Apr 19 '16 at 19:04