- Frequency tables and grouped data · coming soon
- Mean, median, mode · coming soon
- Median and quartiles from cumulative frequency
- Estimating median and quartiles from a histogram · coming soon
- The normal distribution · coming soon
A question the table cannot answer
A school measures the heights of 80 students. The heights are grouped into classes, like this:
| Height, h (cm) | Frequency |
|---|---|
| 150 ≤ h < 155 | 5 |
| 155 ≤ h < 160 | 12 |
| 160 ≤ h < 165 | 24 |
| 165 ≤ h < 170 | 21 |
| 170 ≤ h < 175 | 13 |
| 175 ≤ h < 180 | 5 |
The table answers one kind of question well: how many students are in each class? Now ask a slightly different question. How many students are shorter than 160 cm?
The table does not say this directly. But you can work it out. Everyone in the first two classes is shorter than 160 cm, so the answer is 5 + 12 = 17.
Now ask: how many students are shorter than 162 cm?
This time the table seems stuck. The value 162 is inside the class 160 ≤ h < 165. Some of those 24 students are shorter than 162 cm and some are taller. The table has thrown away the individual heights, so it cannot tell you how many.
This lecture builds one picture that answers that question for every value at once, including values inside a class. The idea is simple, but two details decide whether it works. Most mistakes in this topic come from those two details, so we will give each of them a reason.
A running total
Start with the questions the table can answer. How many students are shorter than 155 cm? Shorter than 160 cm? Shorter than 165 cm? Each answer is the previous answer plus the next class:
- Shorter than 155 cm: 5
- Shorter than 160 cm: 5 + 12 = 17
- Shorter than 165 cm: 17 + 24 = 41
- Shorter than 170 cm: 41 + 21 = 62
- Shorter than 175 cm: 62 + 13 = 75
- Shorter than 180 cm: 75 + 5 = 80
These numbers are a running total. Each one adds the next class to everything before it. Statisticians call a running total of frequencies the cumulative frequency. "Cumulative" means "building up", as snow builds up on the ground.
Look at the last running total, 80. That is every student. The last cumulative frequency must always equal the total number of values. If it does not, there is an adding mistake somewhere. This is a free check, so use it every time.
Where each running total belongs
Here is the first detail. Each running total belongs to one height, and you need to know which one.
Take the 17. Which statement is true: "17 students are shorter than 155 cm", "17 students are shorter than 157.5 cm" or "17 students are shorter than 160 cm"?
Only the last one. The 17 includes all 12 students in the class 155 ≤ h < 160. Every one of those 12 is shorter than 160 cm, because 160 is the top of their class. But we do not know whether they are shorter than 157.5 cm. Some may be 159 cm tall. So the running total is a true fact only at the upper boundary of the class, the value where the class ends.
There is one more true fact that the table hides. How many students are shorter than 150 cm? None. The lowest class starts at 150, so nobody is below it. That gives the starting point: a cumulative frequency of 0 at the lowest boundary.
So the table gives us seven exact facts, written as points (height, cumulative frequency):
Rahul plots each running total at the middle of its class. His second point is (157.5, 17). What does this point claim? Is the claim true? What happens to every reading he takes from his graph?
Show the answer
The point claims that 17 students are shorter than 157.5 cm. We cannot know that. We only know that between 5 and 17 students are shorter than 157.5 cm, because some of the 12 in that class may be taller than 157.5 cm.
Every one of Rahul's points sits 2.5 cm to the left of where it belongs. So his whole curve is shifted left by 2.5 cm, and every count he reads off is too big. Midpoints are right for estimating a mean. They are wrong here, because cumulative frequency counts everything up to a value.
Joining the points
Now draw a graph. Put the measurement, height, along the bottom. Put cumulative frequency up the side, from 0 to the total, 80. Plot the seven points and join them.
Here is the second detail. The seven dots are exact. Everything between them is a guess about how the students are spread inside each class. You make that guess when you choose how to join the dots.
- Straight lines assume the students in each class are spread evenly across it. For example, 12 students between 155 and 160 cm would mean about 2.4 students for every centimetre.
- A smooth curve assumes the spread changes gradually from one class to the next, with no sudden jumps at the boundaries.
Most textbooks ask for a smooth curve through the points, and that is what this course draws. Some courses also accept straight lines. Both are honest estimates, and they usually give answers within a student or two of each other. What matters is that you know the dots are exact and the joins are estimates.
The graph has a name. It is the cumulative frequency curve. Some books also call it an ogive (said "OH-jive").
The cumulative frequency at a value is the number of data values less than it.
For a grouped table, plot each running total at the upper boundary of its class. Start at (lowest boundary, 0). The last point is (highest boundary, total). Join the points with a smooth curve.
Reading the curve
Now return to the question from the start: how many students are shorter than 162 cm? Go to 162 on the height axis. Go straight up to the curve. Then go across to the cumulative frequency axis and read the number. Try it below with any height you like.
Choose a height. The dashed path goes up to the curve and across to the count. Compare a height on a boundary, such as 160, with a height inside a class, such as 162. The thin dashed line shows the straight-line join for comparison.
Presets:
The table shows readings from the heights curve. On a class boundary the count is exact. Inside a class it is an estimate, and the smooth curve and straight lines differ a little.
| Height (cm) | Smooth curve | Straight lines |
|---|---|---|
| 158 | ≈ 11.1 | ≈ 12.2 |
| 160 | 17 (exact) | 17 (exact) |
| 162 | ≈ 25.6 | ≈ 26.6 |
| 168 | ≈ 54.4 | ≈ 53.6 |
| 177.5 | ≈ 78.3 | ≈ 77.5 |
At 162 cm, the smooth curve gives about 26 students and the straight lines give about 27. At 160 cm the two agree exactly, because 160 is a plotted point. That is it. That is the whole idea: every point on the curve answers one question of the form "how many are less than this?"
One more question follows at once. How many students are 162 cm or taller? The curve counts the students below a value, so subtract from the total: about 80 − 26 = 54.
What the shape tells you
Look again at the heights curve. It is flat near 150 cm, steep in the middle and flat again near 180 cm. Why that shape?
Over each class, the curve rises by exactly that class's frequency. Between 160 and 165 cm, it rises from 17 to 41, a rise of 24. Between 175 and 180 cm, it rises from 75 to 80, a rise of only 5. All the classes have the same width. So the class with the most students gives the steepest climb.
This means the steepness of a cumulative frequency curve shows where the data are crowded. Steep means many values close together. Flat means few values. Many sets of data, like these heights, are crowded in the middle and thin at both ends. That is why their curves look like a stretched letter S.
Two more facts follow from the running total. First, the curve can never go down, because adding a frequency can never make a total smaller. Second, it can be completely flat. A flat piece means an empty class, with no values in it at all. Use the next activity to test whether you can read the shape.
This is the cumulative frequency curve of the test marks of 120 students (invented data). The classes are 0–20, 20–40, 40–60, 60–80 and 80–100. Which class has the most students? Choose, then see the curve with each class's rise marked.
The curve rises by 10, 22, 30, 41 and 17 over the five classes. The steepest part, from 60 to 80, has the most students: 41. The curve is highest at 100, but only 17 students are in the last class.
The height of the curve is everything so far. Only the rise over a class belongs to that class. So the curve and the table carry the same information: you can always get the frequencies back by subtracting neighbouring running totals.
Reading the curve backwards
You can also start from a count and find a value. Go across from the count to the curve, then down to the measurement axis. Reading backwards is how the next lecture finds the middle value and the quarter points of a data set. The worked examples below practise both directions.
A coffee shop records the waiting times of 60 customers.
| Waiting time, t (minutes) | Frequency | Cumulative frequency |
|---|---|---|
| 0 ≤ t < 2 | 8 | 8 |
| 2 ≤ t < 4 | 15 | 23 |
| 4 ≤ t < 6 | 19 | 42 |
| 6 ≤ t < 8 | 12 | 54 |
| 8 ≤ t < 10 | 6 | 60 |
Check the total. The last running total is 60, the number of customers. ✓
Points. Upper boundaries, with the starting point: (0, 0), (2, 8), (4, 23), (6, 42), (8, 54), (10, 60).
Question. About how many customers waited less than 5 minutes? About how many waited 5 minutes or more?
Read. From 5 on the time axis, go up to the curve and across. The reading is about 33 (the dashed path in the figure). So about 33 customers waited less than 5 minutes, and about 60 − 33 = 27 waited 5 minutes or more.
Check. 5 minutes is between the points (4, 23) and (6, 42), so the answer must be between 23 and 42. Halfway along by straight lines gives 32.5. The curve's 33 is close to that. ✓
Question. The manager says: "Only 15 customers waited longer than our target time." Estimate the target time.
Turn it into a "less than" question. If 15 waited longer, then 60 − 15 = 45 waited less. So find the time with a cumulative frequency of 45.
Read. From 45 on the cumulative frequency axis, go across to the curve and down. The reading is about 6.4 minutes (the dotted path). By straight lines, 45 is a quarter of the way from 42 to 54, which gives 6 + ¼ × 2 = 6.5 minutes.
Answer. The target time is about 6.4 minutes.
Check. 45 is between 42 (at 6 minutes) and 54 (at 8 minutes), so the time must be between 6 and 8 minutes, and close to 6. ✓
Forty students take a test marked out of 50. Every mark is a whole number, and the lowest mark is 1.
| Mark | Frequency | Cumulative frequency |
|---|---|---|
| 1–10 | 3 | 3 |
| 11–20 | 7 | 10 |
| 21–30 | 12 | 22 |
| 31–40 | 11 | 33 |
| 41–50 | 7 | 40 |
Where does the class 1–10 end? Not at 10, and not at 11. A mark of 10 is in this class and a mark of 11 is not. The boundary sits halfway between them, at 10.5. In the same way, the boundaries are 0.5, 10.5, 20.5, 30.5, 40.5 and 50.5.
Points. (0.5, 0), (10.5, 3), (20.5, 10), (30.5, 22), (40.5, 33), (50.5, 40).
Question. The pass mark is 25. About how many students passed?
Think first. "Passed" means a mark of 25 or more. The curve counts values below a number. "Below 25" for whole numbers means 24 or less, so read the curve at the boundary 24.5.
Read. At 24.5 the curve gives about 14 (14.4 on an accurate drawing; 14.8 by straight lines). So about 14 students failed, and about 40 − 14 = 26 passed.
Check. 24.5 lies between 20.5 and 30.5, so the number below it must be between 10 and 22. ✓ With straight lines you get 15 failed and 25 passed; either answer is a fair estimate.
Question. Using the heights curve, estimate how many of the 80 students are between 158 cm and 172 cm tall. What percentage is that?
Think first. The curve counts students below a value. The students between 158 and 172 cm are those below 172 cm, minus those below 158 cm.
Read twice. At 172 cm the curve gives about 68. At 158 cm it gives about 11.
Subtract. 68 − 11 = 57. As a percentage: .
Answer. About 57 students, about 71% of the group.
Check. Straight lines give 67.2 − 12.2 = 55. The two methods differ by 2, because both readings are inside classes and both are estimates. An answer of 55 to 57 is reasonable. ✓
A running total counts every value up to the end of a class. So it belongs at the upper boundary. Plotting at the midpoint shifts the whole curve left, and every count you read off is too big.
The curve must start at (lowest boundary, 0), because nothing is below the lowest class. Without it, the curve begins in the air at the first running total, and you cannot read anything in the first class.
The curve always gives the number below a value. For "more than" or "at least", read the curve and subtract from the total. If your curve ever goes down, or its last point is not the total, you have made an adding mistake.
Work each one on paper first. Open a hint only when you are stuck.
-
The masses of 50 apples are grouped as follows: 100 ≤ m < 120: 4; 120 ≤ m < 140: 9; 140 ≤ m < 160: 17; 160 ≤ m < 180: 13; 180 ≤ m < 200: 7 (masses in grams). Write the cumulative frequency table and the points you would plot. How many apples have a mass of at least 160 g?
Hint 1
Keep a running total, and write each one beside the upper boundary of its class.
Hint 2
160 is a boundary, so the count below it is exact. Then subtract from 50.
Full answer
Running totals: 4, 13, 30, 43, 50. Points: (100, 0), (120, 4), (140, 13), (160, 30), (180, 43), (200, 50).
Exactly 30 apples are lighter than 160 g, so exactly 50 − 30 = 20 apples have a mass of at least 160 g. No reading from a curve is needed, because 160 is a plotted point.
Check: the last total is 50, the number of apples. ✓
-
Forty students recorded their journey times to school (t minutes). The running totals are: less than 10: 6; less than 20: 15; less than 30: 31; less than 40: 37; less than 50: 40. Estimate how many students take less than 25 minutes, and how many take 25 minutes or more.
Hint 1
25 lies between the points (20, 15) and (30, 31).
Hint 2
With a straight line, 25 is halfway along, so take 15 plus half of the class's 16 students.
Full answer
Straight lines: . A smooth curve gives almost the same (about 23.3). So about 23 students take less than 25 minutes, and about 40 − 23 = 17 take 25 minutes or more.
Check: the answer is between 15 and 31. ✓
-
The running totals for the heights of 30 plants (h cm) are: less than 10: 2; less than 20: 9; less than 30: 9; less than 40: 21; less than 50: 30. Mei says the table must be wrong, because two running totals are the same. Is she right? Find the frequency of each class. Which class has the most plants, and what does the curve look like there?
Hint 1
A class's frequency is the rise over that class: subtract neighbouring running totals.
Hint 2
The class 20 ≤ h < 30 has 9 − 9 plants.
Full answer
Frequencies: 2, 7, 0, 12, 9. They add up to 30. ✓
Mei is not right. Two equal running totals mean an empty class: no plant is between 20 and 30 cm. The curve is flat from 20 to 30. A running total can stay the same, but it can never go down.
The class 30 ≤ h < 40 has the most plants, 12. The curve is steepest there, climbing from 9 to 21. A smooth curve should stay flat across the empty class, not bulge above or below it.
-
A company tests 200 phone batteries (life L hours). Running totals: less than 14: 0; less than 16: 8; less than 18: 22; less than 20: 50; less than 22: 118; less than 24: 176; less than 26: 200. An advert says: "At least 90% of our batteries last 20 hours or more." Is the claim true? Then estimate the battery life that 90% of batteries do reach.
Hint 1
20 hours is a class boundary. What percentage of batteries last less than 20 hours?
Hint 2
"90% reach it" means only 10% fall below it. Find the life with a cumulative frequency of 10% of 200.
Full answer
Exactly 50 batteries last less than 20 hours. That is . So only 75% last 20 hours or more. The claim is false, and no estimate is needed, because 20 is a plotted point.
10% of 200 is 20 batteries. Read backwards from 20: it lies between (16, 8) and (18, 22). By straight lines, hours. A smooth curve gives about 17.8 hours.
So the honest claim is: "About 90% of our batteries last at least 17.5 hours."
Check: the answer is between 16 and 18, closer to 18, because 20 is closer to 22 than to 8. ✓
The name "ogive" comes from Francis Galton. In 1875 he described the curve in a paper on what he called "statistics by intercomparison" (Philosophical Magazine). He said its shape was what architects call an ogive, a pointed arch. Galton drew it on its side compared with ours: he put the measurement up the side and the counts along the bottom. It is the same curve, turned.
Galton's reason for drawing it was the one you will meet next. Read backwards, the curve tells you the value below which half the group lies, or a quarter, or a tenth. Doctors use exactly this idea today. When a child's height is said to be "on the 75th percentile", it means about 75% of children of that age are shorter. That is a reading from a cumulative frequency curve, built from very large groups of children. Later, in probability, the same running-total curve returns as the cumulative distribution. For the normal distribution, it has exactly the S-shape you saw here.
- Cumulative frequency is a running total: the number of data values less than a given value.
- Each running total is plotted at the upper boundary of its class, because only there is it exactly true.
- The curve starts at (lowest boundary, 0) and ends at (highest boundary, total), and the last total is a check on your adding.
- The plotted points are exact facts, while the curve between them is an estimate of how values are spread inside each class.
- The rise of the curve over a class is that class's frequency, so the steepest part shows where the data are crowded.
- For "more than" questions, read the curve and subtract from the total; for "between" questions, subtract two readings.