# Sample Standard Deviation vs. Population Standard Deviation. I have an HP 50g graphing calculator and I am using it to calculate the standard deviation of some data. In the statistics calculation there is a type which can have two values: Sample Population

Sample Standard Deviation vs. Population Standard Deviation
I have an HP 50g graphing calculator and I am using it to calculate the standard deviation of some data. In the statistics calculation there is a type which can have two values:
Sample Population
I didn't change it, but I kept getting the wrong results for the standard deviation. When I changed it to "Population" type, I started getting correct results!
Why is that? As far as I know, there is only one type of standard deviation which is to calculate the root-mean-square of the values!
Did I miss something?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Ostrakodec3
Step 1
There are, in fact, two different formulas for standard deviation here: The population standard deviation $\sigma$ and the sample standard deviation s.
If ${x}_{1},{x}_{2},\dots ,{x}_{N}$ denote all N values from a population, then the (population) standard deviation is
$\sigma =\sqrt{\frac{1}{N}\sum _{i=1}^{N}\left({x}_{i}-\mu {\right)}^{2}},$
where $\mu$ is the mean of the population.
If ${x}_{1},{x}_{2},\dots ,{x}_{N}$ denote N values from a sample, however, then the (sample) standard deviation is
$s=\sqrt{\frac{1}{N-1}\sum _{i=1}^{N}\left({x}_{i}-\overline{x}{\right)}^{2}},$
where $\overline{x}$ is the mean of the sample.
Step 2
The reason for the change in formula with the sample is this: When you're calculating s you are normally using ${s}^{2}$ (the sample variance) to estimate ${\sigma }^{2}$ (the population variance). The problem, though, is that if you don't know $\sigma$ you generally don't know the population mean $\mu$, either, and so you have to use $\overline{x}$ in the place in the formula where you normally would use $\mu$. Doing so introduces a slight bias into the calculation: Since $\overline{x}$ is calculated from the sample, the values of xi are on average closer to ${x}_{i}$ than they would be to $\mu$, and so the sum of squares $\sum _{i=1}^{N}\left({x}_{i}-\overline{x}{\right)}^{2}$ turns out to be smaller on average than $\sum _{i=1}^{N}\left({x}_{i}-\mu {\right)}^{2}$. It just so happens that that bias can be corrected by dividing by $N-1$ instead of N. (Proving this is a standard exercise in an advanced undergraduate or beginning graduate course in statistical theory.) The technical term here is that ${s}^{2}$ (because of the division by $N-1$) is an unbiased estimator of ${\sigma }^{2}$.
Another way to think about it is that with a sample you have N independent pieces of information. However, since $\overline{x}$ is the average of those N pieces, if you know ${x}_{1}-\overline{x},{x}_{2}-\overline{x},\dots ,{x}_{N-1}-\overline{x}$, you can figure out what ${x}_{N}-\overline{x}$ is. So when you're squaring and adding up the residuals ${x}_{i}-\overline{x}$, there are really only $N-1$independent pieces of information there. So in that sense perhaps dividing by $N-1$ rather than N makes sense. The technical term here is that there are $N-1$ degrees of freedom in the residuals ${x}_{i}-\overline{x}$.