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{2, 4, 4, 4, 5, 5, 7, 9}\left\{ 2,\ 4,\ 4,\ 4,\ 5,\ 5,\ 7,\ 9 \right\}

4\displaystyle 4

Standard deviation

2\displaystyle 2

Sample variance

327≈4.571429\displaystyle \frac{32}{7} \approx 4.571429
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 4040 and n=8n = 8.

    xˉ=∑xn=408=5\begin{aligned} \bar{x} &= \frac{\sum x}{n} \\ &= \frac{40}{8} \\ &= 5 \end{aligned}
  2. Deviations from the mean

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

    x−xˉ: −3, −1, −1, −1, 0, 0, 2, 4x - \bar{x}:\ -3,\ -1,\ -1,\ -1,\ 0,\ 0,\ 2,\ 4
  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=32SS = 32.

    SS=∑(x−xˉ)2=(−3)2+(−1)2+(−1)2+(−1)2+02+02+22+42=9+1+1+1+0+0+4+16=32\begin{aligned} SS &= \sum \left(x - \bar{x}\right)^2 \\ &= \left(-3\right)^2 + \left(-1\right)^2 + \left(-1\right)^2 + \left(-1\right)^2 + 0^2 + 0^2 + 2^2 + 4^2 \\ &= 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 \\ &= 32 \end{aligned}
  4. Population variance (divide by n)

    When the data is the whole population, the variance is the mean of the squared deviations, so divide by n=8n = 8.

    σ2=SSn=328=4\begin{aligned} \sigma^2 &= \frac{SS}{n} \\ &= \frac{32}{8} \\ &= 4 \end{aligned}
  5. Result

    So the population variance is 44.

Worked examples