Statistics · Representations of Data · Year 1

Cumulative Frequency

A running total of frequency, plotted as one rising curve, turns a grouped frequency table into a tool for reading off any quartile or percentile you like.

9 min read 4 worked examples

Building a cumulative frequency table

For grouped data, exact values of the median or quartiles usually can't be calculated directly, since the individual data values within each class aren't known. A cumulative frequency table is the first step toward estimating them: it records, for each class, the running total of frequencies up to and including that class.

Drawing a cumulative frequency diagram

A cumulative frequency diagram plots each cumulative frequency against the upper class boundary of its class — never the midpoint — since the running total represents how many values have been reached by that boundary. The points are joined, usually with a smooth curve, starting from a cumulative frequency of $0$ at the lower boundary of the first class.

Upper boundary, not midpoint

This is the single most common cumulative-frequency drawing error. A histogram plots at the midpoint; a cumulative frequency diagram plots at the upper class boundary. Mixing the two conventions up shifts every point in the wrong direction.

Reading the median, quartiles and percentiles from the diagram

Because a cumulative frequency diagram is increasing, running from $0$ up to the total frequency $n$, it makes it easy to estimate any position in the data: find the required cumulative frequency on the vertical axis, trace across to the curve, then down to the horizontal axis.

Which cumulative frequency to trace from

For $n$ data values, trace from cumulative frequency $\tfrac{n}{4}$ for $Q_1$, $\tfrac{n}{2}$ for the median, $\tfrac{3n}{4}$ for $Q_3$, and $\tfrac{k}{100}n$ for the $k$th percentile.

Every value read from a cumulative frequency diagram is an estimate, not an exact value — the true data within each class is unknown, and the curve itself is only an approximation between the plotted points. Say so explicitly when writing up an answer.

Worked example 1

Building a cumulative frequency table
The times, $t$ minutes, taken by 60 students to complete a puzzle are grouped below. Construct a cumulative frequency table.
Time, $t$ (min)$0\le t<10$$10\le t<20$$20\le t<30$$30\le t<40$$40\le t<50$
Frequency51422136
MethodAdd each frequency to the running total
1
Up to $t=10$: cumulative frequency $=5$.
Just the first class's frequency.
2
Up to $t=20$: $5+14=19$.
Add the second class's frequency.
3
Up to $t=30$: $19+22=41$. Up to $t=40$: $41+13=54$. Up to $t=50$: $54+6=60$.
Keep adding each class's frequency to the running total.
▪ solved
Examiner's eye

The final cumulative frequency should always equal $n$, the total number of data values ($60$ here) — a useful check that no class was missed or added twice.

Worked example 2

Estimating the median and IQR
Using the cumulative frequency table from Worked Example 1 (points at $(10,5)$, $(20,19)$, $(30,41)$, $(40,54)$, $(50,60)$), estimate the median and the interquartile range.
MethodLocate n/4, n/2 and 3n/4, interpolating between the nearest plotted points
1
Median position $=60/2=30$, which lies between $(20,19)$ and $(30,41)$.
Half the total frequency.
2
Median $\approx 20+\dfrac{30-19}{41-19}\times10 = 20+5.0=25$ minutes.
Interpolate between the two nearest points.
3
$Q_1$ position $=15$, between $(10,5)$ and $(20,19)$: $Q_1\approx 10+\dfrac{15-5}{19-5}\times10\approx 17.14$.
Same interpolation technique, different class.
4
$Q_3$ position $=45$, between $(30,41)$ and $(40,54)$: $Q_3\approx 30+\dfrac{45-41}{54-41}\times10\approx 33.08$.
Same technique again.
5
$\text{IQR}\approx 33.08-17.14\approx 15.94$ minutes.
Q₃ minus Q₁.
▪ estimated

Worked example 3

Estimating a percentile
Using the same data, estimate the 80th percentile of the completion times.
MethodLocate 0.8n, then interpolate
1
$P_{80}$ position $=0.8\times60=48$, which lies between $(30,41)$ and $(40,54)$.
80% of the total frequency.
2
$P_{80}\approx 30+\dfrac{48-41}{54-41}\times10\approx 30+5.38\approx 35.38$ minutes.
Interpolate between the two nearest points.
▪ estimated

Worked example 4

Estimating a frequency between two non-boundary values · Challenge
Using the same data, estimate how many students took between 25 and 35 minutes to complete the puzzle.
MethodInterpolate the cumulative frequency at each value, then subtract
1
$t=25$ lies in the class $20\le t<30$ (cumulative $19$ before, $41$ after): $\text{CF}(25)\approx 19+\dfrac{25-20}{10}\times22=19+11=30$.
Interpolate assuming values are evenly spread within the class.
2
$t=35$ lies in the class $30\le t<40$ (cumulative $41$ before, $54$ after): $\text{CF}(35)\approx 41+\dfrac{35-30}{10}\times13=41+6.5=47.5$.
Same technique, different class.
3
Number between $25$ and $35$ minutes $\approx 47.5-30=17.5\approx 18$ students.
Difference of the two interpolated cumulative frequencies, rounded since students are whole people.
▪ estimated
Look deeper

This is the same idea behind reading a histogram's area between two non-boundary values — interpolating the cumulative frequency curve at any $x$-value, not just at class boundaries, lets you estimate a count between any two points, not only ones that happen to line up with the original grouping.

Common mistake

Don't add $1$ to positions like $\tfrac{n}{2}$ or $\tfrac{n}{4}$ when working with continuous, cumulative-frequency-diagram data — that adjustment only applies to the discrete-data quartile rule, not to values read from a curve.

Check yourself

A cumulative frequency diagram for 40 data values passes through $(0,0)$, $(10,6)$, $(20,18)$, $(30,32)$, $(40,40)$. Estimate the median.
(Hint: the median position is $n/2 = 20$ — which two points does it fall between?)

Method
1
Median position $=40/2=20$. This cumulative frequency value lies between the points $(10,6)$ and $(20,18)$.
2
Median $\approx 10+\dfrac{20-6}{18-6}\times10\approx 10+11.67\approx 21.67$.
Interpolate between the two nearest points.
▪ solved