Quartiles, interquartile range and box plots
Machine translation
Learn
Gus records the packages he delivers over 7 days and puts them in order from smallest to largest: 2, 6, 8, 10, 14, 16 and 22. The median, 10, splits the data into two halves. Quartiles split the ordered data into four parts with the same number of data values. There are three: Q1, Q2 and Q3. Q2 is the median. Q1 is the median of the lower half and Q3 is the median of the upper half. When there is an odd number of data values, the median does not go into either half.
2 6 8 10 14 16 22 Q1 = 6, Q2 = 10 and Q3 = 16 The interquartile range, IQR, is Q3 − Q1: it measures the middle half of the data. Here it is 16 − 6 = 10. The range, on the other hand, is 22 − 2 = 20. An outlier changes the range a lot, but hardly changes the IQR at all.
If the data come in a frequency table, first write all the data values in a row, with their repeats, and then find the quartiles.
A box-and-whisker diagram draws five numbers on an axis: the lowest value, Q1, the median, Q3 and the highest value. The box goes from Q1 to Q3, with a line at the median, and the whiskers reach to the lowest and highest values.
Lowest value 2, Q1 6, median 10, Q3 16 and highest value 22 Each of the four parts of the diagram, the two whiskers and the two halves of the box, has roughly a quarter of the data, even though they are not the same length. The box contains the middle half of the data. A wide box, or a large IQR, means the data are more spread out.
Box B is wider: its data are more spread out To compare two sets, draw their boxes on the same axis. The median tells you where the centre is and the IQR tells you how far apart the data are.
Worked examples
Example 1
Ellie sells these loaves over 10 days: 14, 8, 20, 11, 9, 16, 12, 7, 18 and 10. Find the lowest value, Q1, the median, Q3 and the highest value, and the IQR.
| 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 18 | 20 |
- Order the data: 7, 8, 9, 10, 11, 12, 14, 16, 18, 20.
- There are 10 data values: the median is halfway between the 5th and the 6th, (11 + 12) ÷ 2 = 11.5.
- Q1 is the median of the first 5, 9. Q3 is the median of the last 5, 16.
- The IQR is 16 − 9 = 7.
Lowest value 7, Q1 9, median 11.5, Q3 16, highest value 20, and IQR 7.
Watch out! Here many people do not put the data in order before finding the quartiles, or they give the range, 20 − 7 = 13, as if it were the IQR.
Example 2
The box plot shows the marks of Tony's class. What is the IQR, and between which marks is the middle half of the class?
- Read Q1 and Q3 on the axis: Q1 is 5 and Q3 is 8.
- The IQR is Q3 − Q1 = 8 − 5 = 3.
- The box contains the middle half of the data: half the class scored between 5 and 8.
The IQR is 3, and the middle half of the marks is between 5 and 8.
Watch out! Here many people give the range, 10 − 3 = 7, instead of the IQR.
Example 3
Mara records the ages of the customers at two shops, A and B, and draws their boxes on the same axis. Both have a median of 30. Which shop has customers with more spread-out ages?
- The IQR of A is 38 − 25 = 13.
- The IQR of B is 33 − 28 = 5.
- A has the wider box: the larger IQR.
Shop A: its IQR is 13, compared with 5.
Watch out! Here many people say they are the same, because both have the same median, 30.
A challenge to think about
Record the ages of 9 people in your family or your class and put them in order. Find the quartiles and the IQR and draw the box. Then add a very old person: what changes more, the range or the IQR?
Practise
Rounds of 10 questions. Choose a level:
Your grade in this topic:No grade yetDo a round at the Basic level to get a grade.
Next topic: Mean deviation, variance and standard deviation; coefficient of variation →