Sample vs Population Standard Deviation

Two formulas, one trap: dividing by N when you should divide by n − 1 is the most common error in introductory statistics.

Population: σ = √( Σ(x − μ)² / N )    Sample: s = √( Σ(x − x̄)² / (n − 1) )

Which one do I use?

Population (N): you measured everyone you care about — all 30 students in the class, all units produced today. Sample (n − 1): you measured a subset and want to generalize — 25 bags off a production line, 500 voters from a country. In real research, that’s almost always the situation, which is why calculators and software default to n − 1.

Why n − 1? (Bessel’s correction)

A sample’s deviations are measured from the sample mean — which was itself fitted to that same data, sitting slightly closer to the points than the true mean does. Squared deviations therefore come out a bit too small; dividing by n − 1 instead of n inflates the result just enough to correct the bias. (In the language of estimation, one degree of freedom was spent estimating the mean.)

Worked example

Data 4, 6, 8, 10, 12: sum of squared deviations = 40. As a population: √(40/5) ≈ 2.83. As a sample: √(40/4) ≈ 3.16. Small n makes the gap visible; by n = 1,000 the two are practically identical — the correction matters most exactly when your data is scarce.