2.02StatisticsCore

Measures of Dispersion

Two classes can have the same average test score while one is tightly bunched and the other ranges from 12% to 98%. An average alone hides that. Measures of dispersion\textbf{Measures of dispersion} — the range, interquartile range, variance and standard deviation — quantify how spread out the data are, and together with an average they give a genuinely useful summary.

45 min Data Analysis

The big picture

Spread measures come in pairs with averages. The median goes with the interquartile range, since both depend only on ordered positions and both resist outliers. The mean goes with the standard deviation, since both use every value — and standard deviation is the measure the rest of the statistics course is built on, from the normal distribution to hypothesis tests. Variance is defined as the mean of the squared deviations from the mean, and OCR gives the calculation formula σ2=∑x2n−xˉ2\sigma^{2} = \dfrac{\sum x^{2}}{n} - \bar{x}^{2}, which is far quicker to use. Spread also defines outliers: a value beyond 1.5×IQR1.5 \times \text{IQR} from the quartiles, or more than two or three standard deviations from the mean.

What you'll be able to do

  • Calculate the range and interquartile range, including by interpolation for grouped data
  • Calculate variance and standard deviation from raw, frequency and summary data
  • Identify outliers using quartile-based and standard-deviation-based rules
  • Understand how coding affects the standard deviation, and compare data sets
1

Range and quartiles

The range\textbf{range} is largest minus smallest. It is quick but depends entirely on the two most extreme values.

The lower quartile\textbf{lower quartile} Q1Q_{1} and upper quartile\textbf{upper quartile} Q3Q_{3} cut off the bottom and top quarters of the ordered data. The interquartile range\textbf{interquartile range} Q3−Q1Q_{3} - Q_{1} measures the spread of the middle half and ignores extremes.

For raw data, Q1Q_{1} is the median of the lower half and Q3Q_{3} the median of the upper half. For grouped continuous data, find the n4\tfrac{n}{4}th and 3n4\tfrac{3n}{4}th positions and interpolate. Percentiles work the same way.

Example 1Find the IQR of 3,5,6,8,9,11,12,14,18,20,253, 5, 6, 8, 9, 11, 12, 14, 18, 20, 25.
1There are 11 values; the median is the 6th, 1111.
2Lower half 3,5,6,8,93, 5, 6, 8, 9: Q1=6Q_{1} = 6. Upper half 12,14,18,20,2512, 14, 18, 20, 25: Q3=18Q_{3} = 18.
AnswerIQR =18−6=12= 18 - 6 = 12
2

Variance and standard deviation

The deviation of a value from the mean is x−xˉx - \bar{x}. Deviations always sum to zero, so we square them. The variance\textbf{variance} is the mean of the squared deviations, and the standard deviation\textbf{standard deviation} σ\sigma is its square root, in the same units as the data.

The calculation form is much quicker: σ2=∑x2n−(∑xn)2\sigma^{2} = \dfrac{\sum x^{2}}{n} - \left(\dfrac{\sum x}{n}\right)^{2} — "the mean of the squares minus the square of the mean".

For frequency tables, include frequencies: σ2=∑fx2∑f−xˉ2\sigma^{2} = \dfrac{\sum fx^{2}}{\sum f} - \bar{x}^{2}. OCR accepts dividing by nn; you may also see n−1n - 1 used for samples, and should follow the question.

σ2=∑(x−xˉ)2n=∑x2n−xˉ2\sigma^{2} = \dfrac{\sum (x - \bar{x})^{2}}{n} = \dfrac{\sum x^{2}}{n} - \bar{x}^{2}
Variance.
σ=∑fx2∑f−xˉ2\sigma = \sqrt{\dfrac{\sum fx^{2}}{\sum f} - \bar{x}^{2}}
Standard deviation from a frequency table.
Example 1For 10 values, ∑x=85\sum x = 85 and ∑x2=785\sum x^{2} = 785. Find the mean and standard deviation.
1xˉ=8.5\bar{x} = 8.5.
2σ2=78510−8.52=78.5−72.25=6.25\sigma^{2} = \dfrac{785}{10} - 8.5^{2} = 78.5 - 72.25 = 6.25.
AnswerMean 8.58.5; standard deviation 2.52.5

Tip — Your calculator’s statistics mode will find σ\sigma directly from a list or frequency table. Use it to check, but show the formula with substituted values when working from summary statistics.

3

Outliers

A common rule: an outlier is any value more than 1.5×IQR1.5 \times \text{IQR} below Q1Q_{1} or above Q3Q_{3}.

Another: any value more than 22 (or 33) standard deviations from the mean. Use whichever rule the question gives.

Outliers should not simply be deleted. Decide whether each is an error (a mistyped value, an impossible reading) — which may be cleaned\textbf{cleaned} from the data — or a genuine extreme, which should be kept and interpreted.

Example 1Using the data in the IQR example, is 2525 an outlier by the 1.5×IQR1.5 \times \text{IQR} rule?
1Upper fence: Q3+1.5×12=18+18=36Q_{3} + 1.5 \times 12 = 18 + 18 = 36.
225<3625 < 36.
AnswerNo, 25 is not an outlier by this rule.
Why this works

In real data sets like OCR’s large data set, apparent outliers often have explanations — an unusual region, a data-entry slip, a different definition. Asking "why is this value extreme?" is part of the interpretation mark.

