Skip to the page
Home Campus
Start free

Quartiles and Interquartile Range

The lower and upper quartiles of a list of data as the medians of its two halves, for an odd and an even number of values; the five-number summary; and the interquartile range, which one extreme value hardly changes.

What You Should Already Know

  • From Secondary 2: the median is the middle value of the data in order, at position n+12\dfrac{n + 1}{2}; for an even number of values it is the mean of the two middle values. The range is the largest value minus the smallest.
  • From lesson 3.2: on a cumulative frequency curve the lower quartile Q1Q_1, the median and the upper quartile Q3Q_3 cut the data into four parts of about a quarter each, and the interquartile range Q3−Q1Q_3 - Q_1 is the spread of the middle half.
  • For example, the rainfall on 8 days, 5, 8, 9, 12, 14, 19, 21, 30 mm, has median 12+142=13\dfrac{12 + 14}{2} = 13 mm and range 30−5=2530 - 5 = 25 mm.

The Quartiles of a List

A curve gives the quartiles of grouped data as estimates. When we have the single values, we can find the quartiles exactly. The median cuts the ordered data into a lower half and an upper half; the middle of each half is a quartile.

The one question is what to do with the median when it is one of the values. In this course, as in Singapore textbooks, it is left out of both halves.

The quartiles of a list of n values

1. Arrange the values in order, from the smallest to the largest, and find the median.

2. If nn is odd, the median is one of the values: leave it out. The values below it form the lower half, and the values above it the upper half.

3. If nn is even, split the values into two equal halves of n2\dfrac{n}{2} values each.

4. The lower quartile Q1Q_1 is the median of the lower half; the upper quartile Q3Q_3 is the median of the upper half.

About a quarter of the values lie below Q1Q_1, about half below the median and about three quarters below Q3Q_3.

Example 1: An odd number of values

The times, in minutes, that 15 parents took to drive their children to school one morning were: 22, 18, 30, 13, 25, 19, 43, 21, 28, 14, 24, 33, 18, 27, 22. Find the median and the lower and upper quartiles.

Solution

In order: 13, 14, 18, 18, 19, 21, 22, 22, 24, 25, 27, 28, 30, 33, 43. Both 18s and both 22s are kept.

n=15n = 15, so the median is at position 15+12=8\dfrac{15 + 1}{2} = 8: the 8th value, 22.

15 is odd, so the median is left out of both halves. Lower half: the 1st to the 7th values, 13, 14, 18, 18, 19, 21, 22. Upper half: the 9th to the 15th values, 24, 25, 27, 28, 30, 33, 43.

Each half has 7 values, so its median is its 4th value. Q1=18Q_1 = 18 (the 4th value of the list) and Q3=28Q_3 = 28 (the 12th).

The 15 times in order, 13 to 43 minutes, with the median 22 (the 8th value), the lower half (1st to 7th) and the upper half (9th to 15th), and the quartiles 18 (4th) and 28 (12th)131418181921222224252728303343123456789101112131415lower halfupper halfmedian = 22Q₁ = 18Q₃ = 28

The 7th value is also 22, but it is in the lower half: the median is the 8th value, the one in the middle.

Median 22 minutes, Q1=18Q_1 = 18 minutes, Q3=28Q_3 = 28 minutes.

Example 2: An even number of values

Find the median and the quartiles of 3, 5, 6, 8, 9, 11, 12, 15.

Solution

The values are in order already. n=8n = 8: the median is at position 4.5, the mean of the 4th and 5th values: 8+92=8.5\dfrac{8 + 9}{2} = 8.5.

8 is even, so the values split into two halves of 4: lower half 3, 5, 6, 8; upper half 9, 11, 12, 15. No value is left out.

Each half has 4 values, so its median is the mean of its 2nd and 3rd values: Q1=5+62=5.5Q_1 = \dfrac{5 + 6}{2} = 5.5 and Q3=11+122=11.5.Q_3 = \dfrac{11 + 12}{2} = 11.5\text{.}

The 8 values 3, 5, 6, 8, 9, 11, 12, 15 in order, with the median 8.5 between the 4th and 5th values, the two halves of four, and the quartiles 5.5 and 11.5 between the 2nd and 3rd and the 6th and 7th values3568911121512345678lower halfupper halfmedian = 8.5Q₁ = 5.5Q₃ = 11.5

