Read it again any time, including while you work through the exercises.
The median cuts a sorted series into two halves. Quartiles go further: they cut it into quarters. With them, you know where the values cluster and how much they spread out.
Here is the definition to remember. The first quartile Q1 is the smallest value of the series such that at least 25% of the values are less than or equal to it. The third quartile Q3 is the smallest value such that at least 75% of the values are less than or equal to it. In practice, for a sorted series of n values: Q1 is the value at rank n/4 (rounded up to the next rank when n/4 is not whole), and Q3 the value at rank 3n/4 (same rounding rule).
Example with 8 sorted values: n/4 = 2, so Q1 is the 2nd value; 3n/4 = 6, so Q3 is the 6th value. With 10 values: n/4 = 2.5, rounded up to 3, so Q1 is the 3rd value; 3n/4 = 7.5, rounded up to 8, so Q3 is the 8th value. Just like for the median: ALWAYS sort the series first.
The interquartile range is the distance Q3 - Q1. It measures the width of the zone holding roughly the central half of the values. Unlike the range, it ignores extreme values: one giant value at the far end of the series does not move it. It is a robust measure of spread.
To compare two series, look at their medians (the central level) AND their interquartile ranges (the spread). Two series can share the same median yet have very different spreads: same results "at the centre", but totally different consistency. That is exactly what you are about to explore.
Here is a sorted series of 8 values: 2, 4, 5, 7, 9, 11, 14, 16. Find Q1, Q3 and the interquartile range.
- 1
n = 8 ; n/4 = 2 -> Q1 = 2e valeur = 4
I compute n/4 = 2, which is whole: Q1 is the value at rank 2, that is 4. At least a quarter of the values are less than or equal to 4.
- 2
3n/4 = 6 -> Q3 = 6e valeur = 11
I compute 3n/4 = 6: Q3 is the value at rank 6, that is 11. At least three quarters of the values are less than or equal to 11.
- 3
Q3 - Q1 = 11 - 4 = 7
The interquartile range is the difference between Q3 and Q1: the central half of the values fits in a zone of width 7.
Result: Q1 = 4, Q3 = 11, interquartile range = 7.