Question 39·Hard·One-Variable Data Distributions; Measures of Center and Spread
A fitness survey asked 20 participants how many whole hours they spent exercising last week. The frequency distribution of their responses is shown below.
| Hours | Participants |
|---|---|
| 0 | 1 |
| 1 | 2 |
| 2 | 3 |
| 3 | 4 |
| 4 | 3 |
| 5 | 3 |
| 6 | 2 |
| 7 | 1 |
| 8 | 1 |
| Total | 20 |
What is the interquartile range of the number of hours, in hours, for these 20 participants?
(Express the answer as an integer)
For interquartile range questions with a frequency table, either quickly expand the table into an ordered list or use cumulative counts to locate positions. For an even number of data points, split the set into equal lower and upper halves, find the median of each half as Q1 and Q3, then subtract from . Stay organized by labeling positions (1st, 2nd, …) so you don’t lose track of which values form the medians.
Hints
Understand what you’re looking for
The interquartile range is the distance between the first quartile (Q1) and the third quartile (Q3). Think about how you find Q1 and Q3 in a data set.
Turn the table into data points
Use the frequency table to write out all 20 data values in order, repeating each hour as many times as the number of participants who reported it.
Use medians of halves
For 20 values, find the median to split the data into a lower half and an upper half. Then find the median of the lower half (Q1) and the median of the upper half (Q3).
Final step
Once you know Q1 and Q3, subtract the smaller one from the larger one to get the interquartile range.
Desmos Guide
Enter the full data set
In a new expression line, type the list of all 20 values based on the table, for example: A = [0,1,1,2,2,2,3,3,3,3,4,4,4,5,5,5,6,6,7,8] and press Enter.
Find Q1 and Q3 with Desmos
In a new line, type quartile(A,1) to see the first quartile and quartile(A,3) to see the third quartile. Note both of these values from Desmos.
Compute the interquartile range
In another line, type quartile(A,3) - quartile(A,1) and read the numerical result; that value is the interquartile range and should match what you found by hand.
Step-by-step Explanation
Rewrite the data as an ordered list
Use the table to list each participant’s hours, in order, repeating each hour according to its frequency.
- 0 hours: 1 person →
0 - 1 hour: 2 people →
1, 1 - 2 hours: 3 people →
2, 2, 2 - 3 hours: 4 people →
3, 3, 3, 3 - 4 hours: 3 people →
4, 4, 4 - 5 hours: 3 people →
5, 5, 5 - 6 hours: 2 people →
6, 6 - 7 hours: 1 person →
7 - 8 hours: 1 person →
8
So the ordered data set is:
0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 8
Find the median and split the data into two halves
There are 20 data values, so the median is between the 10th and 11th values.
- 10th value: 3
- 11th value: 4
The median is between them, but for the interquartile range we mainly need to split the data:
- Lower half: first 10 values → 0, 1, 1, 2, 2, 2, 3, 3, 3, 3
- Upper half: last 10 values → 4, 4, 4, 5, 5, 5, 6, 6, 7, 8
Find the first quartile (Q1)
Q1 is the median of the lower half (the first 10 values).
For 10 values, the median is between the 5th and 6th values of that half.
Lower half: 0, 1, 1, 2, 2, 2, 3, 3, 3, 3
- 5th value: 2
- 6th value: 2
So is the average of 2 and 2, which is 2.
Find Q3 and compute the interquartile range
Q3 is the median of the upper half (the last 10 values).
Upper half: 4, 4, 4, 5, 5, 5, 6, 6, 7, 8
For 10 values, the median is between the 5th and 6th values of this half.
- 5th value: 5
- 6th value: 5
So is the average of 5 and 5, which is 5.
The interquartile range (IQR) is :
So the interquartile range is 3 hours.