Here the median and both quartiles fall between two values.

Median 8.5, Q1=5.5Q_1 = 5.5, Q3=11.5Q_3 = 11.5

Example 3: From a stem-and-leaf diagram

The stem-and-leaf diagram shows the resting pulse rates, in beats per minute, of 10 pupils. Find the median and the quartiles.

Stem-and-leaf diagram of 10 pulse rates: 6 | 2 5 8; 7 | 0 1 4 6 9; 8 | 3 8; key 6 | 2 means 62 beats per minuteStemLeaves6258701469838Key: 6 | 2 means 62 beats per minute

Solution

A stem-and-leaf diagram shows the values in order: 62, 65, 68, 70, 71, 74, 76, 79, 83, 88.

n=10n = 10: the median is the mean of the 5th and 6th values, 71+742=72.5\dfrac{71 + 74}{2} = 72.5.

Two halves of 5: lower half 62, 65, 68, 70, 71; upper half 74, 76, 79, 83, 88. Each half has 5 values, so its median is its 3rd value.

Q1=68Q_1 = 68 and Q3=79Q_3 = 79.

Median 72.5 beats per minute, Q1=68Q_1 = 68, Q3=79Q_3 = 79 beats per minute.

Example 4: From a frequency table

The table shows how many books each of 20 pupils borrowed from the school library in one month. Find the median and the quartiles.

Number of booksNumber of pupils
0022
1144
2266
3344
4433
5511
Total2020

Solution

As in Secondary 2, there is no need to write the 20 values out: a running total of the frequencies (the cumulative frequency) gives the position of each value.

Number of booksffCumulative frequency
002222
114466
22661212
33441616
44331919
55112020
Total2020

So 0 is the 1st and 2nd values, 1 the 3rd to the 6th, 2 the 7th to the 12th, 3 the 13th to the 16th, 4 the 17th to the 19th, and 5 the 20th.

n=20n = 20 is even: the median is the mean of the 10th and 11th values, both 2, so the median is 2.

The lower half is the 1st to the 10th values; its median is the mean of its 5th and 6th values, both 1: Q1=1Q_1 = 1.

The upper half is the 11th to the 20th values; its median is the mean of the 15th and 16th values, both 3: Q3=3Q_3 = 3.

Median 2 books, Q1=1Q_1 = 1 book, Q3=3Q_3 = 3 books.

The Five-Number Summary

The five-number summary

The five-number summary of a set of data is: the least value, the lower quartile Q1Q_1, the median, the upper quartile Q3Q_3 and the greatest value.

It says where the data lie (from the least to the greatest value), where the middle is (the median) and where the middle half lies (from Q1Q_1 to Q3Q_3). Lesson 3.4 draws it as a box-and-whisker plot.

Example 5: A five-number summary, the range and the interquartile range

For the 15 driving times of Example 1, write down the five-number summary, and find the range and the interquartile range.

Solution

From Example 1: least value 13, Q1=18Q_1 = 18, median 22, Q3=28Q_3 = 28, greatest value 43.

Range =43−13=30= 43 - 13 = 30 minutes.

Interquartile range =Q3−Q1=28−18=10= Q_3 - Q_1 = 28 - 18 = 10 minutes.

The times go from 13 to 43 minutes, but the middle half of them lie within 10 minutes of one another, from 18 to 28 minutes.

Five-number summary: 13, 18, 22, 28, 43 minutes. Range 30 minutes; interquartile range 10 minutes.

The Range and the Interquartile Range

Both the range and the interquartile range measure spread, and each uses only two values. The range uses the two most extreme values, so one very large or very small value changes it a lot. The interquartile range uses the quartiles, the edges of the middle half, so one extreme value hardly changes it.

Range and interquartile range

Range == greatest value −- least value: the spread of all the data.

Interquartile range =Q3−Q1= Q_3 - Q_1: the spread of the middle half of the data.

One very large or very small value can change the range a lot, but hardly changes the interquartile range. When the data have such a value, the interquartile range describes the spread of most of the data better.

Example 6: One very large value

In Example 1, the parent who took 43 minutes was held up by an accident. Suppose that the time had been 93 minutes instead. Find the new range and interquartile range, and compare them with Example 5.

Solution

