Standard deviation: When to use which sum-coefficient?

47 Views Asked by At

I'm wondering when to use

$\sigma = \sqrt{\frac{1}{n-1} \sum_{i=1}^{n}(X_{i}-X_{mean})^2}$

and when to use

$\sigma = \sqrt{\frac{1}{n} \sum_{i=1}^{n}(X_{i}-X_{mean})^2}$

which I have both seen in dfferent scenarios in my studys. Could you please help me to elaborate this?

Thanks a lot in advance

1

There are 1 best solutions below

0
On

The second gives you the average error in your sample, the first gives you the estimated error in the population from the sample. Why divide by $n - 1$ for the population error estimate? Because the sample has $n - 1$ degrees of freedom; you are free to choose one observation in each sample. If this doesn't help then you can think of it as increasing the estimate to account for the fact you've taken a sample which in itself has an error (if you take lots of samples from the population you'd likely get lots of different estimates for the standard deviation).

In reality the difference is often negligible, especially for large samples, and I would suggest if it does make a big difference then your sample size is probably too small. Having said that if you are stuck with a small sample then use the first.