KCSE 2025 Maths P2 Q10 — Upper Quartile (Q3) of Grouped Data

KCSE 2025 Form 4 Statistics

Published

The Question

“The ages in years of 32 residents at a home for elderly people are grouped into the classes 70 to 74, 75 to 79, 80 to 84, 85 to 89, 90 to 94 and 95 to 99, with numbers of residents 5, 6, 7, 8, 4 and 2 respectively. Calculate the upper quartile (Q3) age of the residents.”

1

Build the cumulative frequency

The quartile depends on how many residents fall up to and including each class, so first form a running total of the frequencies. Add each class frequency to the total so far. The final cumulative frequency must equal 32, which confirms no resident is missed.

5,  11,  18,  26,  30,  325,\; 11,\; 18,\; 26,\; 30,\; 32

5, then 5+6=11, 11+7=18, 18+8=26, 26+4=30, 30+2=32.

2

Find the position of the upper quartile

The upper quartile sits three quarters of the way through the data, so its position is three-quarters of the total number of values. With 32 residents this points to the 24th value in the ordered data.

Position=3n4=3×324=24\text{Position} = \frac{3n}{4} = \frac{3 \times 32}{4} = 24
3

Locate the quartile class

Use the cumulative frequency to see which class the 24th value lands in. The running total reaches 18 by the end of 80 to 84 and jumps to 26 by the end of 85 to 89, so the 24th value falls inside the class 85 to 89. That class carries the quartile.

18<2426    class 858918 < 24 \le 26 \;\Rightarrow\; \text{class } 85\text{–}89
4

Apply the grouped-data quartile formula

Read the values off the quartile class and substitute. L is the lower class boundary, found by dropping half a unit below 85 to give 84.5. The cumulative frequency before the class is 18, the frequency of the class is 8, and the class width is 5. Work out the fraction first, then add it to the lower boundary.

Q3=L+(3n4CFf)CQ_3 = L + \left(\frac{\tfrac{3n}{4} - CF}{f}\right)C
Q3=84.5+(24188)×5Q_3 = 84.5 + \left(\frac{24 - 18}{8}\right) \times 5
Q3=84.5+68×5=84.5+3.75Q_3 = 84.5 + \frac{6}{8} \times 5 = 84.5 + 3.75
Q3=88.25Q_3 = 88.25

Final Result

The upper quartile age is 88.25 years.

Why this method works

Grouped data hides the exact ages inside each class, so the quartile formula assumes the values are spread evenly across the quartile class. The position 3n/4 tells you which value you are chasing; the term (position minus the cumulative frequency before the class) over the class frequency measures how far into that class the value lies, as a fraction. Multiplying that fraction by the class width and adding it to the lower boundary interpolates the age at exactly that point.

The quartile class 85 to 89 runs from boundary 84.5 to 89.5. Our answer 88.25 lies inside that interval and above the median region, which is exactly where a three-quarters value should sit.