Measures of Variability: IQR and MAD
Calculate interquartile range (IQR) and mean absolute deviation (MAD) to describe the spread of a data set. Use these measures to compare two distributions and draw conclusions.
A lesson of Pre-Algebra, in Statistics & Probability, about 10 minutes.
Measures of Variability
By the end of this lesson, you will be able to calculate and interpret the range, IQR, and MAD, and explain how they measure the spread of data.
Why Measure Variability?
Two datasets can have the same mean but very different spreads. Knowing the center isn't enough — we also need to know how spread out the data is.
Example:
- Set A: 5, 5, 5, 5, 5 — mean = 5, no spread
- Set B: 1, 3, 5, 7, 9 — mean = 5, large spread
Range
$$\text{Range} = \text{Max} - \text{Min}$$
Simple and intuitive, but heavily influenced by outliers.
Example: Data: 3, 7, 8, 12, 40
Range = 40 − 3 = 37 — but 37 is mostly driven by the single outlier 40.
Interquartile Range (IQR)
The IQR is the range of the middle 50% of the data.
$$\text{IQR} = Q_3 - Q_1$$
Steps:
- Order the data
- Find the median (splits data in half)
- Q₁ = median of the lower half
- Q₃ = median of the upper half
- IQR = Q₃ − Q₁
Example: Data: 2, 4, 6, 8, 10, 12, 14
Median = 8; Lower half: 2, 4, 6 → Q₁ = 4; Upper half: 10, 12, 14 → Q₃ = 12
IQR = 12 − 4 = 8
IQR is resistant to outliers — it uses only the middle portion of the data.
Outlier rule: an observation is an outlier if it falls below $Q_1 - 1.5 \times \text{IQR}$ or above $Q_3 + 1.5 \times \text{IQR}$.
Mean Absolute Deviation (MAD)
The MAD measures the average distance of each data point from the mean.
$$\text{MAD} = \frac{\sum|x_i - \bar{x}|}{n}$$
Steps:
- Find the mean $\bar{x}$
- Compute the distance (absolute value) from each value to the mean
- Average those distances
Example: Data: 2, 4, 6, 8, 10; $\bar{x} = 6$
Distances: |2−6| = 4, |4−6| = 2, |6−6| = 0, |8−6| = 2, |10−6| = 4
MAD = $(4+2+0+2+4)/5 = 12/5 = 2.4$
On average, each value is 2.4 units from the mean.