# Why isn't standard deviation $\frac{1}{n}\sqrt{\sum^n_{i=1}(x_i - \mu)^2}$?

I.e. why not square everything to get rid of signs, undo the square with the square root, and then average out the deviation? Am I completely missing the point?

You are missing the point that the definition of the standard deviation is the square root of the variance $$V$$ which is defined as $$V = \frac 1n \sum_{i=1}^n (x_i-\mu)^2.$$ So why is $$V$$ defined the way it is? Well, a standard model is that the $$x_i$$ are a random sample from a distribution with known mean $$\mu$$ and unknown variance $$\sigma^2 = E[(X-\mu)^2]$$ and so $$V = \frac 1n \sum_{i=1}^n (X_i-\mu)^2\\$$ is a random variable whose expected value $$E[V]$$ is just $$\sigma^2$$. Today, the random variable $$V$$ happens to have value $$\frac 1n \sum_{i=1}^n (x_i-\mu)^2$$ and we are using this value as an estimate of $$\sigma^2$$. We are also calling $$V$$ as the variance of the random sample.

Be that as it may, you are averaging too late by dividing the square root of the sum $$\sum_{i=1}^n (x_i-\mu)^2$$ by $$n$$; you need to do the averaging right after the sum has been computed rather than after the square-rooting has been done.

• This answer seems unsatisfying because it begs the question. Variance is defined as $\mathbb{E}[(X-\mu)^2]$. If variance had an estimator that contained $\frac{1}{n^2}$ in place of $\frac{1}{n}$, then standard deviation would match OP's expression. So how do we know that $V$ is the correct expression? – Sycorax Jul 6 '19 at 15:23
• It’s the standard way of estimating variance via maximum likelihood. I wonder if a variance estimator with $1/n^2$ would even be admissible. If you can come up with such an admissible estimator, than the posted standard deviation formula could be viable. – Dave Jul 6 '19 at 15:32
• @Dave I know that $V$ is the correct expression. I’m just pointing out that the answer hinges on an unsupported assertion — even though it asserts something which is true. – Sycorax Jul 6 '19 at 16:12
• @Sycorax If the $x_i$ are independent samples from a distribution with known mean $\mu$, then $\frac 1n\sum_{i=1}^n (x_i-\mu)^2$ can be viewed as a random variable whose expected value $E\left[\frac 1n\sum_{i=1}^n (X_i-\mu)^2\right]$ is $V = E[(X-\mu)^2]$. – Dilip Sarwate Jul 7 '19 at 2:48
• That would make a good addition to the answer. – Sycorax Jul 7 '19 at 2:59

An example might illustrate the point

Suppose we have a population where the relative frequency of being

• value $$20$$ is $$0.1$$
• value $$25$$ is $$0.6$$
• value $$30$$ is $$0.3$$

I can tell you that the mean is $$\mu = \sum_j x_j p_j =26$$, the variance is $$\sigma^2=\sum_j (x_j-\mu)^2 p_j =9$$ and the standard deviation is $$\sigma=3$$ no matter what the total population is. For example

• with a population of $$n=100$$, there are $$10$$ copies of $$20$$, $$60$$ copies of $$25$$ and $$30$$ copies of $$30$$. Using $$\sqrt{\frac{1}{n}\sum^n_{i=1}(x_i - \mu)^2}$$ I would get $$3$$ while with $$\frac{1}{n}\sqrt{\sum^n_{i=1}(x_i - \mu)^2}$$ you would get $$0.3$$

• with a population of $$n=10000$$, there are $$1000$$ copies of $$20$$, $$6000$$ copies of $$25$$ and $$3000$$ copies of $$30$$. Using $$\sqrt{\frac{1}{n}\sum^n_{i=1}(x_i - \mu)^2}$$ I would still get $$3$$ while with $$\frac{1}{n}\sqrt{\sum^n_{i=1}(x_i - \mu)^2}$$ you would get $$0.03$$

It is desirable to get the same answer both times as the relative frequencies and the dispersion in the population is the same; all that has changed is the size of the population.

Your suggestion starts to make sense if we start talking about taking samples and estimating the mean from the sample and want a measure of the possible error in the estimate of the estimate of the mean. But that is a deeper question, and the statistic in question is then called the standard error of the mean rather than the standard deviation of the population or of the sample.