CCalculate.Studio
education · 7 min · Última revisión: 2026-07-07

Sample vs Population Standard Deviation: When to Use Which

TL;DRPopulation standard deviation divides the sum of squared deviations by n, while sample standard deviation divides by n - 1, a correction that compensates for the sample mean underestimating spread around the true population mean. For the data set 2, 4, 4, 4, 5, 5, 7, 9, the population standard deviation is exactly 2 and the sample standard deviation is approximately 2.13809 -- the same numbers, two different answers depending on what the data represent. The sample form (n - 1) is correct whenever the data are a subset used to estimate a larger population, which is the situation in the large majority of real statistical work.

Two formulas, one small but important difference

Both standard deviation formulas start identically: compute the mean of the data, subtract it from each value, square each deviation, and add the squares together. Where they diverge is the final division step. The population standard deviation, denoted with the Greek letter sigma, divides that sum of squared deviations by n, the total count of values, then takes the square root. The sample standard deviation, denoted s, divides the same sum by n - 1 instead, then takes the square root -- a change known as Bessel's correction.

Because n - 1 is always a smaller divisor than n (for n greater than 1), the sample standard deviation is always slightly larger than the population standard deviation calculated from the exact same numbers. The two formulas are not competing methods for the same question; they answer two different questions about the same data, and choosing the wrong one produces a systematically biased answer to whichever question you actually meant to ask.

Worked example: the same eight numbers, two answers

Take the data set 2, 4, 4, 4, 5, 5, 7, 9 (n = 8). Step 1: the mean is (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) / 8 = 40 / 8 = 5. Step 2: the deviations from the mean are -3, -1, -1, -1, 0, 0, 2, 4, and squaring each gives 9, 1, 1, 1, 0, 0, 4, 16, which sum to 32. From this single sum of squared deviations, the two formulas diverge only at the final division.

Population standard deviation: divide 32 by n = 8, giving a population variance of 4, and the square root of 4 is exactly 2. Sample standard deviation: divide the same 32 by n - 1 = 7, giving a sample variance of 32 / 7 = 4.571429 (rounded to six places), and the square root of 4.571429 is approximately 2.13809. The table below lays out both calculations side by side from the same starting sum.

StepPopulation form (divide by n)Sample form (divide by n - 1)
Sum of squared deviations3232
Divisorn = 8n - 1 = 7
Variance32 / 8 = 432 / 7 = 4.571429
Standard deviationsqrt(4) = 2sqrt(4.571429) = 2.13809

Why divide by n - 1? Bessel's correction explained

The sample mean used inside the deviation calculation is itself computed from the same data whose spread is being measured, and it is mathematically guaranteed to be the value that minimizes the sum of squared deviations for that specific sample. This means the squared deviations measured around a sample mean are, on average, slightly smaller than the squared deviations that would be measured around the true, unknown population mean -- so dividing by n alone systematically underestimates the population variance when working from a sample.

Dividing by n - 1 instead of n inflates the result just enough to correct this downward bias on average, making the sample variance an unbiased estimator of the population variance across repeated sampling. The correction is named Bessel's correction after the 19th-century astronomer and mathematician Friedrich Bessel. Its effect is largest for small samples -- for n = 8 the divisors 8 and 7 differ by 12.5% -- and shrinks toward negligible as n grows into the hundreds or thousands, since n and n - 1 converge proportionally.

Do you have a population or a sample?

Use the population standard deviation (divide by n) only when your data set is the entire group you care about, with no intention of generalizing beyond it -- for example, the ages of every player currently on one specific sports team, or the exam scores of every student in one specific class, when the question is only about that team or that class and nothing wider.

Use the sample standard deviation (divide by n - 1) whenever your data are a subset drawn from, or intended to represent, a larger population you want to draw conclusions about -- for example, a survey of 500 customers used to estimate satisfaction across all customers, a clinical trial's participants used to estimate an effect in the wider patient population, or a batch of quality-control measurements used to characterize an entire production line. This is the far more common situation in applied statistics, which is why most statistical software defaults to the sample (n - 1) formula unless told otherwise.

How much does the choice actually matter?

For very small samples, the gap between the two formulas is proportionally large and choosing incorrectly can meaningfully distort downstream results, including confidence intervals and z-scores that are built directly on top of the standard deviation. For the n = 8 example above, the sample value (2.13809) is about 6.9% larger than the population value (2), a gap large enough to shift a confidence interval's width by a similar margin.

As sample size increases, n and n - 1 become proportionally closer, and the two standard deviations converge: for a sample of 1,000, dividing by 999 instead of 1,000 changes the result by only about 0.05%. In large-sample settings the choice rarely changes practical conclusions, but the correct convention should still be applied, both for consistency with standard statistical practice and because small-sample cases -- where the difference matters most -- are exactly when getting it right counts.

Preguntas frecuentes

What is the difference between sample and population standard deviation?

Population standard deviation divides the sum of squared deviations from the mean by n (the count of values) and is correct when the data set is the entire population of interest. Sample standard deviation divides the same sum by n - 1 instead and is correct when the data are a sample used to estimate a larger population. For identical data, the sample value is always slightly larger than the population value, because it divides by a smaller number.

Why do we divide by n - 1 for a sample?

Because the sample mean is computed from the same data used to measure spread, it is mathematically the value that minimizes the sum of squared deviations for that sample, making those deviations systematically a little smaller than deviations around the true population mean. Dividing by n - 1 rather than n, a correction known as Bessel's correction, compensates for this and makes the sample variance an unbiased estimator of the population variance.

Which one should I use for a survey or experiment?

Use the sample standard deviation (n - 1) whenever your data are a subset intended to represent a larger population -- which covers the large majority of surveys, experiments, and quality-control samples. Use the population standard deviation (n) only when your data set is the complete group you are studying, with no intent to generalize to anything beyond it.

How different are the two answers in practice?

For the worked example (2, 4, 4, 4, 5, 5, 7, 9; n = 8), the population standard deviation is exactly 2 and the sample standard deviation is approximately 2.13809, a difference of about 6.9%. The gap shrinks as sample size grows: for n = 1,000, dividing by 999 instead of 1,000 changes the result by roughly 0.05%, making the choice far less consequential for large samples.

Does the n - 1 correction affect the mean as well?

No. The mean is always the simple sum of values divided by the count, n, regardless of whether the data represent a sample or a population; Bessel's correction applies only to the standard deviation and variance calculations, not to the mean itself.

Referencias

  1. National Institute of Standards and Technology (NIST). NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.5.6: Measures of Scale. nist.gov.
  2. Moore DS, McCabe GP, Craig BA. Introduction to the Practice of Statistics. W. H. Freeman (sample vs population standard deviation).
  3. Weisstein, Eric W. "Standard Deviation" and "Bessel's Correction." MathWorld — A Wolfram Web Resource. mathworld.wolfram.com.

Calculadoras relacionadas