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?