Grouped Data and the Estimated Mean

Imagine surveying every person in a town for their height. That is thousands of numbers — far too many to list. So instead you keep a tally in bands: "150–160 cm: 8 people, 160–170 cm: 15 people…". The table is neat and small. But notice what you have thrown away: the exact heights. You know eight people land in the 150–160 band, but not whether they are 151 cm or 159 cm.

So when the data come in groups, you can no longer find the mean exactly. The best you can do is estimate it — and the clever trick is to let each class's midpoint stand in for everyone inside it.

The idea: let the midpoint speak for the class

Sometimes data arrive already sorted into classes — ranges of values — rather than as a list of exact numbers. A survey might record that 7 people are 150160 cm tall and 12 are 160170 cm, without ever writing down a single individual height.

This grouped data hides the exact values, so we cannot find the mean precisely. Instead we estimate it: we treat every value in a class as if it sat at the class midpoint, the value halfway between the lower and upper boundary. The midpoint is our best single stand-in for the whole class.

Then the estimated mean is the familiar frequency-table mean, using midpoints as the values:

\text{estimated mean} = \frac{\sum (\text{midpoint} \times \text{frequency})}{\sum \text{frequency}}

Here is a worked example for heights, in centimetres, grouped into four classes:

Class (cm) Midpoint x Frequency f x \times f
150–16015571085
160–170165121980
170–18017591575
180–1901852370
Total305010

The midpoint columns total \sum (x \times f) = 5010 and the frequencies total \sum f = 30, so the estimated mean is

\frac{5010}{30} = 167 \text{ cm.}

It is an estimate because nobody in the 150160 class is known to be exactly 155 cm — the midpoint is just our even-handed guess for them all.

Finding a midpoint (and where it is NOT)

The midpoint of a class is simply the average of its two boundaries:

\text{midpoint} = \frac{\text{lower boundary} + \text{upper boundary}}{2}

For the class 2030, the midpoint is \tfrac{20 + 30}{2} = 25. Not 20 (that is the lower boundary), and not 10 (that is the class width). Getting this one value right is the whole game — if your midpoint is wrong, every product f \times x is wrong too.

Worked example 2 — the modal class and the median class

The same table can answer two more questions. Here are the times (in minutes) taken by 40 runners to finish a race:

Time (min)Frequency f
20–256
25–3017
30–3511
35–406

Modal class: the class with the highest frequency. Here that is 2530 with 17 runners. Note we name a class, not a single number — with grouped data there is no single "mode".

Median class: the class containing the middle value. With 40 runners the median sits between the 20th and 21st. Counting up: 6 reach the end of the first class, 6+17 = 23 reach the end of the second. The 20th and 21st runners both fall inside that running total of 23, so the median lies in the class 2530.

Worked example 3 — estimating the mean of the race times

Let's take the runners' table and estimate their mean finishing time from start to finish. First add the two working columns: the midpoint x of each class, and the product f \times x.

Time (min) Midpoint x Frequency f f \times x
20–2522.56135
25–3027.517467.5
30–3532.511357.5
35–4037.56225
Total401185

Now sum the last column and divide by the total frequency:

\text{estimated mean} = \frac{\sum (f \times x)}{\sum f} = \frac{1185}{40} = 29.6 \text{ min (to 1 d.p.)}

So the runners took, on average, roughly 29.6 minutes — and reassuringly this lands inside the modal class and median class we already found. Three different "averages", all pointing at the busy 25–30 band.

Three traps that catch people out with grouped data:

This is not a classroom-only trick — it is how the world's biggest data sets are handled. A national census almost never publishes exact incomes; it reports bands ("£20,000–£30,000: 4.1 million households") for both privacy and convenience. Ages come in brackets, survey answers come in ranges. So when an economist quotes "the average household income", they have very often done exactly what you just did: taken the midpoint of each band and computed a weighted average.

In fact it is the same weighted-average idea as an ordinary frequency-table mean — you are still doing \sum fx \div \sum f. The only new ingredient is the honest admission that, because you no longer know the exact values, the answer is an estimate.