Standard Deviation

Sample vs Population Standard Deviation: n − 1 Explained

Sample vs Population Standard Deviation: n − 1 Explained - featured image
Quick answerUse population standard deviation (σ, dividing by n) when your data includes every member of the group. Use sample standard deviation (s, dividing by n − 1) when your data is only a part of a larger group. For 4, 8, 6, 5, 3, s = 1.9235 and σ = 1.7205.

Skip the manual work: use the Standard Deviation Calculator to check any answer with full steps.

Sample vs populationSample vs populationSample (s)• Data is a part of a bigger group• Divide by n − 1• Symbol: s or Sx• Slightly larger result• The usual choicePopulation (σ)• Data is the whole group• Divide by n• Symbol: σ or σx• Slightly smaller result• A complete census

The two formulas

Type Formula Note
Population σ = √[ Σ(x − μ)² ÷ N ] μ is the true mean
Sample s = √[ Σ(x − x̄)² ÷ (n − 1) ] x̄ is estimated from the data

The only difference is the divisor: N for a population, n − 1 for a sample.

How to decide

Ask: is my list every member I care about, or a subset that stands in for a bigger group?

  • Marks of all 25 students in one class, when you only care about that class: population.
  • Heights of 25 students chosen to represent a whole school: sample.
  • Ten measurements of a quantity you measure repeatedly: sample.

In most real analysis you are working with a sample, which is why spreadsheets and calculators default to it.

Worked example: 4, 8, 6, 5, 3

The mean is 5.2 and the sum of squared deviations is 14.8.

  • Population: 14.8 ÷ 5 = 2.96, σ = 1.7205.
  • Sample: 14.8 ÷ 4 = 3.7, s = 1.9235.

The sample value is larger because dividing by a smaller number gives a bigger result.

Why n − 1?

Imagine you know the mean of 5 numbers and the first 4 of them. The last one is then fixed, so only 4 values are free to vary. Those are the “degrees of freedom”. Using n would slightly underestimate the true spread, so statisticians divide by the degrees of freedom instead.

On your calculator or spreadsheet

  • Excel: STDEV.S for a sample, STDEV.P for a population.
  • TI-84: Sx is the sample value and σx is the population value.

See the standard deviation calculator or the population standard deviation calculator to run both.

Frequently asked questions

Why does a sample divide by n − 1?

A sample mean is computed from the same data, so the values sit closer to it than to the true mean. Dividing by n − 1 (Bessel's correction) removes that bias in the variance.

Which should I use for exam data?

Use sample unless the question says the data is the whole population, for example "all 30 students in the class".

Does it matter for large data sets?

Less and less. For n = 1000 the two standard deviations differ by only about 0.05%.

Try it yourself

Standard Deviation Calculator

Free standard deviation calculator. Paste your numbers to get the sample or population standard deviation, mean, variance and every step of the working.

Keep learning

Matthew P. Wood
Writes and checks the worked examples and formulas on this site. See how we check our work.