Variance
Encyclopedia : V : VA : VAR : Variance
- This article is about mathematics. Other meaning: variance (land use).
The variance of a real-valued random variable is its second central moment, and it also happens to be its second cumulant.
Definition
If [\mu = \operatorname(X)] is the expected value (mean) of the random variable X, then the variance is
- [\operatorname(X) = \operatorname( ( X - \mu ) ^ 2 ).]
Note that the above definition can be used for both discrete and continuous random variables.
Many distributions, such as the Cauchy distribution, do not have a variance because the relevant integral diverges. In particular, if a distribution does not have an expected value, it does not have a variance either. The converse is not true: there are distributions for which the expected value exists, but the variance does not.
Properties
If the variance is defined, we can conclude that it is never negative because the squares are positive or zero. The unit of variance is the square of the unit of observation. For example, the variance of a set of heights measured in centimeters will be given in square centimeters. This fact is inconvenient and has motivated many statisticians to instead use the square root of the variance, known as the standard deviation, as a summary of dispersion.
It can be proven easily from the definition that the variance does not depend on the mean value [\mu]. That is, if the variable is "displaced" an amount b by taking X + b, the variance of the resulting random variable is left untouched. By contrast, if the variable is multiplied by a scaling factor a, the variance is multiplied by a2. More formally, if a and b are real constants and X is a random variable whose variance is defined, then
- [\operatorname(aX+b)=a^2\operatorname(X).]
- [\operatorname(X)= \operatorname(X^2 - 2\,X\,\operatorname(X) + (\operatorname(X))^2)= \operatorname(X^2) - 2(\operatorname(X))^2 + (\operatorname(X))^2 = \operatorname(X^2) - (\operatorname(X))^2.]
One reason for the use of the variance in preference to other measures of dispersion is that the variance of the sum (or the difference) of independent random variables is the sum of their variances. A weaker condition than independence, called uncorrelatedness also suffices. In general,
- [\operatorname(aX+bY) =a^2 \operatorname(X) + b^2 \operatorname(Y) + 2ab\, \operatorname(X, Y).]
Approximating the variance of a function
The Delta method uses second-order Taylor expansions to approximate the variance of a function of one or more random variables. For example, the approximate variance of a function of one variable is given by
- :[\operatorname\left[f(X)right]\approx \left(f'(\operatorname\left[Xright])\right)^2\operatorname\left[Xright]]
Population variance and sample variance
In general, the population variance of a finite population of size N is given by
- [\sigma^2 = \frac 1N \sum_^N \left(x_i - \overline \right)^ 2 \,]
- [\sigma^2 = \sum_^N \left(x_i - \overline \right)^ 2 \, \Pr(x_i),]
In many practical situations, the true variance of a population is not known a priori and must be computed somehow. When dealing with large finite populations, it is almost never possible to find the exact value of the population variance, due to time, cost, and other resource constraints. When dealing with infinite populations, this is generally impossible.
A common method is estimating the variance of large (finite or infinite) populations from a sample. We take a sample [(y_1,\dots,y_n)] of n values from the population, and estimate the variance on the basis of this sample. There are several good estimators. Two of them are well known:
- [s_n^2 = \frac 1n \sum_^n \left(y_i - \overline \right)^ 2,]
- [s^2 = \frac \sum_^n\left(y_i - \overline \right)^ 2,]
The two estimators only differ slightly as we see, and for larger values of the sample size n the difference is negligible. The second one is an unbiased estimator of the population variance, meaning that in a large number of repetitions its average value tends to the right value of the population variance. The first one may be seen as the variance of the sample considered as a population.
One common source of confusion is that the term sample variance may refer to either the unbiased estimator [s^2] of the population variance, or to the variance [\sigma^2] of the sample viewed as a finite population. Both can be used to estimate the true population variance. Apart from theoretical considerations, it doesn't really matter which one is used, as for small sample sizes both are inaccurate and for large values of n they are practically the same. Intuitively, computing the variance by dividing by [n] instead of [n-1] seems to underestimate the population variance. This is however not the case because we are using the sample mean [\overline] as an estimate of the unknown population mean [\mu], and the raw counts of repeated elements in the sample instead of the unknown true probabilities.
In practice, for large [n], the distinction is often a minor one. In the course of statistical measurements, sample sizes so small as to warrant the use of the unbiased variance virtually never occur. In this context Press et al.Press, W. H., Teukolsky, S. A., Vetterling, W. T. & Flannery, B. P. (1986) Numerical recipes: The art of scientific computing. Cambridge: Cambridge University Press. ([online]) commented that if the difference between n and n−1 ever matters to you, then you are probably up to no good anyway - e.g., trying to substantiate a questionable hypothesis with marginal data.
Distribution of the sample variance
Being a function of random variables, the sample variance is itself a random variable, and it is natural to study its distribution. In the case that [y_i] are independent Gaussian realizations, Cochran's theorem shows that [s^2] follows a scaled chi-square distribution:
- [(n-1)\frac\sim\chi^2_]
However, even in the absence of the Gaussian assumption, it is still possible to prove that [s^2] is unbiased for [\sigma^2]:
An unbiased estimator
We will demonstrate why [s^2] is an unbiased estimator of the population variance. An estimator [\hat] for a parameter [\theta] is unbiased if [\operatorname\\} = \theta]. Therefore, to prove that [s^2] is unbiased, we will show that [\operatorname\ = \sigma^2]. As an assumption, the population which the [x_i] are drawn from has mean [\mu] and variance [\sigma^2].
- [ \operatorname \
- :[
\frac
See also algorithms for calculating variance.
Alternative proof
- [E\left[ sum_^n )^2}right]=E\left[ sum_^n right] - nE[ overline^2]]
- :[=nE[X_i^2] - \frac E\left[left(sum_^n X_iright)^2right]]
- :[=n(\operatorname[X_i] + (E[X_i])^2) - \frac E\left[left(sum_^n X_iright)^2right]]
- :[=n\sigma^2 + \frac(nE[X_i])^2 - \fracE\left[left(sum_^n X_iright)^2right]]
- :[=n\sigma^2 - \frac\left( E\left[left(sum_^n X_iright)^2right] - \left(E\left[sum_^n X_iright]\right)^2\right)]
- :[=n\sigma^2 - \frac\left(\operatorname\left[sum_^n X_iright]\right)=n\sigma^2 - \frac(n\sigma^2)=(n-1)\sigma^2.]
Generalizations
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 − μ)T], where μ = E(X) and XT is the transpose of X, and so is a row vector. This variance is a positive semi-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.
History
The term variance was first introduced by Ronald Fisher in his 1918 paper The Correlation Between Relatives on the Supposition of Mendelian Inheritance.
Moment of inertia
The variance of a probability distribution is analogous to the moment of inertia in classical mechanics of a corresponding linear mass distribution, with respect to rotation about its center of mass. It is because of this analogy that such things as the variance are called moments of probability distributions.
See also
- an inequality on location and scale parameters
- expected value
- kurtosis
- law of total variance
- skewness
- semivariance
- standard deviation
- statistical dispersion
- true variance
References
External links
- [Fisher's original paper] (pdf format)
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
