Apparently, the mean is the value that minimizes the sum of the squares of deviations, and this made sense to me because the sum of the squared differences can be represented as an equation:
(a - x)^2 + (b - x)^2 + (c - x)^2 + ...
This function has a minimum when we take the derivative and solve it when it's equal to zero:
0 = -2(a – x) + -2(b – x) + -2(c – x) + ...
Some more arithmetic will allow us to arrive at the conclusion:
x = (a + b + c + ...) / N
However, I'm having trouble finding a similar way to solve for the median, although I suspect my rusty calculus or arithmetic is behind it.
The sum of absolute deviations would produce the equation:
|a-x| + |b-x| + |c-x| + ...
I think the derivative function would be:
0 = -(a-x)/|a-x| + -(b-x)/|b-x| + -(c-x)/|c-x|
But I am not sure how to continue from here.