Frequency distributions and grouping data into classes
Organize a series of raw observations into a frequency table step by step; adjust class width to understand how different groupings affect the display.
Why group data into classes?
Below are the scores of 40 students on an exam (illustrative teaching data). Looking at 40 numbers alone makes it hard to see quickly where most scores lie.
Raw scores
57 · 61 · 62 · 63 · 65 · 66 · 67 · 68 · 69 · 70 · 71 · 72 · 72 · 73 · 74 · 74 · 75 · 75 · 76 · 77 · 78 · 78 · 79 · 80 · 80 · 81 · 82 · 83 · 84 · 84 · 85 · 86 · 87 · 88 · 89 · 90 · 91 · 93 · 95 · 97
Data organized into classes
| Class interval | Frequency f | Relative frequency f / n |
|---|---|---|
| 1 | 2.5% | |
| 8 | 20.0% | |
| 14 | 35.0% | |
| 12 | 30.0% | |
| 5 | 12.5% | |
| Total | 40 | 100.0% |
How do we choose the number of classes and class width?
Numerical data are often grouped into adjacent intervals. First determine the range of values, then choose a suitable class width and starting class boundary.
- Sample size n
- 40
- Number of classes k
- 5
- Highest-frequency class (14 students)
- 70–80
The range R gives the span of the data. Choose the number and width of classes by considering sample size, data precision, and the purpose of the display together. The intervals here are continuous and use left-closed, right-open boundaries: include the lower limit and exclude the upper limit.
This chart helps explain grouping. The next lesson explores when to use histograms and how to interpret them.
Frequency, relative frequency, and both cumulative directions
Frequency f: the number of observations in a class; Relative frequency f/n: a class's frequency as a proportion of the total sample size.
Less-than cumulative summaries: add upward from the lowest class to count students with scores below this class's upper limit and calculate their proportion (including this class).
At-least cumulative summaries: add downward from the highest class to count students with scores at or above this class's lower limit and calculate their proportion (including this class).
| Class interval | Frequency f | Relative frequency f / n | Less-than cumulative frequency | Less-than cumulative relative frequency | At-least cumulative frequency | At-least cumulative relative frequency |
|---|---|---|---|---|---|---|
| 1 | 2.5% | 1 | 2.5% | 40 | 100.0% | |
| 8 | 20.0% | 9 | 22.5% | 39 | 97.5% | |
| 14 | 35.0% | 23 | 57.5% | 31 | 77.5% | |
| 12 | 30.0% | 35 | 87.5% | 17 | 42.5% | |
| 5 | 12.5% | 40 | 100.0% | 5 | 12.5% | |
| Total | 40 | 100.0% | — | — | — | — |
How should we interpret grouped results?
Statistical interpretation of a grouping
- Sample size n
- 40
- Number of classes k
- 5
- Highest-frequency class (14 students)
- 70–80
The sample mean score of these 40 students is 77.42 points; the grouped table shows counts and proportions in each score interval, without retaining every exact score.
Cumulative frequencies and cumulative relative frequencies answer questions such as "How many students are below a given boundary?"
Compare grouping methods
Quick check: which statement about grouping data into classes is correct?