Skip to content
Tactiverge

Mathematical concepts

Standard deviation

Also called: SD · spread · sample standard deviation · variance

Definition

Standard deviation measures how spread out values are around their mean: the square root of the average squared distance from the mean.

Picture it

A small SD means repeated readings huddle together; a big one means they scatter. For roughly bell-shaped data, about two thirds of readings lie within one SD of the mean. With a sample you divide by n − 1, which corrects for estimating the mean from the same data.

The maths

s = √( Σ (x_i − x̄)² / (n − 1) )   (sample)
σ = √( Σ (x_i − μ)² / n )   (whole population)
SI units used in this entry
QuantityUnitSymbol
ratiodimensionless1

Worked example

Find the sample standard deviation of 4, 6, 8 (any unit).

  1. Mean = 6
  2. Squared deviations: 4, 0, 4 → sum 8
  3. s = √(8 / 2) = √4 = 2

Answers = 2 (same unit as the data).

✓ The number in this answer is recomputed from scratch by an automated test.

In Python

import statistics
print(statistics.stdev([4, 6, 8]))   # 2.0 (sample, n-1)
print(statistics.pstdev([4, 6, 8]))  # 1.63 (population, n)

crunch the numbers

Mean and standard deviation

n = 5 · mean = 110 · median = 101
sample SD = 21.3 · standard error = 9.51 · range 99 to 148

Sample standard deviation divides by n − 1. Standard error = SD / √n describes how well the mean is known.

Common misconceptions

  • Misconception: Standard deviation is not the uncertainty of the mean; that is the standard error, SD divided by √n.
  • Misconception: Spreadsheets have two SD functions; pick the sample version for measurements.