In order: 13, 14, 18, 18, 19, 21, 22, 22, 24, 25, 27, 28, 30, 33, 93. The 93 is still the largest value, so every other value keeps its position.

The 15 times in order with 93 in place of 43: the median is still 22 and the quartiles still 18 and 28131418181921222224252728303393lower halfupper halfmedian = 22Q₁ = 18Q₃ = 28

Range =93−13=80= 93 - 13 = 80 minutes, against 30 before.

The 7 values of each half are the same as before except the largest, which is not the middle of the upper half. So Q1=18Q_1 = 18 and Q3=28Q_3 = 28 as before, and the interquartile range is still 28−18=1028 - 18 = 10 minutes.

Range 80 minutes (it was 30); interquartile range still 10 minutes. The one large value changed the range a lot and the interquartile range not at all.

Common Mistakes

  • Finding the quartiles before putting the values in order.
  • Leaving out a repeated value when ordering. Both 18s and both 22s of Example 1 are kept.
  • Putting the median into both halves when nn is odd. With the seven values 2, 5, 6, 8, 11, 12, 14 (median 8), that makes the lower half 2, 5, 6, 8 and gives Q1=5.5Q_1 = 5.5, not 5. Leave the median out: the lower half is 2, 5, 6.
  • Leaving a value out when nn is even. Then no value is the median: split into two equal halves.
  • Giving the position as the quartile ("Q1Q_1 is the 4th value, so Q1=4Q_1 = 4"). The quartile is the value at that position.
  • Giving the range or the interquartile range as two numbers ("13 to 43"). Each is one number, a difference.

Practice Questions

Try each question first, then open the solution to check your working. Write the halves out before you find the quartiles.

Question 1

Find the median, the lower and upper quartiles and the interquartile range of 4, 7, 9, 10, 12, 15, 16, 18, 21, 23, 30.

ShowHide solution

n=11n = 11: the median is the 6th value, 15.

11 is odd, so leave 15 out. Lower half: 4, 7, 9, 10, 12; upper half: 16, 18, 21, 23, 30. Each median is the 3rd value of its half.

The 11 values in order with the median 15 (the 6th value), the two halves of five, and the quartiles 9 and 2147910121516182123301234567891011lower halfupper halfmedian = 15Q₁ = 9Q₃ = 21

Q1=9Q_1 = 9, Q3=21Q_3 = 21, interquartile range =21−9=12= 21 - 9 = 12.

Median 15, Q1=9Q_1 = 9, Q3=21Q_3 = 21, interquartile range 12

Question 2

Twelve pupils scored these marks in a spelling test: 3, 5, 6, 8, 9, 10, 12, 12, 14, 15, 17, 19. Find the median, the quartiles and the interquartile range.

ShowHide solution

n=12n = 12: the median is the mean of the 6th and 7th values, 10+122=11\dfrac{10 + 12}{2} = 11.

Two halves of 6: 3, 5, 6, 8, 9, 10 and 12, 12, 14, 15, 17, 19. The median of 6 values is the mean of the 3rd and 4th.

The 12 marks in order with the median 11 between the 6th and 7th values, the two halves of six, and the quartiles 7 and 14.53568910121214151719123456789101112lower halfupper halfmedian = 11Q₁ = 7Q₃ = 14.5

Q1=6+82=7Q_1 = \dfrac{6 + 8}{2} = 7, Q3=14+152=14.5,Q_3 = \dfrac{14 + 15}{2} = 14.5\text{,} interquartile range =14.5−7=7.5= 14.5 - 7 = 7.5.

Median 11, Q1=7Q_1 = 7, Q3=14.5Q_3 = 14.5, interquartile range 7.5 marks

Question 3

The ages, in years, of nine members of a residents' committee are 52, 45, 60, 41, 78, 63, 56, 70, 67. (a) Write down the five-number summary. (b) Find the range and the interquartile range.

ShowHide solution

(a) In order: 41, 45, 52, 56, 60, 63, 67, 70, 78. n=9n = 9: the median is the 5th value, 60.

Leave 60 out. Lower half 41, 45, 52, 56: Q1=45+522=48.5.Q_1 = \dfrac{45 + 52}{2} = 48.5\text{.} Upper half 63, 67, 70, 78: Q3=67+702=68.5.Q_3 = \dfrac{67 + 70}{2} = 68.5\text{.}

