Calculate the sample variance of a data set.
Variance is the average squared distance from the mean — the standard deviation is its square root.
variance = Σ(x − mean)² ÷ (n − 1)