Grouped data
Grouping continuous and discrete data into classes, class centres, histograms and polygons for grouped data, and estimating the median from a cumulative frequency polygon.
Measure the heights of thirty students and you may get thirty different numbers. A frequency table with every frequency equal to $1$ shows nothing. Grouping the values into classes reveals the shape of the data, at the cost of losing the exact values.
Classes and class centres
Split the range into classes of equal width. The class centre is the midpoint of the class, and it stands in for every value in that class. The modal class is the class with the highest frequency.
Heights of $30$ students, in cm:
| Height (cm) | 150–155 | 155–160 | 160–165 | 165–170 | 170–175 |
|---|---|---|---|---|---|
| Class centre | 152.5 | 157.5 | 162.5 | 167.5 | 172.5 |
| Frequency | 4 | 6 | 11 | 7 | 2 |
| Cumulative frequency | 4 | 10 | 21 | 28 | 30 |
For the height table, find (a) the modal class (b) an estimate of the probability that a randomly chosen student is taller than $165$ cm.
Discrete data with many values can be grouped too, for example test scores in classes 0–4, 5–9, 10–14. The class centre of 5–9 is $\dfrac{5 + 9}{2} = 7$.
Estimating the median from the polygon
For grouped continuous data, plot each cumulative frequency at the upper boundary of its class, because that is the height up to which it counts. Start at $0$ on the lower boundary of the first class and join the points with straight lines. A straight segment assumes the values in each class are spread evenly across it.
Then draw a horizontal line at $\dfrac{n}{2}$ and read the median estimate off the horizontal axis where it meets the polygon.
Each segment rises by the class frequency across the width of its class. The dashed line is the level you read across from.
Try this: set $k = 15$, half of $30$, and read off the median estimate. Then find the value of $k$ that gives a reading of exactly $165$ cm. What does that number of students tell you?
Estimate the median height without the graph.
Your turn
Travel times to school for $20$ students, in minutes: 0–10, $5$ students; 10–20, $9$; 20–30, $4$; 30–40, $2$. Estimate the median travel time.
Show the working
Cumulative frequencies at the upper boundaries: $5, 14, 18, 20$. Half of $20$ is $10$, which lies in 10–20 (from $5$ to $14$). We need $10 - 5 = 5$ of its $9$ students, so median $\approx 10 + \dfrac59 \times 10 \approx 15.6$ minutes.
Parcel masses (kg) are grouped as 0–2, 2–4, 4–6, 6–8, 8–10, with frequencies $6, 14, 12, 5, 3$. Find the class centre of 4–6.
$\dfrac{4 + 6}{2} = 5$.
The modal class of the parcel data is:
The highest frequency is $14$, in the class 2–4.
A parcel has a mass of exactly $4$ kg. It is counted in:
A value on a boundary goes in the lower class, so 2–4. That way the cumulative frequency at $4$ counts every mass $\le 4$.
How many parcels have a mass of at most $6$ kg?
The cumulative frequency at $6$: $6 + 14 + 12 = 32$.
Find the relative frequency of the class 6–8.
$n = 6 + 14 + 12 + 5 + 3 = 40$, so $\dfrac{5}{40} = 0.125$.
Estimate the probability that a parcel has a mass greater than $4$ kg.
Cumulative frequency at $4$ is $6 + 14 = 20$. So $\dfrac{40 - 20}{40} = 0.5$.
Why is a median found from grouped data only an estimate?
We know how many values are in each class but not where they sit inside it. The straight segments of the polygon assume an even spread.
Test scores are grouped into classes 0–4, 5–9, 10–14, 15–19. Find the class centre of 10–14.
$\dfrac{10 + 14}{2} = 12$.
Exam style: estimate the median mass of the parcels.
$\dfrac{n}{2} = 20$. The cumulative frequencies at the upper boundaries are $6, 20, 32, 37, 40$. The polygon reaches $20$ exactly at the boundary $4$, so the median is approximately $4$ kg.
Exam style: use the cumulative frequency polygon to estimate how many parcels have a mass greater than $5$ kg.
At $4$ kg the cumulative frequency is $20$, and the class 4–6 adds $12$ across $2$ kg. Halfway along, at $5$ kg, the polygon is at $20 + \dfrac12 \times 12 = 26$. So about $40 - 26 = 14$ parcels are heavier than $5$ kg.
Coaching Centre