Variance
Biased sample variance

In many practical situations, the true variance of a population is not known a priori and must be computed somehow. When dealing with extremely large populations, it is not possible to count every object in the population, so the computation must be performed on a sample of the population. This is generally referred to as sample variance or empirical variance. Sample variance can also be applied to the estimation of the variance of a continuous distribution from a sample of that distribution.

We take a sample with replacement of n values Y,..., Y from the population of size N {\textstyle N}, where n < N, and estimate the variance on the basis of this sample. Directly taking the variance of the sample data gives the average of the squared deviations:

(See the section Population variance for the derivation of this formula.) Here, Y ¯ {\displaystyle {\overline {Y}}} denotes the sample mean:

Since the Y are selected randomly, both Y ¯ {\displaystyle {\overline {Y}}} and S ~ Y 2 {\displaystyle {\tilde {S}}_{Y}^{2}} are random variables. Their expected values can be evaluated by averaging over the ensemble of all possible samples { Y } of size n from the population. For S ~ Y 2 {\displaystyle {\tilde {S}}_{Y}^{2}} this gives:

Here σ 2 = E − μ 2 {\textstyle \sigma ^{2}=\operatorname {E} -\mu ^{2}} derived in the section Population variance and E = E E = μ 2 {\textstyle \operatorname {E} =\operatorname {E} \operatorname {E} =\mu ^{2}} due to independency of Y i {\textstyle Y_{i}} and Y j {\textstyle Y_{j}} are used.

Hence S ~ Y 2 {\textstyle {\tilde {S}}_{Y}^{2}} gives an estimate of the population variance that is biased by a factor of n − 1 n {\textstyle {\frac {n-1}{n}}} as the expectation value of S ~ Y 2 {\textstyle {\tilde {S}}_{Y}^{2}} is smaller than the population variance (true variance) by that factor. For this reason, S ~ Y 2 {\textstyle {\tilde {S}}_{Y}^{2}} is referred to as the biased sample variance.
change_case:english_capital