Topic contents

Lesson 1

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

Class discussion: to introduce these scores to the class, would you read out all 40 numbers or first divide the scores into classes?

Data organized into classes

Class intervalFrequency fRelative frequency f / n
12.5%
820.0%
1435.0%
1230.0%
512.5%
Total40100.0%
Grouping data into classes means organizing population (or sample) units by a characteristic of each unit or by a variable into categories or numerical class intervals. A frequency distribution shows the number of observations in each class and how these counts are distributed.
Classes should be mutually exclusive and exhaustive: an observation can belong to only one class, and every observation must belong to a class.

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
R=xmax⁡−xmin⁡=97−57=40R=x_{\max}-x_{\min}=97-57=40

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.

0510155060708090100Class interval
Class intervals (include the lower limit, exclude the upper limit; all observations are included)
When you change the class width from 5 to 20, which details remain and which are combined?
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).

pi=fin,Fi=∑j=1ifjp_i=\frac{f_i}{n},\qquad F_i=\sum_{j=1}^{i}f_j
For any class: less-than cumulative frequency + at-least cumulative frequency − this class's frequency = n. Both directions include the current class.
Drag "Class width" or "Starting class boundary" and release to update the frequency table. Counts may stay the same if no observations cross a boundary as it moves. Click a table row to highlight its class.
Class intervalFrequency fRelative frequency f / nLess-than cumulative frequencyLess-than cumulative relative frequencyAt-least cumulative frequencyAt-least cumulative relative frequency
12.5%12.5%40100.0%
820.0%922.5%3997.5%
1435.0%2357.5%3177.5%
1230.0%3587.5%1742.5%
512.5%40100.0%512.5%
Total40100.0%————
0510155060708090100Class interval
Class intervals (include the lower limit, exclude the upper limit; all observations are included)
Class discussion: if 80 is exactly a class boundary, for scores "below 80 points," look up the less-than cumulative relative frequency for the class whose upper limit is 80; for scores "at or above 80 points," look up the at-least cumulative relative frequency starting with the class whose lower limit is 80.

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

The frequency distribution changes with class width and starting boundary, but the raw data remain the same. Pay attention to class widths and boundaries when reading a graph.
01020304050–60 · Cumulative frequency: 150–6060–70 · Cumulative frequency: 960–7070–80 · Cumulative frequency: 2370–8080–90 · Cumulative frequency: 3580–9090–100 · Cumulative frequency: 4090–100
Class intervals (include the lower limit, exclude the upper limit; all observations are included)

Quick check: which statement about grouping data into classes is correct?