# Two definitions for standard deviation

There seem to be two canonical definitions for the standard deviation. $$\sigma_n = \langle(n - \langle n\rangle)^2\rangle^{1/2}$$ and $$\sigma_n = \sqrt{\langle n^2\rangle - \langle n\rangle^2}$$

How do we reconcile these two? I've tried expanding $\langle n \rangle = \sum n \cdot P(n)$ to no avail.

• The first one is the variance en.wikipedia.org/wiki/Variance , whose square root is the standard deviation – Pierpaolo Vivo Feb 13 '16 at 8:30
• Ah, that's my bad. Forgot to add the exponent. Edited! – Andrew H. Feb 13 '16 at 8:32
• I would say that the first one is canonical and the second a derivation. – copper.hat Feb 13 '16 at 8:47

$$\sigma_n = \langle(n - \langle n\rangle)^2\rangle^{1/2}=\langle (n^2+\langle n\rangle^2-2 n \langle n\rangle)\rangle^{1/2}$$ and then use linearity of the average to conclude $$\sigma_n=(\langle n^2\rangle+\langle n\rangle^2-2\langle n\rangle^2)^{1/2}\ .$$
With $\bar{x} = Ex$, we have $E (x -\bar{x})^2 = E (x^2 -2x \bar{x} + \bar{x}^2) = E x^2 - 2 \bar{x}^2+ \bar{x}^2 = E x^2 - \bar{x}^2$.
Here is the proof. \begin{aligned} \sigma_n = \sqrt(\sum_i(x_i-\mu)^2) & =\sqrt(\sum_i x_i^2 +\sum_i\mu^2-2\sum_ix_i\mu) = \sqrt(\sum_ix_i^2-\sum_i\mu^2)\quad (since \sum_i x_i = n\mu) \end{aligned}\langle(n - \langle n\rangle)^2\rangle^{1/2} = \langle n^2 - 2n \langle n\rangle+\langle n\rangle^2\rangle^{1/2} = \left(\langle n^2\rangle - 2\langle n \rangle \langle n\rangle+\langle n\rangle^2\right)^{1/2}= \left(\langle n^2\rangle - \langle n\rangle^2\right)^{1/2}\$