Statistics & Probability

Standard Deviation and Variance Explained Step by Step

By Math Solving Space · · 2 min read

On this page
  1. The idea
  2. Step by step (population)
  3. Why square the deviations?
  4. Population vs sample
  5. Interpreting it
  6. Common mistakes
  7. Practice questions
  8. Frequently asked questions

Standard deviation measures how spread out data is around the mean. To calculate it, find the mean, square each value's distance from the mean, average those squares (that is the variance), then take the square root. For a sample you divide by n−1n - 1 instead of nn.

The idea

Two classes both average 70% on a test. In one, everyone scored 68–72%. In the other, scores ranged from 40% to 100%. Same mean, very different spread. Standard deviation puts a number on that spread.

Step by step (population)

Data: 2,4,4,4,5,5,7,92, 4, 4, 4, 5, 5, 7, 9 (N=8N = 8).

1. Find the mean.

μ=408=5\mu = \frac{40}{8} = 5

2. Find each deviation and square it.

xx x−μx - \mu (x−μ)2(x - \mu)^2
2 −3 9
4 −1 1
4 −1 1
4 −1 1
5 0 0
5 0 0
7 2 4
9 4 16

3. Add the squares: 9+1+1+1+0+0+4+16=329 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.

4. Divide by NN to get the variance:

σ2=328=4\sigma^2 = \frac{32}{8} = 4

5. Take the square root:

σ=4=2\sigma = \sqrt{4} = 2

Why square the deviations?

The plain deviations always add to zero, because values above and below the mean cancel. Squaring makes them all positive. Taking the square root at the end brings the answer back to the original units.

Population vs sample

Divide by Symbol
Population (all the data) NN σ\sigma
Sample (part of a population) n−1n - 1 ss

Dividing by n−1n - 1 (Bessel's correction) makes up for the fact that a sample tends to be less spread out than the full population.

Sample example: 10,12,23,23,1610, 12, 23, 23, 16 has mean 16.816.8 and sum of squared deviations 146.8146.8:

s=146.84≈6.058s = \sqrt{\frac{146.8}{4}} \approx 6.058

Interpreting it

For roughly bell-shaped data, about 68% of values lie within one standard deviation of the mean, and about 95% within two. A value more than 2 or 3 standard deviations away is unusual.

Common mistakes

  • Forgetting to square root the variance.
  • Using nn for a sample or n−1n - 1 for a population.
  • Squaring the values instead of the deviations.

Practice questions

  1. Find the population standard deviation of 1,3,51, 3, 5.
  2. Find the variance of 6,6,6,66, 6, 6, 6.
  3. Which is more spread out: data with σ=2\sigma = 2 or σ=8\sigma = 8?

Answers: 1) 8/3≈1.633\sqrt{8/3} \approx 1.633 2) 00 3) σ=8\sigma = 8

The standard deviation calculator shows the full deviations table and checks the answer with a second method. For averages see mean, median and mode, and for what comes next read about the normal distribution and z-scores.

Frequently asked questions

Can standard deviation be negative?

No. It is a square root of an average of squares, so it is always 0 or more.

What does a standard deviation of 0 mean?

Every value is the same, so there is no spread at all.

What is the difference between variance and standard deviation?

Variance is the average squared deviation. Standard deviation is its square root, in the same units as the data.

Open the calculator →

#statistics#data#standard deviation