TITLE: Why is it so cool to square numbers (in terms of finding the standard deviation)?
QUESTION [47 upvotes]: When we want to find the standard deviation of $\{1,2,2,3,5\}$ we do
$$\sigma = \sqrt{ {1 \over 5-1} \left( (1-2.6)^2 + (2-2.6)^2 + (2-2.6)^2 + (3-2.6)^2 + (5 - 2.6)^2 \right) } \approx 1.52$$. 
Why do we need to square and then square-root the numbers?

REPLY [4 votes]: Here is a simple-minded explanation: The standard deviation as a "measure of dispersion" is the natural partner of the arithmetic mean as a "central statistic". 
Suppose we are given $n+1$ measurements (say lengths) $x_0 \le x_1 \le \cdots \le x_{n},$ and wish to choose a single value $x^*$ to represent them. We need a metric for how good a particular $x^*$ is. Then we choose the value which minimizes the "agregate discrepancy".

If our metric is $\sum |x_i-x^*|,$ then it is best to take $x^*=x_{n/2}$ (the median) for even $n$ and any $x_{(n-1)/2} \le x^* \le x_{(n+1)/2}$ for odd $n$. It is perhaps unfortunate that only one or two of the $x_i$ actually matter. 
Of course for $\sum(x_i-x^*)^2$ the unique minimum occurs for the familiar arithmetic mean $x^*=\frac{\sum x_i}{n+1}.$ We prefer to use the metric $\sqrt{\sum(x_i-x^*)^2}$ Since the "dispersion" is the same for measuring in inches as in feet (and the units are correct). There are also reasons to divide by $n+1$ or by $n,$  but none of this changes the minimizing value and the question was about the squaring.
For $\sum|x_i-x^*|^p$ with varying $p$ we get the standard median as $p \rightarrow 1^+$ and $\frac{x_0+x_n}2$ as $p \rightarrow \infty.$
I suppose the mode would result from calling the discrepancy $0$ or $1$ according as $x_i = x^*$ or $x_i \neq x^*.$
Would $\sum \ln|x_i-x^*|$ (equivalently, $e^{\sum \ln|x_i-x^*|}$) give the geometric mean $\sqrt[n+1]{\prod{x_i}}?$
It might not be hard to find other metrics which yield the  harmonic mean $$\frac1{\sum \frac1{x_i}},$$ and perhaps even the AGM.