The nine ages in order, 41 to 78, with the median 60, the two halves of four, and the quartiles 48.5 and 68.5414552566063677078lower halfupper halfmedian = 60Q₁ = 48.5Q₃ = 68.5

(b) Range =78−41=37= 78 - 41 = 37 years. Interquartile range =68.5−48.5=20= 68.5 - 48.5 = 20 years.

(a) 41, 48.5, 60, 68.5, 78 years (b) range 37 years, interquartile range 20 years

Question 4

The stem-and-leaf diagram shows the times, in seconds, that 16 pupils took to solve a puzzle. Find the median, the quartiles and the interquartile range.

Stem-and-leaf diagram of 16 times: 3 | 1 4 6 8; 4 | 0 1 3 5 5 7 9; 5 | 0 2 3 5 8; key 3 | 1 means 31 secondsStemLeaves3146840135579502358Key: 3 | 1 means 31 s
ShowHide solution

In order: 31, 34, 36, 38, 40, 41, 43, 45, 45, 47, 49, 50, 52, 53, 55, 58.

n=16n = 16: the median is the mean of the 8th and 9th values, 45+452=45\dfrac{45 + 45}{2} = 45.

Lower half (1st to 8th): 31, 34, 36, 38, 40, 41, 43, 45; Q1=38+402=39.Q_1 = \dfrac{38 + 40}{2} = 39\text{.}

Upper half (9th to 16th): 45, 47, 49, 50, 52, 53, 55, 58; Q3=50+522=51.Q_3 = \dfrac{50 + 52}{2} = 51\text{.}

Interquartile range =51−39=12= 51 - 39 = 12 seconds.

Median 45 s, Q1=39Q_1 = 39 s, Q3=51Q_3 = 51 s, interquartile range 12 s

Question 5

The table shows the number of goals scored by a football team in each of 30 matches. Find the median and the interquartile range.

GoalsMatches
0055
1199
2288
3355
4433
Total3030
ShowHide solution

Running totals: 5, 14, 22, 27, 30. So 0 goals are the 1st to the 5th values, 1 goal the 6th to the 14th, 2 goals the 15th to the 22nd, 3 goals the 23rd to the 27th, 4 goals the 28th to the 30th.

n=30n = 30: the median is the mean of the 15th and 16th values, both 2.

Two halves of 15. The lower half is the 1st to the 15th values; its median is its 8th value, which is 1: Q1=1Q_1 = 1.

The upper half is the 16th to the 30th values; its median is its 8th value, the 23rd of the list, which is 3: Q3=3Q_3 = 3.

Interquartile range =3−1=2= 3 - 1 = 2 goals.

Median 2 goals; interquartile range 2 goals

Question 6

The heights, in cm, of nine players in a volleyball squad are 150, 152, 155, 157, 160, 161, 163, 166, 168. (a) Find the range and the interquartile range. (b) The 168 cm player leaves, and a new player of 190 cm joins. Find the new range and interquartile range. (c) Which measure describes the spread of most of the squad better now?

ShowHide solution

(a) Median: the 5th value, 160. Lower half 150, 152, 155, 157: Q1=153.5Q_1 = 153.5. Upper half 161, 163, 166, 168: Q3=164.5Q_3 = 164.5.

Range =168−150=18= 168 - 150 = 18 cm; interquartile range =164.5−153.5=11= 164.5 - 153.5 = 11 cm.

(b) The new list is 150, 152, 155, 157, 160, 161, 163, 166, 190. Only the largest value has changed.

The nine heights with 190 in place of 168: the median 160 and the quartiles 153.5 and 164.5 are unchanged150152155157160161163166190lower halfupper halfmedian = 160Q₁ = 153.5Q₃ = 164.5

Range =190−150=40= 190 - 150 = 40 cm; interquartile range still 164.5−153.5=11164.5 - 153.5 = 11 cm.

(c) The interquartile range. Eight of the nine players are within 16 cm of one another, but the range has more than doubled because of one player.

(a) 18 cm and 11 cm (b) 40 cm and 11 cm (c) The interquartile range.

Question 7

