Median minimizes expected absolute loss (source code)

= Median minimizes expected absolute loss
{title2=$\arg\min_a\mathbb E|X-a|$}

For a finite first absolute moment, the minimizers of expected absolute loss are the <medians>. With a density, differentiating the loss gives $2F(a)-1$, so every point where the <cumulative distribution function> equals one half minimizes it. A density gap may give a whole minimizing interval. In contrast, finite squared loss is uniquely minimized by the <expectation>.