Inputs
Count4
Ready
Population deviation divides the squared spread by the count. Sample deviation divides by the count minus one. On 2, 4, 6, 8 the mean is 5. The deviations are −3, −1, +1, and +3. The squared deviations sum to 20. Divide by 4 and the population variance is 5, so the population standard deviation is the square root of 5, which is 2.24. Divide by 3 and the sample variance is 6.67, so the sample standard deviation is 2.58. The extra division by n − 1 is Bessel's correction: a sample's own mean understates the spread of a larger population.
Use the population figures when the list is the entire group you care about, these four numbers and no others. Use the sample figures when the four are a sample and you are estimating a wider group. Spreadsheet STDEV.P is the population line. STDEV.S is the sample line. With one number, the sample deviation is undefined, because n − 1 is 0.
The page also prints the mean, median, quartiles, percentiles, and outliers, the same bundle as the statistics page. Open this one when the argument is which deviation you meant. The list can be typed or dropped in as a text file of numbers.
Values 2, 4, 6, 8.
Mean 5. Population variance 5, population SD 2.24. Sample variance 6.67, sample SD 2.58.
Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.
The population standard deviation is 2.24. The sample standard deviation is 2.58. They divide the same sum of squares, 20, by 4 and by 3.
Population divides by n. Sample divides by n − 1. Sample is the unbiased estimate when the list is not the entire population.
STDEV.P and STDEV.P's older STDEVP match the population line. STDEV.S matches the sample line. A bare STDEV in current Excel is the sample version.
The mean is 5. (−3)² + (−1)² + 1² + 3² = 9 + 1 + 1 + 9 = 20.
The population variance is 0. The sample variance is undefined, because there is no n − 1 to divide by.