Euler Hall — free maths guides

Find a quartile by the median-of-halves rule

A plain-language explanation of quartiles and the interquartile range. The idea in plain words, a worked example, and a check with the answers shown — part of the free Statistics guides.

The medians of the two halves

A quartile is a median of a half. Sort the sample, find its medianQ2Q_2, then:

  • - *Q1Q_1 is the median of the values below**Q2Q_2;
  • - *Q3Q_3 is the median of the values above**Q2Q_2.

On an odd count the median itself belongs to neither half. With seven values the median is the fourth, and the halves are the three below it and the three above it. That is the median-of-halves rule, and stating it is essential: the other common convention includes the median in both halves and gives different answers on odd counts.

Each quartile marks a count, not a distance.Q1Q_1 has a quarter of the values at or below it, andQ3Q_3 three quarters.

Why quartiles are positions, not distances

Because a position is resistant.Q1Q_1 depends on the order of the lower half, so a wild value aboveQ3Q_3 cannot move it. If quartiles were fractions of the range they would move with the extremes, and a box plot would stretch to accommodate the very outlier it is meant to reveal.

The IQR and the 1.5-IQR fences are built on that resistance, which is why they are the summaries reported for skewed data.

Worked example: seven and eight values

Seven values:1,2,3,4,5,6,71, 2, 3, 4, 5, 6, 7. MedianQ2=4Q_2 = 4; the halves are1,2,31, 2, 3 and5,6,75, 6, 7, soQ1=2Q_1 = 2 andQ3=6Q_3 = 6.

Eight values:1,2,3,4,5,6,7,81, 2, 3, 4, 5, 6, 7, 8. MedianQ2=4.5Q_2 = 4.5; the halves are1,2,3,41, 2, 3, 4 and5,6,7,85, 6, 7, 8, soQ1=2.5Q_1 = 2.5 andQ3=6.5Q_3 = 6.5.

Check. In both cases each quartile has about a quarter of the values at or below it. A quartile that does not is a sign the rule was misapplied.

By the end you can
  • Find Q1, Q2 and Q3 of a sample
  • Apply the median-of-halves rule, including where the median goes on an odd count
  • Say what each quartile marks in terms of counts
Check yourself
  1. 1. FindQ1Q_1,Q2Q_2 andQ3Q_3 of1,2,3,4,5,6,7,8,91, 2, 3, 4, 5, 6, 7, 8, 9.
  2. 2. What fraction of the values lie betweenQ1Q_1 andQ3Q_3?
Answers
  1. 1.Q2=5Q_2 = 5, lower half1,2,3,41, 2, 3, 4 givesQ1=2.5Q_1 = 2.5, upper half6,7,8,96, 7, 8, 9 givesQ3=7.5Q_3 = 7.5.
  2. 2. About half — that is what makes the box the middle half.
Work out where to start — free, no accountAnswer six real questions — free, no account