Glossary

Quartile

Also written: quartiles · Q1 · Q3 · first quartile · third quartile

Definition

Quartiles cut ordered data into four equal parts. Q1 has a quarter of the values below it, Q3 has three quarters below it, and the gap between them is the interquartile range.

Finding them

Sort the data and find the median. Then:

  • Q1Q_1 is the median of the values below the median.
  • Q3Q_3 is the median of the values above it.

With an odd count, leave the median itself out of both halves.

For 4,7,9,12,14,15,214, 7, 9, 12, 14, 15, 21 the median is 1212:

lower (4,7,9)Q1=7upper (14,15,21)Q3=15\text{lower } (4, 7, 9) \Rightarrow Q_1 = 7 \qquad \text{upper } (14, 15, 21) \Rightarrow Q_3 = 15

What each one marks

Values below it
Q1Q_125%25\%
median50%50\%
Q3Q_375%75\%

So a test score at Q3Q_3 beat three quarters of the group.

The interquartile range

IQR=Q3Q1\text{IQR} = Q_3 - Q_1

The IQR is the width of the middle half of the data. Because it discards the top and bottom quarters, an outlier sitting in one of those tails has no effect on it — which is what makes it the measure of spread to pair with a median.

On a box plot, the box runs from Q1Q_1 to Q3Q_3, so the width of the box is the IQR.

A note on conventions

Statistical software offers several methods for computing quartiles, and they disagree on small data sets. The method above — splitting at the median and excluding it when the count is odd — is the one US school courses use, and it is what this site uses throughout.

Lessons that use this term

Related terms