Lesson 13: Frequency and Histograms (频数与直方图)CN 2022
Data grouping (数据分组) is the first step of statistics: raw numbers are hard to read, but grouped into intervals they show their shape at a glance. A frequency table (频数表) counts how many values fall in each group, and a histogram (直方图) draws those counts as bars. This lesson is about choosing good groups and reading what the picture says.
- Data (数据) — Values collected by observation or measurement.
- Frequency (频数) — The number of values falling in a group or category.
- Group (组) — An interval of values, such as 10–19, used to organise data.
- Class width (组距) — The size of each group interval.
- Histogram (频数直方图) — A bar chart of frequencies, with bars touching and the horizontal axis showing the groups.
- Relative frequency (相对频数) — A group’s frequency divided by the total number of values.
- Range (极差) — The difference between the largest and smallest values.
The key ideas
To group data, first find the range: the largest value minus the smallest. Then choose the number of groups, usually between 5 and 10, and divide the range by that number to get the class width, rounding up to a convenient number. Groups must cover every value exactly once, with no gaps and no overlaps: for continuous data the groups are written as 10–20, 20–30, with each value belonging to the group that starts at its value. For discrete data such as test scores, groups like 0–9, 10–19 are clearer, because a score of 10 belongs to the second group, not the first.
A histogram draws one bar per group, with the bar’s height equal to the frequency and the bars touching each other, because the groups are continuous along the axis. This is the difference from a bar chart of categories, where the bars are separated. The shape of the histogram tells the story: a symmetric hump means the values cluster in the middle, a tail to the right means a few large values stretch the data out, and two humps suggest two different groups mixed together. Always look at the shape before computing any averages.
Relative frequency turns counts into proportions: divide each frequency by the total. If 12 out of 40 students scored in the group 70–79, the relative frequency is 12/40 = 0.3, or 30 percent. Relative frequencies add to 1 (or 100 percent), and they let you compare two data sets of different sizes. A frequency polygon joins the midpoints of the tops of the histogram bars, which makes it easy to overlay two distributions and compare their shapes directly.
Worked example 1 — building a frequency table
The test scores of 20 students are: 45, 52, 61, 58, 73, 67, 82, 77, 69, 55, 48, 63, 71, 80, 66, 59, 74, 62, 78, 70. Group them with class width 10, starting at 40. The groups are 40–49, 50–59, 60–69, 70–79 and 80–89. Counting: 40–49 has 45 and 48, so frequency 2; 50–59 has 52, 58, 55, 59, so 4; 60–69 has 61, 67, 69, 63, 66, 62, so 6; 70–79 has 73, 77, 71, 74, 78, 70, so 6; 80–89 has 82 and 80, so 2. The frequencies add to 2 + 4 + 6 + 6 + 2 = 20, matching the number of students. The histogram is symmetric, with most scores in the middle groups.
Worked example 2 — reading a histogram
A histogram of the heights of 50 students has groups 150–159 cm (frequency 8), 160–169 cm (frequency 22), 170–179 cm (frequency 15) and 180–189 cm (frequency 5). What proportion of students are at least 170 cm tall? The frequencies for 170 and above are 15 + 5 = 20, out of 50 students, so the proportion is 20/50 = 0.4, or 40 percent. The tallest group is the smallest, and the modal group — the one with the highest bar — is 160–169 cm. The shape is slightly right-tailed: most students are in the middle, with a few taller ones stretching to the right.
A deeper look — choosing the class width
The class width changes what you see. With only 2 groups, the histogram is a blunt summary that hides all the detail; with 20 groups, most bars have frequency 1 or 0 and the shape disappears into noise. A good rule is to aim for 5 to 10 groups, and to choose round widths like 5 or 10. If the data has an outlier — one value far from the rest — a single wide group at the end can hide it, so it is often better to note the outlier separately and group the rest. The choice of groups is a judgement, not a formula, and a good statistician tries two widths and compares the pictures.
Common mistakes
- Leaving gaps or overlaps between groups. Every value must fall in exactly one group.
- Drawing a histogram with separated bars. Histogram bars touch; separated bars belong to a bar chart of categories.
- Using the frequency instead of the relative frequency when comparing data sets of different sizes.
- Forgetting to check that the frequencies add to the total number of values.
Discussion questions
- A class of 30 students has test scores from 35 to 95. How many groups would you choose, and what class width? What changes if the class has 300 students?
- Two histograms show the same data, one with 4 groups and one with 12. Which shows the shape better, and what does each one hide?
- A histogram of incomes in a town has a long tail to the right. What does that say about the town, and which average — the mean or the median — would be larger?
Practice questions
- Data range from 12 to 47. With 5 groups, what class width should you use? Answer: 7. Explanation: Range 35; 35/5 = 7.
- A group has frequency 15 out of 60 values. What is its relative frequency? Answer: 0.25. Explanation: 15/60 = 1/4 = 0.25.
- In a histogram, which group is the modal group? Answer: The group with the tallest bar. Explanation: The modal group has the highest frequency.
- Frequencies 3, 7, 10, 5 add to what total? Answer: 25. Explanation: 3 + 7 + 10 + 5 = 25.
- Why do histogram bars touch each other? Answer: Because the groups are continuous intervals along the axis. Explanation: The groups join end to end with no gaps.
✅ Check your understanding
Quick recall check, generated from this lesson’s key terms. It is practice only and is not graded.