MathemagiciansLibraryExplorationsDeep Dives
← Mathematics · Upper Secondary
MathematicsUpper Secondary

Cumulative frequency — table and curve

U4 — Statistics Advancing › U4.1 — Cumulative Frequency and Box PlotsLecture 1 of 4~2640 words

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 < 1555
155 ≤ h < 16012
160 ≤ h < 16524
165 ≤ h < 17021
170 ≤ h < 17513
175 ≤ h < 1805

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:

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.

Students in each class 5 12 24 21 13 5 150 0 155 5 160 17 165 41 170 62 175 75 180 80 Running total: shorter than this height
Each class sits between two boundaries. A running total counts every student up to the right-hand edge of a class, so it belongs at that edge: 17 students are shorter than 160 cm.

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):

(150, 0), (155, 5), (160, 17), (165, 41), (170, 62), (175, 75), (180, 80)
Stop and think

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.

150 155 160 165 170 175 180 0 20 40 60 80 Height (cm) Cumulative frequency
The cumulative frequency curve for the 80 heights. The seven dots are exact facts from the table. The curve between them is an estimate.

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.

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").

Cumulative frequency

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.

Explore — reading the heights curve

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 curveStraight lines
158≈ 11.1≈ 12.2
16017 (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.

Predict — where are most of the marks?

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.

0 20 40 60 80 100 0 20 40 60 80 100 120 Mark (%) Cumulative frequency
0 20 40 60 80 100 0 20 40 60 80 100 120 Mark (%) Cumulative frequency +10+22+30+41+17

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.

Worked Example 1 — Waiting times, reading forwards

A coffee shop records the waiting times of 60 customers.

Waiting time, t (minutes)FrequencyCumulative frequency
0 ≤ t < 288
2 ≤ t < 41523
4 ≤ t < 61942
6 ≤ t < 81254
8 ≤ t < 10660

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. ✓

0 2 4 6 8 10 0 10 20 30 40 50 60 Waiting time (minutes) Cumulative frequency ≈ 33≈ 6.4
Waiting times of 60 customers. Dashed: from 5 minutes up and across gives about 33. Dotted: from 45 customers across and down gives about 6.4 minutes.
Worked Example 2 — Waiting times, reading backwards

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. ✓

Worked Example 3 — Whole-number marks and the half-way boundary

Forty students take a test marked out of 50. Every mark is a whole number, and the lowest mark is 1.

MarkFrequencyCumulative frequency
1–1033
11–20710
21–301222
31–401133
41–50740

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.

Worked Example 4 — How many between two values?

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. ✓

Trap 1 — Plotting at the midpoint or the lower boundary

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.

Trap 2 — Forgetting the starting point

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.

Trap 3 — Reading "more than" straight off the curve

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.

Try it yourself

Work each one on paper first. Open a hint only when you are stuck.

  1. 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. ✓

  2. 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. ✓

  3. 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.

  4. 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 bigger idea

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.

Key concepts in this lesson