M4.7.3 Chapter 3
Cumulative frequency
A bus company times 80 journeys and sorts the times into classes. How can one graph show the middle time, and how many journeys took under 25 minutes?
Your guess
Pick one before you read on. It is fine to be wrong.
By the end you can
- Draw a cumulative frequency graph
- Read the median and quartiles from the graph
- Find the interquartile range
The table shows the times of 80 bus journeys. A cumulative frequency is a running total. It tells how many values are below the top of a class.
Look at the class 10 ≤ t < 20. Every journey in it took under 20 minutes. So the running total of 11 is the number of journeys under 20 minutes. It belongs at 20, the upper boundary of the class, not at its middle.
Draw it first
Draw the cumulative frequency graph
1 Plot (upper boundary, cumulative frequency) for each class. Start at (0, 0), because no journey took under 0 minutes.
2 Join the points with straight lines. The graph never goes down, and ends at 80.
3 To find the median, go across from 40, half of 80, to the graph. Then go down to the time axis.
The graph lets us read other values. How many journeys took under 25 minutes? Go up from 25 on the time axis to the graph, then across to the cumulative frequency axis. The reading is 20.
Joining the points with straight lines treats the journeys in each class as spread evenly along it. So a reading between two plotted points is an estimate. Some books draw a smooth curve instead, and its readings differ a little.
Worked example
How many of the 80 journeys took 40 minutes or more?
- Read up from 40 minutes on the time axis. The graph shows 51 journeys.
- Check with the table of cumulative frequencies: 4 + 7 + 18 + 22 = 51.
- The others took 40 minutes or more. There are 80 journeys in all.
- 80 − 51 = 29 journeys.
Answer: 29 journeys
Now the median and the quartiles. The median is the middle value. The lower quartile, Q1, has a quarter of the values below it. The upper quartile, Q3, has three quarters of the values below it.
For 80 values we read the graph at 40 for the median, 20 for Q1 and 60 for Q3. Why 40, and not the 40.5th value of chapter 2? The graph does not show 80 separate journeys. Its height at a time is how many journeys took less than that time. The median is the time with half the journeys below it. Half of 80 is 40, so we read across from 40.
In the same way Q1 has a quarter below it, so we read at 80 ÷ 4 = 20. The graph is an estimate made from classes. Reading at 40.5 instead of 40 gives about 35.2 minutes, not 35, and that small gap does not matter here. For a short list of separate values we count instead, as the next chapter shows.
Worked example
Read the median and the two quartiles of the 80 journey times from the graph.
- The median is read at 80 ÷ 2 = 40. Across to the graph and down gives an estimate of 35 minutes.
- Q1 is read at 80 ÷ 4 = 20. Across to the graph and down gives an estimate of 25 minutes.
- Q3 is read at 3 × 80 ÷ 4 = 60. Across to the graph and down gives an estimate of 45 minutes.
Answer: The median is 35 minutes. The lower quartile is 25 minutes and the upper quartile is 45 minutes.
The interquartile range, IQR, is Q3 − Q1. It is the length of the middle half of the data. The range, highest minus lowest, depends on two extreme values. A single odd value can change it a lot. The IQR leaves out the lowest quarter and the highest quarter, so one odd value cannot move it much.
Worked example
Find the interquartile range of the journey times.
- From the graph, the upper quartile is 45 minutes.
- The lower quartile is 25 minutes.
- IQR = Q3 − Q1 = 45 − 25 = 20 minutes.
- The middle half of the journeys fit within a spread of 20 minutes.
Answer: 20 minutes
See it three ways
With things
Line up 80 journeys from the shortest to the longest. Split the line into four equal groups. Walk to the end of the first group, the second group, and the third group.
As a picture
In symbols
80 ÷ 4 = 20. 80 ÷ 2 = 40. 3 × 80 ÷ 4 = 60. Read the graph at 20, 40 and 60.
Try it
Graph the lengths of 20 sticks
You need: 20 sticks between 10 cm and 60 cm long, a ruler, squared paper.
- Measure each stick. Sort them into classes: 10 ≤ L < 20, 20 ≤ L < 30 and so on up to 60.
- Write the frequencies, then the running totals.
- Plot (upper boundary, running total), starting at (10, 0). Join the points with straight lines. Read the median at 10.
What you will see: The line never goes down, because a running total never goes down. It ends at 20, the number of sticks. Here, the median is about 35 cm.
A wrong idea many people have
Plot each cumulative frequency at the middle of its class.
Why it feels right: Bar charts and mean calculations use the middle of a class, so it seems natural here too.
The test that breaks it: The running total of 11 for 10 ≤ t < 20 counts journeys that took under 20 minutes. If it were plotted at 15, the graph would say that 11 journeys took under 15 minutes. That is not known.
What is true: A running total up to the end of a class belongs at the upper boundary of that class.
Key words
- cumulative frequency
- a running total of the frequencies.
- upper boundary
- the top end of a class, where its cumulative frequency is plotted.
- quartile
- a value that splits ordered data into quarters. Q1 has a quarter below it, Q3 a quarter above.
- interquartile range
- the upper quartile minus the lower quartile, the length of the middle half of the data.
Back to your guess
The answer is C: Plot the running total of the frequencies, then read across from half of 80, which is 40.
A running total of the frequencies is plotted, and the graph is read at 40, half of 80. Reading across from 40 to the graph and down to the time axis gives the median. The middle class by position can be the wrong class. The class with the highest frequency is the modal class, not the median.
Check yourself
Try each one before you look. A wrong answer tells you where to go next.
Heights of 60 plants are in classes. Which point do you plot for the class 20 ≤ h < 30?
See the answer
(30, 24)
The running total up to this class is 4 + 5 + 15 = 24 plants. They are all under 30 cm, so the point is at the upper boundary: (30, 24).
- If you chose A: The running total belongs at the upper boundary of the class, not at its middle. All 24 plants are under 30 cm. Go to M4.7.3.
- If you chose B: 15 is the frequency of this class. A cumulative frequency adds the classes before it: 4 + 5 + 15. Go to M4.7.3.
- If you chose C: The running total of 24 counts plants under 30 cm, so it is plotted at 30, not at the lower boundary 20. Go to M4.7.3.
This graph shows the heights of the 60 plants. What is the median height?
See the answer
34 cm
Half of 60 is 30. Read across from 30 to the graph, then down: the median is 34 cm.
- If you chose B: 30 is the place to read at, half of 60. You must then go across to the graph and down to the height axis. Go to M4.7.3.
- If you chose C: 24 is the cumulative frequency at a height of 30 cm. It is a number of plants, not a height. Read across from 30, then down. Go to M4.7.3.
- If you chose D: 45 is the place where the upper quartile is read, 3 × 60 ÷ 4. The median is read at half of 60. Go to M4.7.3.
For some data, Q1 = 22 and Q3 = 41. What is the interquartile range?
Why is the interquartile range often a better measure of spread than the range?
See the answer
It leaves out the lowest and highest quarters, so one odd value cannot change it much.
The range depends on the two most extreme values. The IQR looks at the middle half only.
Use the graph of the 60 plants. How many plants are shorter than 40 cm?
See the answer
39
Read up from 40 on the height axis. The graph is at 39 plants.
- If you chose A: 15 is the frequency of the class 30 ≤ h < 40. Plants under 40 cm include the lower classes too. Go to M4.7.3.
- If you chose B: 21 plants are 40 cm or more, since 60 − 39 = 21. The question asks how many are shorter. Go to M4.7.3.
- If you chose D: 24 is the reading at 30 cm. The question asks about 40 cm. Go to M4.7.3.
A graph shows 80 values. At which cumulative frequency do you read the upper quartile?
See the answer
60
The upper quartile is three quarters of the way up: 3 × 80 ÷ 4 = 60.
- If you chose A: You read the lower quartile, a quarter of 80. The upper quartile is three quarters of the way up. Go to M4.7.3.
- If you chose B: You read the median, half of 80. The upper quartile is higher up. Go to M4.7.3.
- If you chose C: You took 75% of 100. The quartile place depends on the number of values, so it is three quarters of 80. Go to M4.7.3.
From an earlier chapter
Using the table of 80 bus journeys, estimate the mean journey time. Use the midpoints of the classes.
See the answer
34.5 minutes
The midpoints are 5, 15, 25, 35, 45 and 55. 5 × 4 + 15 × 7 + 25 × 18 + 35 × 22 + 45 × 18 + 55 × 11 = 20 + 105 + 450 + 770 + 810 + 605 = 2 760. Then 2 760 ÷ 80 = 34.5.
The lower quartile of some data is 31 and the upper quartile is 52. What is the interquartile range?
See the answer
21
IQR = Q3 − Q1 = 52 − 31 = 21.
A cumulative frequency graph of 60 values reads 42 at a height of 40 cm. How many values are 40 cm or more?
See the answer
18
42 values are under 40 cm. The rest are 40 cm or more: 60 − 42 = 18.
Keep it
Copy this into your exercise book.
Cumulative frequency is a running total, plotted at the upper boundary. Read the median at n ÷ 2, Q1 at n ÷ 4, Q3 at 3n ÷ 4. IQR = Q3 − Q1.
Draw: A rising line through points, with dashed lines from 20, 40 and 60 on the upright axis down to the other axis.