Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Quartiles
Percentiles
Quantiles
Standard Deviation and Variance
10. Sample standard deviation

## Instruction

The formula for the standard deviation (SD) we gave you:

SD=\sqrt{\frac{1}{n}((x_1-\overline{x})^2+(x_2-\overline{x})^2+\ldots+(x_n-\overline{x})^2)}

is in fact the formula for population standard deviation. It should only be used when we have the whole dataset and not just a sample of it (for example, if we're computing the standard deviation of quiz results for all students in our class).

SD=\sqrt{\frac{1}{n-1}((x_1-\overline{x})^2+(x_2-\overline{x})^2+\ldots+(x_n-\overline{x})^2)}

As we said before, all these formulas are heuristics. People have found that the sample standard deviation works slightly better for sample data—that is, it gives more accurate results.

External tools for calculating standard deviation (such as the ones in Excel) usually have two different functions: one for population standard deviation and one for sample standard deviation. In Excel, the function for calculating population standard deviation is called STDEVP. The function for sample standard deviation is called STDEV.

As this course only deals with descriptive statistics, we'll use the phrase "standard deviation" to mean "population standard deviation". Note that in other sources, the term may be used differently.