Mean, Variance and Standard Deviation Equation Solver with Worked Examples

The mean is , the variance is , and the standard deviation is . Type “variance of 1,2,3,4,5” and the solver works it out.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Mean, variance and standard deviation means

The variance measures how far values are from the mean, on average, squared. A large variance means the data is spread out; a small one means the values are close to the mean.

The standard deviation is the square root of the variance. It is in the same units as the data, which makes it easier to interpret.

There are two equivalent ways to calculate the variance: the mean of the squared deviations, or the mean of the squares minus the square of the mean. The sample version is sample variance, the average is the mean, the simple spread is the range, and coding of data shows how a shift and scale change them.

This page is part of Averages and spread in Statistics. Topics that work alongside it: Sample (unbiased) variance, Mean, Range, Coding of data, Estimated mean of grouped data and Median position.

What is it used for?

The variance and standard deviation measure how far the data are spread around the mean. The standard deviation is the square root of the variance.

How to use mean, variance and standard deviation

  1. Find the mean .
  2. Find , the sum of the squares of the values.
  3. Calculate for the variance.
  4. Take the square root for the standard deviation.

Graph

Data 2, 4, 4, 4, 5, 5, 7, 9 with mean 5largest: 901234567890246810Data 2, 4, 4, 4, 5, 5, 7, 9 with mean 5itemvaluemean = 5Graph with x from 0 to 9 and y from 0 to 10. Shows bars (8); the curve mean = 5; point largest: 9 at (8, 9).

The standard deviation measures the typical distance of the bars from the mean line.

Worked examples

The examples marked with a button were worked out by the solver on this page. You can try each one yourself.

Example 1: find the variance

Find the variance of 1, 2, 3, 4, 5.

Statistics Answer checked
Answer
σ2=2.0000\sigma^2 = 2.0000
  1. Find the mean
  2. Subtract the mean from each value and square the result
  3. Add the squared differences
  4. Population variance: divide by n (use this when the data is the whole group)
  5. Sample variance: divide by (use this when the data is a sample)
  6. Take the square roots for the standard deviations
  7. Check: variance = mean of squares square of the mean

Example 2: find the standard deviation

Find the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9.

Statistics Answer checked
Answer
σ=2.0000\sigma = 2.0000
  1. Find the mean
  2. Subtract the mean from each value and square the result
  3. Add the squared differences
  4. Population variance: divide by n (use this when the data is the whole group)
  5. Sample variance: divide by (use this when the data is a sample)
  6. Take the square roots for the standard deviations
  7. Check: variance = mean of squares square of the mean

Example 3: a small set

Find the variance of 2, 4, 6.

Statistics Answer checked
Answer
σ2=2.6667\sigma^2 = 2.6667
  1. Find the mean
  2. Subtract the mean from each value and square the result
  3. Add the squared differences
  4. Population variance: divide by n (use this when the data is the whole group)
  5. Sample variance: divide by (use this when the data is a sample)
  6. Take the square roots for the standard deviations
  7. Check: variance = mean of squares square of the mean

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

1, 2, 3, 4, 5

mean 3, variance 2, sd 1.414

Σ(x − mean)² ÷ n.

2, 4, 4, 4, 5, 5, 7, 9

mean 5, variance 4, sd 2

A classic set.

The shortcut

variance = mean of squares − (mean)²

Σx²/n − mean².

Sample variance

divide by n − 1

For 1, 2, 3, 4, 5 it is 2.5.

Word problems

Variance σ² = Σ(x − x̄)² ÷ n and standard deviation σ = √variance. Use n − 1 for a sample.

1 to 5

Find the variance and standard deviation of 1, 2, 3, 4, 5.

  1. Mean3
  2. Squared deviations4, 1, 0, 1, 4 = 10
  3. Variance10 ÷ 5 = 2
  4. sd√2 = 1.4142
  5. Check: ✓σ² = 2, σ = 1.4142.

The classic set

Find the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9.

  1. Mean5
  2. Squared deviations9+1+1+1+0+0+4+16 = 32
  3. Variance4
  4. sd2
  5. Check: ✓2.

Shortcut Higher

Use Σx²/n − mean² for 1, 2, 3, 4, 5.

  1. Σx²/n55 ÷ 5 = 11
  2. mean²9
  3. Variance2
  4. Check: ✓2.

Sample variance Higher

Find the sample variance of 1, 2, 3, 4, 5.

  1. Σ10
  2. ÷ (n − 1)10 ÷ 4 = 2.5
  3. Check: ✓2.5.

Common mistakes

Forgetting to square

Σ(x − mean) = 0 ✗

Σ(x − mean)² ✓

Deviations cancel.

Quoting variance as sd

sd = 2 for the first set ✗

√2 ✓

Take the root.

Dividing by n for a sample

sample variance 2 ✗

2.5 ✓

Use n − 1 for a sample.

Using the wrong mean

mean 2.5 ✗

3 ✓

Add carefully.

Exam tips

  1. Mean first.
  2. Square the deviations.
  3. Divide by n (or n − 1).
  4. sd = √variance.
  5. Shortcut for big sets.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Variance of 2, 4, 6 Foundation

8/3

2. Mean of 3, 5, 7, 9 Foundation

6

3. Variance of 1, 3, 5 Foundation

8/3

4. sd of 2, 4, 4, 4, 5, 5, 7, 9 Higher

2

5. Σx² = 60, n = 5, mean 3: find the variance Higher

3

6. Sample variance when Σ(x − mean)² = 18 and n = 7 Higher

3

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Mean
The average.
Variance
Mean squared deviation.
Standard deviation
Root of the variance.
Deviation
x − mean.
Population
Everything of interest.
Sample
A part of it.

Frequently asked questions

What is the standard deviation?

The square root of the variance.

How do I find the variance?

Mean of the squared deviations.

When do I divide by n − 1?

For a sample estimate.

What is the sd of 1 to 5?

1.4142.

Which page covers the mean?

mean.

Which page covers z-scores?

standardising a normal distribution.

More in Statistics and the formula sheets.