Prove that $\min_{\mu}\sum_{i=1}^n|y_i-\mu|=\text{median}\{y_1,\cdots,y_n\}$

183 Views Asked by At

How to prove the equation below in a simple way? $$\min_{\mu}\sum_{i=1}^n|y_i-\mu|=\text{median}\{y_1,\cdots,y_n\}$$