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.
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.
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.
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
| Time, $t$ (min) | $0\le t<10$ | $10\le t<20$ | $20\le t<30$ | $30\le t<40$ | $40\le t<50$ |
|---|---|---|---|---|---|
| Frequency | 5 | 14 | 22 | 13 | 6 |
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
Worked example 3
Worked example 4
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.
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?)