Standard deviation and quartiles

Two summaries describe spread: how far values sit from the mean, and where the middle half of the data begins and ends.

Two kinds of spread, two answers

Standard deviation summarises how far values sit from their mean, in the same units as the data. Take the values 2, 4, 4, 4, 5, 5, 7, 8. The mean is 4.875. Each value's distance from that mean, squared and averaged, gives the variance; its square root is the standard deviation.

There are two versions, and picking the wrong one is the most common statistics mistake. The population formula divides by n. The sample formula divides by n−1, because one value is "used up" estimating the mean, and the sample mean sits closer to the data than the true population mean usually would.

Population vs sample

  • For 2, 4, 4, 4, 5, 5, 7, 8: population SD ≈ 1.64, sample SD ≈ 1.77.
  • Use the population formula when you genuinely have every value — the whole dataset, all 65 years of a chart.
  • Use the sample formula when your numbers are a sample from something bigger — a survey, a subset of days, measurements meant to generalise.
  • With small n the difference is large: for n = 5 the sample SD is about 12% bigger. As n grows the two converge.

Quartiles: where the middle half lives

  • Order the values. The median splits the list in half. For the 8 values above the median is 4.5 — the average of the two middle values, because n is even.
  • Q1 and Q3 are the medians of the lower and upper halves: 4 and 6.5 here. Different software places quartiles slightly differently when n is odd or small; the idea, not the decimal, is what matters.
  • The interquartile range (IQR) is Q3 − Q1 = 2.5 here: the width of the middle 50%, which ignores the extremes by construction.
  • The median with quartiles is the fair summary when the data is skewed, because a few large values drag the mean but barely move Q1, Q2 and Q3.

Outliers by the 1.5 × IQR rule

  • A common cut-off: values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR are flagged as outliers.
  • Here that means below 4 − 3.75 = 0.25 or above 6.5 + 3.75 = 10.25 — so none of the eight values is an outlier.
  • The rule is a flag, not a verdict: a legitimate extreme value and a data-entry error look identical to it.
  • Box plots draw exactly this: a box from Q1 to Q3 with whiskers that stop at the last non-outlier value.

Related tools

Sources

Last reviewed November 17, 2026

Search