- Foundation
- About 15 min
- 5 practice questions
Building frequency tables: tallies, inclusive classes and class marks
Turn raw data into a frequency table with exclusive classes, convert inclusive classes (10-19, 20-29) into continuous ones, and find class marks, widths, the mean and the median from such a table.
If something looks wrong, please tell us.
All the formulas for grouped data assume a tidy table. In practice you often begin with a raw list of numbers or with classes written in a way that leaves gaps between them. This lesson shows how to build the table from raw data and how to repair classes such as 10-19 and 20-29, so that the median and other formulas give the right answer.
From raw data to a table
Choose class intervals of equal width that cover the smallest and largest values. In exclusive classes such as 0-10, 10-20, a value on the boundary belongs to the upper class: 10 goes to 10-20, and 30 goes to 30-40. Go through the data once, put a tally mark in the right class, and count the tallies. Check that the frequencies add up to the number of observations.
Worked example 1: a tally
Twenty marks: 12, 25, 31, 8, 17, 22, 45, 38, 29, 14, 33, 41, 19, 27, 36, 5, 48, 23, 30, 16. In classes of width 10, the class 0-10 holds 8 and 5 (2 marks); 10-20 holds 12, 17, 14, 19, 16 (5 marks); 20-30 holds 25, 22, 29, 27, 23 (5 marks); 30-40 holds 31, 38, 33, 36, 30 (5 marks, including 30); and 40-50 holds 45, 41, 48 (3 marks). The frequencies 2, 5, 5, 5, 3 add up to 20, the number of marks.
Inclusive classes need correcting
Classes such as 10-19, 20-29, 30-39 leave a gap between 19 and 20. Formulas such as the median need continuous classes with no gaps. The correction is to subtract half the gap from each lower limit and add it to each upper limit. The gap here is 1, so subtract 0.5 and add 0.5: the classes become 9.5-19.5, 19.5-29.5, 29.5-39.5, and so on. The class width is 10, not 9.
Inclusive classes (10-19, 20-29, ...) become continuous by moving each lower limit down by half the gap and each upper limit up by half the gap: 9.5-19.5, 19.5-29.5, ... The class mark is the same either way: (10 + 19)/2 = (9.5 + 19.5)/2 = 14.5.
Worked example 2: the mean and the median of an inclusive table
Classes 10-19, 20-29, 30-39, 40-49, 50-59 have frequencies 5, 9, 14, 8, 4, so N = 40. The class marks are 14.5, 24.5, 34.5, 44.5, 54.5. Then Σfx = 72.5 + 220.5 + 483 + 356 + 218 = 1350, and the mean is 1350/40 = 33.75. For the median, N/2 = 20 and the cumulative frequencies are 5, 14, 28, 36, 40, so the median class is 30-39. Its corrected limits are 29.5-39.5, so l = 29.5, cf = 14, f = 14 and h = 10. Median = 29.5 + ((20 − 14)/14) × 10 = 29.5 + 4.2857 ≈ 33.79. Using the uncorrected l = 30 would give 34.29, a wrong answer.
Open-ended classes
A class such as 'below 10' or '50 and above' has no lower or upper limit, so no class mark. The mean cannot be found from such a table without an assumption, but the median can, provided the median class is not an open one. This is another reason the median is useful.
Common mistakes
- Putting a boundary value in the lower class when the table is exclusive.
- Using 10-19 directly in the median formula with h = 9: the class width is 10.
- Correcting the limits but not the class marks: the class marks stay the same.
- Forgetting to check that the frequencies add up to the number of observations.
Key takeaways: tally into equal-width classes and check the total. Correct inclusive classes by half the gap before using median or quartile formulas. Class marks are the same before and after the correction.
Check your understanding
-
1. What are the corrected limits of the inclusive class 20-29 for integer data?
- 19.5-29.5
- 20-30
- 19-30
- 20-29.5
Show answer
Answer: A. The gap between classes is 1, so subtract 0.5 from the lower limit and add 0.5 to the upper limit: 19.5-29.5.
-
2. What is the class mark of the inclusive class 30-39?
- 35
- 34
- 34.5
- 33.5
Show answer
Answer: C. The class mark is (30 + 39)/2 = 34.5. The corrected limits (29.5 and 39.5) give the same value.
-
3. Classes 10-19 to 50-59 have frequencies 5, 9, 14, 8, 4. What is the mean, using class marks?
- 34.5
- 33.75
- 32.5
- 35.2
Show answer
Answer: B. The marks are 14.5, 24.5, 34.5, 44.5, 54.5, so Σfx = 1350 and the mean is 1350/40 = 33.75.
-
4. For the same table, what is the median (using corrected limits)?
- 34.29
- 35
- 30
- 33.79
Show answer
Answer: D. The median class is 30-39 with corrected limits 29.5-39.5, cf = 14, f = 14, h = 10. Median = 29.5 + (6/14) × 10 ≈ 33.79.
-
5. In exclusive classes 20-30 and 30-40, in which class is the value 30 counted?
- 20-30
- 30-40
- both classes
- neither class
Show answer
Answer: B. With exclusive classes, a boundary value belongs to the upper class, so 30 is counted in 30-40.
Sign in to keep track of the lessons you finish.