Sample Variance

The sample variance m_2 (commonly written s^2 or sometimes s_N^2) is the second sample central moment and is defined by

 m_2=1/Nsum_(i=1)^N(x_i-m)^2,
(1)

where m=x^_ the sample mean and N is the sample size.

To estimate the population variance mu_2=sigma^2 from a sample of N elements with a priori unknown mean (i.e., the mean is estimated from the sample itself), we need an unbiased estimator mu^^_2 for mu_2. This estimator is given by k-statistic k_2, which is defined by

 k_2=mu^^_2=N/(N-1)m_2
(2)

(Kenney and Keeping 1951, p. 189). Similarly, if N samples are taken from a distribution with underlying central moments mu_n, then the expected value of the observed sample variance m_2 is

 <m_2>=(N-1)/Nmu_2.
(3)

Note that some authors (e.g., Zwillinger 1995, p. 603) prefer the definition

 s_(N-1)^2=1/(N-1)sum_(i=1)^N(x_i-x^_)^2,
(4)

since this makes the sample variance an unbiased estimator for the population variance. The distinction between s_N^2 and s_(N-1)^2 is a common source of confusion, and extreme care should be exercised when consulting the literature to determine which convention is in use, especially since the uninformative notation s is commonly used for both. The unbiased sample variance s_(N-1)^2 is implemented as Variance[list].

Also note that, in general, sqrt(sigma^^^2) is not an unbiased estimator of the standard deviation sigma even if sigma^^^2 is an unbiased estimator for sigma^2.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.