Sample variance versus population variance
Population variance (σ²) divides the sum of squared deviations by n — the total count — and describes the exact spread of a complete, closed dataset. Sample variance (s²) divides by n − 1 instead. The reduction, known as Bessel's correction, compensates for the fact that a sample mean is calculated from the same data, which causes the raw squared deviations to slightly underestimate the true population spread.
Use sample variance whenever your data is a subset drawn from a larger population; use population variance only when you have every member of the group.