Skip to main content
1 of 2
user13985
  • 984
  • 4
  • 12
  • 21

Why is median the solution to absolute difference, but mean is the solution to squared difference?

What is the value of $a$ and $b$ that minimizes the $L_1$ and $L_2$ norm, respectively? $$ \min_{a} \mathrm{E} \left| X - a \right| $$ I was told that median is the solution. How do you solve it? Why can't it be the mean instead?

$$\mathrm{E} (X - b) ^ 2$$ I was told that mean $\mu$ is the solution to the squared error. How do you solve it?

user13985
  • 984
  • 4
  • 12
  • 21