MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a real-valued data set $ x_1, \dots, x_n $, what do you call the quantity

$$\underset{x}{\operatorname{argmin}} \displaystyle\sum\limits_{i=1}^n |x_i - x|$$

This seems like a pretty basic thing to ask for. For example, in a game in which I have to guess the number you're thinking of, and I have to pay you the difference between what I guessed and what you were thinking, the optimal strategy is to guess this quantity. This game seems like a decent model for, say, predicting the stock market and buying and selling accordingly.

I realize that the quantity is not in general unique, but that doesn't mean it isn't useful. Why haven't I heard more about this quantity? Are there any applications in which it is used?

share|cite|improve this question
In your guessing game, wouldn't you want to minimize, rather than maximize, the sum of differences? – Sridhar Ramesh Jul 2 '11 at 4:38
Yes, it should be the minimum (the maximum is infinite). This actually gives the median of $x_1,\dots,x_n$. Specifically, suppose $x_1 < x_2 < \dots < x_n$. If $n=2k+1$, then $x=x_{k+1}$ is the unique minimizer. If $n=2k$, then every $x$ from $x_k$ to $x_{k+1}$ is a minimizer, and there are no others. – Henry Cohn Jul 2 '11 at 4:59
I would call this the "empirical risk minimizing action under absolute loss". This is consistent with David Harris' answer below. – R Hahn Jul 2 '11 at 10:32
up vote 6 down vote accepted

The value of $x$ that satisfies this is the median of $x_i$. It minimizes $L_1$ loss.

Note that the mean of $x_i$ is the value of $x$ minimizing $\sum(x_i - x)^2$, the $L_2$ loss.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.