Sample Variance
- Updated2023-02-21
- 1 minute(s) read
Sample variance measures the spread or dispersion of the sample values. You can use the sample variance as a measure of the consistency. The sample variance is always positive, except when all the sample values are equal to each other and in turn, equal to the mean.
The sample variance s2 for an input sequence X equals the sum of the squares of the deviations of the sample values from the mean divided by n - 1, as shown in the following equation.

where n > 1 and is the number of samples in X, and is the mean of X.
If you have many sets of samples from a given population and compute the sample variance with a divisor of n, the average sample variance is less than the true, underlying population variance. If you compute the sample variance with a divisor of n - 1, the average sample variance converges to the underlying population variance.