|
In probability theory and statistics, the variance of a random variable (or equivalently, of a probability distribution) is a measure of its statistical dispersion, indicating how its possible values are spread around the expected value. Where the expected value shows the location of the distribution, the variance indicates the scale of the values. A more understandable measure is the square root of the variance, called the standard deviation. As its name implies it gives in a standard form an indication of the possible deviations from the mean. The variance of a real-valued random variable is its second central moment, and it also happens to be its second cumulant. Definition If is the expected value (mean) of the random variable X, then the variance is That is, it is the expected value of the square of the deviation of X from its own mean. In plain language, it can be expressed as "The average of the square of the distance of each data point from the mean". It is thus the mean squared deviation. The variance of random variable X is typically designated as , , or simply . 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 . 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 Another formula for the variance that follows in a straightforward manner from the linearity of expected values and the above definition is: This is often used to calculate the variance in practice. 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, Here is the covariance, which is zero for independent random variables (if it exists). 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 ight)^2operatornameleftX ight provided that is twice differentiable and that the mean and variance of are finite. Population variance and sample variance In general, the population variance of a finite population of size N is given by left(x_i - overline ight)^ 2 , or if the population is an abstract population with probability distribution Pr: left(x_i - overline ight)^ 2 , Pr(x_i), where is the population mean. This is merely a special case of the general definition of variance introduced above, but restricted to finite populations. 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 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: ight)^ 2 = rac sum_^y_i^2 - overline^2, and ight)^ 2 = racsum_^n y_i^2 - rac overline^2, Both are referred to as sample variance. Most advanced electronic calculators can calculate both and at the press of a button, in which case that button is usually labelled or for and for . 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 of the population variance, or to the variance 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 instead of seems to underestimate the population variance. This is however not the case because we are using the sample mean as an estimate of the unknown population mean , and the raw counts of repeated elements in the sample instead of the unknown true probabilities. In practice, for large , 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. 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 are independent Gaussian realizations, Cochran's theorem shows that follows a scaled chi-square distribution: (n-1)racsimchi^2_ As a direct consequence, it follows that . However, even in the absence of the Gaussian assumption, it is still possible to prove that is unbiased for : An unbiased estimator We will demonstrate why is an unbiased estimator of the population variance. An estimator for a parameter is unbiased if . Therefore, to prove that is unbiased, we will show that . As an assumption, the population which the are drawn from has mean and variance . operatorname{E} left( rac{1}{n-1} sum_{i1}^n left( x_i - overline{x} ight) ^ 2 ight) rac{1}{n-1} sum_{i1}^n operatorname{E} left( left( x_i - overline{x} ight) ^ 2 ight) rac{1}{n-1} sum_{i1}^n operatorname{E} left( left( (x_i - mu) - (overline{x} - mu) ight) ^ 2 ight) rac{1}{n-1} sum_{i1}^n left{ operatorname{E} left( (x_i - mu)^2 ight) - 2 operatorname left( (x_i - mu) (overline - mu) ight) + operatorname left( (overline - mu) ^ 2 ight) ight} rac{1}{n-1} sum_{i1}^n left[ sigma^2 - 2 left( rac sum_^n operatorname left( (x_i - mu) (x_j - mu) ight) ight) + rac sum_^n sum_^n operatorname left( (x_j - mu) (x_k - mu) ight) ight] rac{1}{n-1} sum_{i1}^n left( sigma^2 - rac + rac ight)
| |||||||
|
| ||||||||
![]() |
|
| |