variance
Variance is a statistical quantity that measures the dispersion of a set of values. It describes how far the values are from the mean, on average, in squared units. In probability theory, Var(X) refers to the expectation of the squared deviation from the mean. There are two commonly used forms: population variance, defined for a full set of observations, and sample variance, used to estimate variance from a sample. The square root of the variance is the standard deviation, another widely used dispersion measure.
Population variance is Var(X) = E[(X − μ)^2], where μ is the mean E[X]. For a finite dataset of
Key properties include non-negativity and zero only when all values are identical. If a constant a scales
Alternative formula: Var(X) = E[X^2] − (E[X])^2, and for samples, s^2 = (Σ x_i^2 − (Σ x_i)^2 / n) / (n−1). Example: for a