Variance measures how far a set of numbers are spread out.
A variance of zero indicates that all the values are identical.
Variance is always non-negative: a small variance indicates that the data points
tend to be very close to the mean (expected value) and hence to each other.
A high variance indicates that the data points are very spread out around the mean
and from each other.
(https://en.wikipedia.org/wiki/Variance)
∑⟮xᵢ - μ⟯²
σ² = ----------
ν
Generalized method that allows setting the degrees of freedom.
For population variance, set d.f. (ν) to n
For sample variance, set d.f (ν) to n - 1
Or use popluationVariance or sampleVaraince covenience methods.
μ is the population mean
ν is the degrees of freedom, which usually is
the number of numbers in the population set or n - 1 for sample set.