Sample vs Population Standard Deviation
When to divide by n and when by n - 1, what Bessel's correction does and doesn't fix, and how to tell whether your data is a sample or a whole population.
Sample vs Population Standard Deviation
You have a set of numbers and need to calculate the standard deviation. The single most useful question you can ask is: do these numbers represent the entire group you care about, or are they just a sample meant to estimate the group? The answer determines which formula you use, which button you press, and which number you report. Get it wrong and your result is either an underestimate of the true spread (if you treat a sample as a population) or an overestimate (if you treat a population as a sample). The choice between sample vs population standard deviation is the first decision you make.
The One Question to Ask: All of Them, or Some?
If your data set includes every single member of the group you are studying, use the population standard deviation, denoted by the Greek letter sigma (σ). The data is the entire universe you care about. For example, the final exam scores of your 20-student class: every student is in the set, so you have the population. Use the formula σ = √[ Σ(xᵢ − μ)² / N ], where N is the count of all members.
If your data set is a subset intended to represent a larger group, use the sample standard deviation, denoted by s. The data is a slice, not the whole. For example, heights of 100 randomly selected adult women in a city. You do not have every woman's height; you have a sample. Use the formula s = √[ Σ(xᵢ − x̄)² / (n − 1) ], where n is the sample size.
That denominator (n − 1) is Bessel's correction. It is not a fudge factor; it is a mathematical adjustment that makes the sample variance an unbiased estimator of the population variance. The sample standard deviation (the square root of that corrected variance) is not unbiased for the population standard deviation, but the correction still gives a better estimate than using n.
Why n - 1 (Bessel's Correction), Stated Precisely
Bessel's correction fixes a specific problem: if you calculate sample variance using n (the count of your sample), you consistently get a number that is too small, especially for small samples. The reason is that the sample mean is closer to the sample points than the true population mean is. Using n − 1 compensates for that closeness, making the expected value of the sample variance equal to the population variance. This is a proven mathematical result: for i.i.d. samples from a population with finite variance σ², E(s²) = σ² (Casella & Berger, Theorem 7.1).
The common claim that s is an unbiased estimator of σ is wrong. Take it from Casella & Berger (page 331): s is a biased estimator of σ; the bias can be expressed as σ × (1 − cₙ) where cₙ = √(2/(n−1)) × Γ(n/2) / Γ((n−1)/2).The unbiased estimator is for the variance, not the standard deviation.
Side-by-Side Example
Take a sample of five numbers: 2, 4, 6, 8, 10. The sample mean x̄ = 6. The squared deviations from the mean are 16, 4, 0, 4, 16. Their sum is 40. Using n (5) gives a variance of 8 and a standard deviation of √8 ≈ 2.83. Using n − 1 (4) gives a variance of 10 and a standard deviation of √10 ≈ 3.16.
Now imagine those same five numbers are the entire population. The population mean μ = 6. The sum of squared deviations is still 40. Using N (5) gives a variance of 8 and a standard deviation of √8 ≈ 2.83. That is the exact spread of the entire group.
The two results differ by about 0.33. For n = 5, the difference is noticeable. For n = 100, it shrinks to about 0.5%.
| Aspect | Population (σ) | Sample (s) |
|---|---|---|
| Denominator | N | n − 1 |
| When to use | Data covers entire group | Data is a subset intended to estimate a larger group |
| Interpretation | Exact spread of the group | Estimate of the population spread |
| Effect of small n | Not applicable (N is fixed) | The n − 1 correction gives a slightly larger value; the bias in s as an estimator of σ is about 4% at n = 10 |
| Example | All employees' salaries | Random sample of 50 employees from the company |
Which Button: Calculators, TI-84, Excel
TI-84 Plus: Sx vs σx
Press STAT, then CALC, then 1-Var Stats. The calculator outputs two standard deviations: Sx and σx. Sx is the sample standard deviation (n − 1). σx is the population standard deviation (n). The TI-84 Plus guidebook (2018) documents these outputs: x̄, Σx, Σx², Sx, σx, n, minX, Q1, Med, Q3, maxX. If your data is a sample, use Sx. If it is the entire population, use σx. A common failure mode is using σx on a sample; that underestimates the true population variability.
Microsoft Excel: STDEV.S vs STDEV.P
Excel provides two functions. STDEV.S calculates the sample standard deviation using n − 1. STDEV.P calculates the population standard deviation using N. The same distinction applies to variance functions: VAR.S (sample) and VAR.P (population). Using STDEV.P on sample data is the same failure mode as using σx on a TI-84: the result is too small.
Google Sheets
Google Sheets uses STDEV (sample, n − 1) and STDEVP (population, N). The convention matches Excel. If you use the old STDEV function without thinking, you are getting the sample version.
If you are calculating by hand from a frequency table, OpenStax 2e section 2.7 gives the grouped-data formulas: s = √[ Σf(m − x̄)² / (n − 1) ] for sample; σ = √[ Σf(m − μ)² / N ] for population.
Does It Matter for Large n?
For large sample sizes (n > 100), the difference between using n and n − 1 is small, often less than 0.5%. The sample standard deviation s becomes a reasonably good estimate of the population standard deviation σ, even though it is still biased. The bias shrinks as n increases: at n = 30, the bias is about 2.5%; at n = 100, it is about 1%.
But large n does not excuse choosing the wrong formula. If you have a population of records and you treat it as a sample, you introduce a small but unnecessary error. If you have a sample and treat it as a population, you report an underestimate of the true variability. The correct choice is not a matter of convenience; it is a matter of what your data represents.
What Most Often Goes Wrong
The single most common error is treating a sample as a population and using the n-denominator formula (or the STDEV.P button) when you should use n − 1. This gives a standard deviation that is too small, which means you underestimate the variability of the population you are trying to estimate. The error is most costly with small samples. The second most common error is believing s is an unbiased estimator of σ; it is not, and that misunderstanding leads to overconfident claims about precision. The correction for variance is exact; the correction for standard deviation is approximate. Know the difference, and you will not fall for either mistake.
Common Questions
When should I use population standard deviation?
Use it when you have data for every member of the group you are studying. For example, the test scores of all 30 students in a single class, or the annual salaries of all employees at a company.
When should I use sample standard deviation?
Use it when your data is a subset of the larger group you care about. For example, a survey of 500 voters out of millions, or clinical trial results from 100 patients meant to represent a larger population.
Is the sample standard deviation an unbiased estimator of the population standard deviation?
No. The sample variance (s²) is unbiased for the population variance (σ²). The sample standard deviation (s) is biased low for the population standard deviation (σ), especially for small n.
What is Bessel's correction?
Bessel's correction is the use of n − 1 in the denominator of the sample variance formula instead of n. It corrects the bias that arises because the sample mean is closer to the sample points than the true population mean is.
What is the difference between STDEV.S and STDEV.P in Excel?
STDEV.S calculates the sample standard deviation using n − 1. STDEV.P calculates the population standard deviation using N. Use STDEV.S when your data is a sample; use STDEV.P when your data is the entire population.
What are the TI-84 symbols Sx and σx?
Sx is the sample standard deviation (n − 1). σx is the population standard deviation (n). The TI-84 Plus guidebook lists both under 1-Var Stats. Use Sx for a sample and σx for a population.
Does using n − 1 instead of n matter when n is large?
The numerical difference becomes small (under 1% for n > 100), but the correct choice still depends on whether your data is a population or a sample. Using the wrong formula introduces an error, even if it is small.