Track 2 · Describing Data · Lesson 10 of 11

Grouped data

Estimate the mean, standard deviation and median from a grouped frequency table, and explain why these are approximations.

25 minFoundation7 graded exercisesFree

A government report gives only a table: how many households fall in each income band, how many patients in each age group. The raw values are gone. You can still estimate a mean, a spread and a median — as long as you know what you are assuming and say that the results are approximate.

A grouped frequency table records how many observations fall in each class interval (for example “20 to under 30 minutes”), not the values themselves. Grouping makes large datasets readable and protects privacy, but it throws information away: within a class, we no longer know where the values were.

To calculate anything, we must make an assumption about the values inside each class. The standard one: treat every value as if it sat at the class midpoint, mk=(lower+upper)/2m_k = (\text{lower} + \text{upper})/2. For the median we assume instead that values are spread evenly across their class.

xˉ≈∑kfkmkn,s2≈∑kfk(mk−xˉ)2n−1\bar{x} \approx \frac{\sum_k f_k m_k}{n}, \qquad s^2 \approx \frac{\sum_k f_k (m_k - \bar{x})^2}{n - 1}
Mean and sample variance estimated from grouped data
fkf_k
the frequency (count) of class kk
mkm_k
the midpoint of class kk
nn
the total count, ∑fk\sum f_k
median≈L+n/2−Ff×w\text{median} \approx L + \frac{n/2 - F}{f}\times w
Grouped median by linear interpolation within the median class
LL
the lower boundary of the median class — the first class whose cumulative frequency reaches n/2n/2
FF
the cumulative frequency of all classes before the median class
ff
the frequency of the median class
ww
the width of the median class

Worked example

Waiting times at a pharmacy

Waiting times of 40 customers: 0 to under 10 minutes: 4; 10–20: 11; 20–30: 15; 30–40: 7; 40–60: 3. Estimate the mean and the median.

  1. Midpoints: 5, 15, 25, 35 and 50 (the last class is twice as wide, so its midpoint is 50).

  2. Mean: ∑fm=4(5)+11(15)+15(25)+7(35)+3(50)=20+165+375+245+150=955\sum f m = 4(5) + 11(15) + 15(25) + 7(35) + 3(50) = 20 + 165 + 375 + 245 + 150 = 955, so xˉ≈955/40=23.9\bar{x} \approx 955/40 = 23.9 minutes.

  3. Median class: n/2=20n/2 = 20. Cumulative frequencies are 4, 15, 30, … — the 20th value lies in the 20–30 class, with F=15F = 15 customers before it.

  4. Interpolate: median ≈20+20−1515×10=20+3.33=23.3\approx 20 + \frac{20 - 15}{15} \times 10 = 20 + 3.33 = 23.3 minutes.

  5. Spread: s2≈∑f(m−23.875)2/39=133.96s^2 \approx \sum f(m - 23.875)^2/39 = 133.96, so s≈11.6s \approx 11.6 minutes.

Estimated mean ≈ 23.9 minutes, median ≈ 23.3 minutes, SD ≈ 11.6 minutes — all approximations.

How big is the error? The (synthetic) commute dataset has the exact values, so we can check. Grouped into 20-minute classes (0–20, 20–40, …, 140–160), the 240 commutes give an estimated mean of 37.8 minutes, against an exact mean of 37.3; an estimated median of 33.7 minutes against an exact 31.5; and an estimated SD of 24.7 against 23.8. Close — but not the same.

Quick check

From a grouped table of 200 employees' ages, which of these can be found exactly?

Exercises

The lesson is complete when every exercise is answered correctly. Hints are free; viewing a worked solution before solving means the exercise won't count towards mastery.

0 of 7 exercises correct (not saved — sign in to keep your progress)

Exercise 1 · Guided, difficulty 1 of 3

Estimate a mean from a grouped table

Not started

A health screening recorded the ages of its participants:

Age (years)Frequency
20 to under 308
30 to under 4011
40 to under 5014
50 to under 6014
60 to under 709
70 to under 803
Total59

Estimate the mean age, to 2 decimal places.

years

Exercise 2 · Practice, difficulty 2 of 3

Estimate a standard deviation

Not started

An IT service desk grouped the time to resolve 50 tickets:

Resolution time (hours)Frequency
0 to under 46
4 to under 87
8 to under 1212
12 to under 1613
16 to under 209
20 to under 243
Total50

Estimate the sample standard deviation of the resolution time, to 2 decimal places.

hours

Exercise 3 · Practice, difficulty 2 of 3

Grouped median

Not started

A courier company grouped the distances (km) of its same-day deliveries in one district:

Distance (km)Frequency
0 to under 26
2 to under 414
4 to under 623
6 to under 817
8 to under 1017
10 to under 123
Total80

Estimate the median distance by interpolation, to 2 decimal places.

km

Exercise 4 · Application, difficulty 2 of 3

How good is the grouped estimate?

Not started

Group commute_min from the commute dataset into the classes 0 to under 20, 20 to under 40, …, 140 to under 160 minutes. Estimate the mean from the grouped table, then calculate the exact mean from the raw values. Give both to 2 decimal places.

Data: commute · Open in the lab to explore and calculate.

Exercise 5 · Practice, difficulty 1 of 3

Exact or estimated?

Not started

A grouped table gives the number of households in each monthly income band (with closed bands only). Sort each quantity by what the table allows.

The total number of households
The percentage of households below a band boundary
The mean income
The median income
The single highest household income
The modal class (the band with the most households, when bands have equal widths)

Exercise 6 · Interpretation, difficulty 2 of 3

An open-ended top class

Not started

An income table ends with the band “50 000 SAR or more”, which contains 4% of households. An analyst needs a typical income. What is the best approach?

Choose one

Exercise 7 · Practice, difficulty 1 of 3

Steps for a grouped median

Not started

Put the steps for estimating a median from a grouped frequency table in order.

Put the steps in order (use the arrows)

  1. 1Compute the cumulative frequencies
  2. 2Calculate L+n/2−Ff×wL + \frac{n/2 - F}{f} \times w
  3. 3Find the median class: the first class whose cumulative frequency reaches n/2n/2
  4. 4Note LL, FF (cumulative frequency before the class), ff and the class width ww
  5. 5Add up the frequencies to get nn and compute n/2n/2

What you can now do

  • Estimate the mean and standard deviation from a grouped table using class midpoints
  • Estimate the median by interpolating within the median class
  • State which results are exact, estimated or impossible from grouped data
  • Explain why grouped estimates can be biased for skewed data and open-ended classes