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

6.666667\displaystyle 6.666667

Standard deviation

2.581989\displaystyle 2.581989

Fraction

203\displaystyle \frac{20}{3}

Sample variance

7.5\displaystyle 7.5
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 4545 and n=9n = 9.

    xˉ=∑xn=459=5\begin{aligned} \bar{x} &= \frac{\sum x}{n} \\ &= \frac{45}{9} \\ &= 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ˉ: −4, −3, −2, −1, 0, 1, 2, 3, 4x - \bar{x}:\ -4,\ -3,\ -2,\ -1,\ 0,\ 1,\ 2,\ 3,\ 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=60SS = 60.

    SS=∑(x−xˉ)2=(−4)2+(−3)2+(−2)2+(−1)2+02+12+22+32+42=16+9+4+1+0+1+4+9+16=60\begin{aligned} SS &= \sum \left(x - \bar{x}\right)^2 \\ &= \left(-4\right)^2 + \left(-3\right)^2 + \left(-2\right)^2 + \left(-1\right)^2 + 0^2 + 1^2 + 2^2 + 3^2 + 4^2 \\ &= 16 + 9 + 4 + 1 + 0 + 1 + 4 + 9 + 16 \\ &= 60 \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=9n = 9.

    σ2=SSn=609=203≈6.666667\begin{aligned} \sigma^2 &= \frac{SS}{n} \\ &= \frac{60}{9} \\ &= \frac{20}{3} \approx 6.666667 \end{aligned}
  5. Result

    So the population variance is 203≈6.666667\frac{20}{3} \approx 6.666667.

Worked examples