For the 15 driving times of Example 1, Hafiz wrote: "Lower half: 13, 14, 18, 18, 19, 21, 22, 22. Q1=18+192=18.5."Q_1 = \dfrac{18 + 19}{2} = 18.5\text{."} Explain his mistake.

ShowHide solution

There are 15 values, an odd number, so the median, the 8th value 22, must be left out of both halves. Hafiz put it into the lower half, which then has 8 values instead of 7.

The lower half is the 1st to the 7th values, 13, 14, 18, 18, 19, 21, 22, and its middle (4th) value is 18.

He included the median in the lower half. Q1=18Q_1 = 18.

Question 8

Eight values in order are 4, 6, 7, kk, 11, 12, 15, 18. Their median is 10. (a) Find kk. (b) Find the interquartile range.

Eight values in order: 4, 6, 7, k, 11, 12, 15, 18, the fourth unknown467k1112151812345678
ShowHide solution

(a) n=8n = 8: the median is the mean of the 4th and 5th values: k+112=10\dfrac{k + 11}{2} = 10, so k+11=20k + 11 = 20 and k=9k = 9. (It lies between 7 and 11, as it must.)

(b) Lower half 4, 6, 7, 9: Q1=6+72=6.5Q_1 = \dfrac{6 + 7}{2} = 6.5. Upper half 11, 12, 15, 18: Q3=12+152=13.5.Q_3 = \dfrac{12 + 15}{2} = 13.5\text{.}

Interquartile range =13.5−6.5=7= 13.5 - 6.5 = 7.

(a) k=9k = 9 (b) 7

Question 9

The masses, in grams, of 10 apples in a bag are 152, 148, 160, 171, 139, 155, 166, 158, 144, 163. (a) Write down the five-number summary. (b) Find the range and the interquartile range.

ShowHide solution

(a) In order: 139, 144, 148, 152, 155, 158, 160, 163, 166, 171. Median =155+1582=156.5.= \dfrac{155 + 158}{2} = 156.5\text{.}

Lower half 139, 144, 148, 152, 155: Q1=148Q_1 = 148. Upper half 158, 160, 163, 166, 171: Q3=163Q_3 = 163.

The 10 masses in order, 139 to 171 g, with the median 156.5 between the 5th and 6th values, and the quartiles 148 and 163139144148152155158160163166171lower halfupper halfmedian = 156.5Q₁ = 148Q₃ = 163

(b) Range =171−139=32= 171 - 139 = 32 g. Interquartile range =163−148=15= 163 - 148 = 15 g.

(a) 139, 148, 156.5, 163, 171 g (b) range 32 g, interquartile range 15 g

Question 10

Write down a list of 7 whole numbers whose median is 10, lower quartile 6 and upper quartile 15.

ShowHide solution

With 7 values the median is the 4th, and each half has 3 values, so Q1Q_1 is the 2nd value and Q3Q_3 the 6th.

So the list must be aa, 6, bb, 10, cc, 15, dd in order, with a≤6≤b≤10≤c≤15≤d.a \le 6 \le b \le 10 \le c \le 15 \le d\text{.} One answer: 4, 6, 8, 10, 12, 15, 20.

One answer: 4, 6, 8, 10, 12, 15, 20 in order, with the median 10 and the quartiles 6 and 15468101215201234567lower halfupper halfmedian = 10Q₁ = 6Q₃ = 15

For example 4, 6, 8, 10, 12, 15, 20 (any list aa, 6, bb, 10, cc, 15, dd in order).

Key Points

  • Put the values in order first, keeping every repeated value.
  • Odd number of values: leave the median out; even number: split into two equal halves.
  • Q1Q_1 is the median of the lower half, Q3Q_3 the median of the upper half.
  • Five-number summary: least value, Q1Q_1, median, Q3Q_3, greatest value.
  • Range == greatest −- least; interquartile range =Q3−Q1= Q_3 - Q_1, the spread of the middle half.
  • One very large or very small value can change the range a lot but hardly changes the interquartile range.

Previous lesson3.2 Median, Quartiles and Percentiles from a Curve Next lesson3.4 Box-and-Whisker Plots

All Secondary 4 (Grade 10) lessons

Home Campus has lessons for Primary 3 to Secondary 4, and practice questions with worked solutions and worksheets for Primary 3 to Secondary 2. Register free to practise and keep track of progress.

This lesson follows the Singapore Secondary 4 syllabus and was checked question by question before it was published. Spotted a mistake? Tell us.