8 values: population vs sample variance
- Input
- 2, 4, 4, 4, 5, 5, 7, 9
- Expected output
- σ² = 4, s² ≈ 4.5714
Same sum of squares (32), different divisors (8 vs 7); the 14% gap shows Bessel's correction acting on variance.
calculate variance of a dataset
Variance is the square of standard deviation: σ² = Σ(xᵢ−μ)²/N for a population and s² = Σ(xᵢ−x̄)²/(N−1) for a sample. Being a sum of squares, the result always comes out in a squared unit: kg² if the data is in kg, km² if it is in km.
Same sum of squares (32), different divisors (8 vs 7); the 14% gap shows Bessel's correction acting on variance.
Result in km² (not km); √0.076≈0.276 km is the standard deviation, the version in the original unit.
The unit is seconds squared, with no direct physical meaning; that is why typical response time is reported as standard deviation (≈2.74 s or ≈3.16 s), not as variance.
Population (σ) divides the sum of squared differences by N. Sample (s) divides by N−1 (Bessel's correction), giving an unbiased estimate of population variance when working with a sample.
Because the formula squares each deviation before adding them up, so the original unit gets squared too. To return to the original unit (km, kg, seconds), take the square root of the variance, which is, by definition, the standard deviation.
The same proportion: for 2,4,4,4,5,5,7,9, σ²=4 (÷8) against s²≈4.5714 (÷7), a 14% difference. Since variance is just the square of standard deviation, any gap between dividing by N or N−1 shows up there first.
Not directly: km² and seconds² are not comparable. To compare relative spread across datasets with different units, use the coefficient of variation (standard deviation divided by the mean), not raw variance.
All calculations stay in your browser. No data is sent to any server.