Cumulative frequency graphs let you estimate the median, quartiles and other values for grouped data, and histograms show grouped data when the class widths are unequal. This note covers drawing and reading both, and drawing box plots from the results. It is used to compare large data sets such as test scores, journey times or wages.
Key ideas
Cumulative frequency is a running total of the frequencies. It tells you how many values are less than or equal to the upper end of each class.
- Make a table with a cumulative frequency column. The last entry equals the total frequency \(n\).
- Plot each cumulative frequency against the upper class boundary, not the midpoint. For the first class, there are 0 values below the lower boundary of the class, so you can plot a starting point of 0 there.
- Join the points with a smooth curve (or straight lines if the question says so). The curve rises in an S shape.
Reading the graph. Because the data are grouped, readings are estimates.
- Median: the value at cumulative frequency \(\tfrac12 n\).
- Lower quartile \(Q_1\): the value at \(\tfrac14 n\). Upper quartile \(Q_3\): the value at \(\tfrac34 n\).
- Interquartile range \(=Q_3-Q_1\).
- Percentiles: the 90th percentile is the value at \(\tfrac{90}{100}n\).
- To find how many values are below some number \(x\), go up from \(x\) to the curve, then across to the cumulative frequency axis. For the number above \(x\), subtract that reading from \(n\).
Draw the lines on your graph so that your reading is clear, and give a value to a sensible accuracy.
Box plots. A box plot uses five values: the smallest, \(Q_1\), the median, \(Q_3\) and the largest. Draw a number line, a box from \(Q_1\) to \(Q_3\) with a line at the median, and whiskers to the smallest and largest values. To compare two data sets, compare a measure of average (the median) and a measure of spread (the IQR or the range).
Histograms. A histogram looks like a bar chart but there are no gaps, and the bars can have different widths. The area of each bar represents the frequency. So the vertical axis shows the frequency density:
\[\text{frequency density}=\frac{\text{frequency}}{\text{class width}}\qquad\text{frequency}=\text{frequency density}\times\text{class width}\]
- To draw a histogram: work out the class width and the frequency density for each class. Draw a bar for each class from its lower to its upper boundary, with height equal to the frequency density.
- To read one: multiply the height of each bar by its width to get the frequency of that class.
- To estimate a frequency for part of a class, assume the data are spread evenly across the class. Then find the frequency density \(\times\) the width of the part you want.
If the class widths are all equal, the frequency density is proportional to the frequency, but you still label the axis as frequency density.
Definitions and formulae
| Term or formula | Meaning / when to use |
|---|---|
| Cumulative frequency | Running total of frequencies. Plot against upper class boundaries |
| Median, \(Q_1\), \(Q_3\) positions | At \(\tfrac12n\), \(\tfrac14n\), \(\tfrac34n\) on the cumulative frequency axis |
| \(IQR=Q_3-Q_1\) | Spread of the middle half of the data |
| Frequency density \(=\dfrac{\text{frequency}}{\text{class width}}\) | Height of a bar in a histogram |
| Frequency \(=\) frequency density \(\times\) class width | Reading a histogram. Area of a bar is the frequency |
| Box plot | Displays smallest value, \(Q_1\), median, \(Q_3\) and largest value |
Worked examples
Example 1 The times, \(t\) minutes, of 60 runners in a 5 km race are: \(20\lt t\le25\): 6, \(25\lt t\le30\): 15, \(30\lt t\le35\): 20, \(35\lt t\le40\): 12, \(40\lt t\le45\): 7. Make a cumulative frequency table and estimate the median, the interquartile range and the number of runners who took more than 38 minutes.
Cumulative frequencies: 6, 21, 41, 53, 60, plotted against 25, 30, 35, 40, 45 (with the point \((20,0)\) at the start).
Median: \(\tfrac12\times60=30\)th value. It is in the class \(30\lt t\le35\). It is the 9th of the 20 runners in that class, so a straight-line estimate gives \(30+\tfrac{9}{20}\times5=32.25\).
\(Q_1\): the \(15\)th value, in the class \(25\lt t\le30\). \(25+\tfrac{15-6}{15}\times5=28\).
\(Q_3\): the \(45\)th value, in the class \(35\lt t\le40\). \(35+\tfrac{45-41}{12}\times5=36.67\).
\(IQR=36.67-28=8.67\).
At \(t=38\) the cumulative frequency is about \(41+\tfrac{3}{5}\times12=48.2\), so about \(60-48.2=11.8\) runners took more than 38 minutes.
Answer: median about 32.3 minutes, IQR about 8.67 minutes, about 12 runners. (Readings from your own smooth curve may differ slightly.)
Example 2 The lengths of 80 phone calls, \(t\) minutes, are: \(0\lt t\le2\): 10, \(2\lt t\le5\): 24, \(5\lt t\le10\): 30, \(10\lt t\le20\): 16. Find the frequency densities for a histogram and estimate how many calls lasted between 6 and 12 minutes.
Class widths: 2, 3, 5, 10.
Frequency densities: \(10\div2=5\), \(24\div3=8\), \(30\div5=6\), \(16\div10=1.6\).
The part from 6 to 10 minutes lies in the third class: \(6\times(10-6)=24\) calls.
The part from 10 to 12 minutes lies in the fourth class: \(1.6\times(12-10)=3.2\) calls.
Total \(=24+3.2=27.2\).
Answer: densities 5, 8, 6, 1.6. About 27 calls lasted between 6 and 12 minutes.
Example 3 A histogram of the masses of parcels has bars with these frequency densities: \(0\lt m\le10\): 1.2, \(10\lt m\le15\): 3.6, \(15\lt m\le30\): 2.0, \(30\lt m\le50\): 0.4. Find the total number of parcels and estimate how many have a mass over 20 kg.
Frequency \(=\) density \(\times\) width: \(1.2\times10=12\), \(3.6\times5=18\), \(2.0\times15=30\), \(0.4\times20=8\).
Total \(=12+18+30+8=68\).
Over 20 kg: the part of the third class from 20 to 30 is \(2.0\times10=20\). Add the last class: \(20+8=28\).
Answer: 68 parcels, and about 28 parcels have a mass over 20 kg.
Common errors
- Plotting cumulative frequency against the class midpoint or the lower boundary. Use the upper class boundary.
- Plotting the frequency itself, instead of the running total, on a cumulative frequency graph.
- Using the frequency as the height of a histogram bar when the class widths differ. The height must be the frequency density.
- Reading the median at the middle of the \(x\)-axis instead of at \(\tfrac12n\) on the cumulative frequency axis.
- Forgetting to subtract from \(n\) when a question asks how many values are more than a number.
Exam tip: Draw faint construction lines from the axis to the curve and back to the other axis so that your reading is easy to follow. Always label the vertical axis of a histogram "frequency density".
Check yourself
- Class frequencies are 3, 9, 14, 4. Write the cumulative frequencies.
Answer
3, then \(3+9=12\), then \(12+14=26\), then \(26+4=30\). - A class has width 4 and frequency 18. What is its frequency density?
Answer
\(18\div4=4.5\). - A histogram bar is 5 units wide and 3.2 high. What is the frequency?
Answer
\(3.2\times5=16\). - A cumulative frequency graph has total frequency 120. At which cumulative frequency values do you read the median, \(Q_1\) and \(Q_3\)?
Answer
Median at \(\tfrac12\times120=60\). \(Q_1\) at \(\tfrac14\times120=30\). \(Q_3\) at \(\tfrac34\times120=90\).