Variance Calculator

Enter your data and choose sample or population to find its variance.

Data is a

A sample divides by n − 1; a whole population divides by n.

Numbers separated by commas, spaces or new lines

Try

Result

You entered{−3, 0, 3, 6}\left\{ -3,\ 0,\ 3,\ 6 \right\}

15\displaystyle 15

Standard deviation

3.872983\displaystyle 3.872983

Population variance

11.25\displaystyle 11.25
Show the work
  1. Mean (arithmetic average)

    The mean shares the total out equally: add every value, then divide by how many there are. Here the values add up to 66 and n=4n = 4.

    xˉ=∑xn=64=1.5\begin{aligned} \bar{x} &= \frac{\sum x}{n} \\ &= \frac{6}{4} \\ &= 1.5 \end{aligned}
  2. Deviations from the mean

    Subtract the mean xˉ=1.5\bar{x} = 1.5 from every value to see how far each one sits from it. A value below the mean gives a negative deviation.

    x−xˉ: −4.5, −1.5, 1.5, 4.5x - \bar{x}:\ -4.5,\ -1.5,\ 1.5,\ 4.5
  3. Sum of squared deviations

    Squaring each deviation makes every term positive, so values above and below the mean cannot cancel. Adding the squares gives SS=45SS = 45.

    SS=∑(x−xˉ)2=(−4.5)2+(−1.5)2+1.52+4.52=20.25+2.25+2.25+20.25=45\begin{aligned} SS &= \sum \left(x - \bar{x}\right)^2 \\ &= \left(-4.5\right)^2 + \left(-1.5\right)^2 + 1.5^2 + 4.5^2 \\ &= 20.25 + 2.25 + 2.25 + 20.25 \\ &= 45 \end{aligned}
  4. Sample variance (divide by n - 1)

    A sample is divided by n−1n - 1 rather than nn, because the mean was estimated from the same data and that makes the spread look slightly smaller. Here n=4n = 4.

    s2=SSn−1=454−1=453=15\begin{aligned} s^2 &= \frac{SS}{n - 1} \\ &= \frac{45}{4 - 1} \\ &= \frac{45}{3} \\ &= 15 \end{aligned}
  5. Result

    So the sample variance is 1515.

Worked examples