Sample variance
A sample variance divides the sum of squared deviations from the sample mean by a specified denominator such as n or n minus one.
On this page 7 sections
01Variance summarizes squared deviations from the sample mean#
Variance summarizes squared deviations from the sample mean. Subtract the mean from each observation, square each difference, add the squares, then divide by the stated denominator.
For , the mean is . Deviations are , whose squares are . Their sum is .
For , the squared-deviation sum is . Dividing by gives . Dividing by gives . These definitions produce different numbers.
Sample: 2, 5, 8. Variance with denominator n-1?
Show answer and explanation
Squared deviations sum to 18; divide by 2: 9.
02If squared deviations are supplied, add them directly#
If squared deviations are supplied, add them directly. Squaring them again changes the calculation. With deviations themselves, square first so positive and negative differences do not cancel.
Squared deviations: 9, 0, 9. Variance with denominator n?
Show answer and explanation
Sum of squares 18; divide by 3: 6.
03Equal observations have zero squared deviations#
Equal observations have zero squared deviations. With one observation, dividing by gives zero; dividing by is undefined because the denominator is zero. Every task specifies which denominator to use.
Sample: 2, 6. Use denominator n. “Divide the square sum by 1.” Repair variance.
Show answer and explanation
Square sum 8; 8/2=4.
Center, square, add, then divide by the stated denominator. Dividing by n and by n minus one gives different definitions.
- Compute a centered squared-deviation sum.
Sources & further reading
- [1]Pishro-Nik, Introduction to Probability, 8.2.2 Point Estimators for Mean and Variance ↗Pishro-Nik, Introduction to Probability · Book