4

Coding and comparing

If y=x−aby = \dfrac{x - a}{b}, then σy=σxb\sigma_{y} = \dfrac{\sigma_{x}}{b} (taking b>0b > 0). Adding or subtracting a constant shifts every value equally and does not change the spread at all; only the scaling matters.

When comparing two data sets, compare a measure of location and\textit{and} a measure of spread, and interpret both in context: "on average group A took longer, and their times were more consistent".

y=x−ab⇒σy=σxby = \dfrac{x - a}{b} \Rightarrow \sigma_{y} = \dfrac{\sigma_{x}}{b}
Coding and standard deviation.
Example 1Temperatures coded by y=x−202y = \dfrac{x - 20}{2} have yˉ=1.5\bar{y} = 1.5 and σy=0.8\sigma_{y} = 0.8. Find the mean and standard deviation of the original temperatures.
1xˉ=2yˉ+20=23\bar{x} = 2\bar{y} + 20 = 23.
2σx=2σy\sigma_{x} = 2\sigma_{y}; the −20-20 has no effect on spread.
AnswerMean 2323°C, standard deviation 1.61.6°C

Tip — A comparison answer needs two sentences, one on average and one on spread, each with a figure and a contextual interpretation.

Think like an examiner

  • Pair median with IQR and mean with standard deviation when summarising.
  • Show the substitution into ∑x2n−xˉ2\dfrac{\sum x^{2}}{n} - \bar{x}^{2}.
  • State the outlier rule you are applying and compute the fence values.
  • Compare data sets on both location and spread, in context.

Common misconceptions

Computing (∑x)2n\dfrac{(\sum x)^{2}}{n} instead of ∑x2n\dfrac{\sum x^{2}}{n}.
∑x2\sum x^{2} means square each value, then add.
Forgetting to square-root the variance.
Standard deviation is variance\sqrt{\text{variance}}.
Subtracting aa from the standard deviation when decoding.
Adding or subtracting constants does not change spread.
Removing every outlier automatically.
Only remove values judged to be errors; explain your decision.

Dispersion

IQR=Q3−Q1\text{IQR} = Q_{3} - Q_{1}
Interquartile range.
σ2=∑x2n−xˉ2\sigma^{2} = \tfrac{\sum x^{2}}{n} - \bar{x}^{2}
Variance.
Q1−1.5 IQR, Q3+1.5 IQRQ_{1} - 1.5\,\text{IQR},\ Q_{3} + 1.5\,\text{IQR}
Outlier fences.
σy=σx/b\sigma_{y} = \sigma_{x}/b
Coding.

Stretch yourself

A data set of 20 values has mean 15 and standard deviation 4. A value of 15 is removed and replaced with a value of 35. Find the new mean and new standard deviation.

Hint — Recover ∑x\sum x and ∑x2\sum x^{2} from the mean and standard deviation, adjust them for the swap, then recalculate.

Reveal solution
SolutionOriginally ∑x=20×15=300\sum x = 20 \times 15 = 300. From σ2=∑x2n−xˉ2\sigma^{2} = \dfrac{\sum x^{2}}{n} - \bar{x}^{2}: 16=∑x220−22516 = \dfrac{\sum x^{2}}{20} - 225, so ∑x2=20×241=4820\sum x^{2} = 20 \times 241 = 4820. After the swap: ∑x=300−15+35=320\sum x = 300 - 15 + 35 = 320 and ∑x2=4820−225+1225=5820\sum x^{2} = 4820 - 225 + 1225 = 5820. New mean =32020=16= \dfrac{320}{20} = 16. New variance =582020−162=291−256=35= \dfrac{5820}{20} - 16^{2} = 291 - 256 = 35, so the new standard deviation is 35≈5.92\sqrt{35} \approx 5.92. A single extreme value has raised the standard deviation by almost 50%, while the mean rose by only 1 — a vivid illustration of how sensitive σ\sigma is to outliers. ■\blacksquare

Questions students ask

What is the difference between variance and standard deviation?
Variance is the mean squared deviation; standard deviation is its square root, which has the same units as the data and is easier to interpret.
When should I use IQR rather than standard deviation?
When the data are skewed or contain outliers, or when you are already using the median as the average.
Why square the deviations?
Raw deviations always sum to zero. Squaring makes them all positive and gives extra weight to values far from the mean.
Does multiplying data by 3 triple the variance?
No — it multiplies the variance by 9 and the standard deviation by 3.

Key takeaways

  • Range is simple but sensitive to extremes; IQR measures the middle 50%.
  • σ2=∑x2n−xˉ2\sigma^{2} = \tfrac{\sum x^{2}}{n} - \bar{x}^{2}; standard deviation is its square root.
  • Outliers: beyond 1.5×1.5 \times IQR from the quartiles, or several standard deviations from the mean.
  • Coding by y=(x−a)/by = (x - a)/b divides the standard deviation by bb; adding constants has no effect.
  • Compare data sets using location and spread, interpreted in context.

How this fits the course

Test yourself

Answer a few questions, then review anything you missed.

Next step

Keep practising

Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.

Browse practice topics

Related lessons

All 5 lessons

Put the methods into practice: see how A-Level maths duels work. An account is required to play; the overview and sample are public.