This article is about mathematics. See also variance (land use).
- The variance is never negative because the squares are positive or zero. When any method of calculating the variance results in a negative number, we know that there has been an error, often due to a poor choice of algorithm.
- The unit of variance is the square of the unit of observation. Thus, the variance of a set of heights measured in inches will be given in square inches. This fact is inconvenient and has motivated statisticians to call the square root of the variance, the standard deviation and to quote this value as a summary of dispersion.
If X is a vector-valued random variable, with values in Rn, and thought of as a column vector, then the natural generalization of variance is E((X-μ)(X-μ)'), where μ=E(X) and X' is the transpose of X, and so is a row vector. This variance is a nonnegative-definite square matrix, commonly referred to as the covariance matrix.
If X is a complex-valued random variable, then its variance is E((X-μ)(X-μ)*), where X* is the complex conjugate of X. This variance is a nonnegative real number.
When the set of data is a population, we call this the population variance. If the set is a sample, we call it the sample variance. When estimating the population variance of a finite sample, the following formula gives an unbiased estimate: