Topic S · Lesson 3 of 4
Histograms, cumulative frequency and comparing distributions
HistogramsHigher tier
A histogram looks like a bar chart but is used for continuous grouped data, so there are no gaps between bars. When class widths are unequal, bar heights would be misleading (a wide class collects more data simply because it is wide). So in a histogram the area of each bar represents the frequency. The height is the frequency density:
How to draw a histogram
- Step 1: Find each class width.
- Step 2: Divide each frequency by its class width to get the frequency density.
- Step 3: Draw bars with no gaps, from the class boundaries, up to the frequency density, with frequency density on the vertical axis.
In the diagram, the class has frequency 18 and width 5, so its frequency density is 3.6; the class has frequency 6 and width 20, so its frequency density is only 0.3.
Worked example
Estimating from a histogramgrade 8–9
Use the histogram to estimate how many people waited between 12 and 25 minutes.
Show solutionHide solution
- Frequency in : the bar for 10 to 15 has frequency density 2.4, so a 3-minute strip holds .
- Frequency in : .
- Frequency in : frequency density 1.6, width 5, so .
- Total: , so about 33 people. This assumes the people are spread evenly within each class.
Cumulative frequencyHigher tier
Cumulative frequency is a running total: the number of values up to and including each class. For the waiting-time data (frequencies 8, 12, 18, 16 and 6), the running totals are 8, 20, 38, 54 and 60.
How to draw and use a cumulative frequency graph
- Step 1: Work out the running totals.
- Step 2: Plot each one at the upper boundary of its class (8 at 10 minutes, 20 at 15, and so on), starting from zero at the lower boundary of the first class.
- Step 3: Join the points with a smooth curve (or straight lines).
- Step 4: For values, read across from for the median, from for the lower quartile (LQ) and from for the upper quartile (UQ), then down to the horizontal axis.
The points are plotted at the upper boundary because by the end of each class all of its values have been counted. In the diagram, , so read across from 15, 30 and 45: LQ ≈ 13 minutes, median ≈ 18 minutes, UQ ≈ 23 minutes.
The interquartile range is minutes. It measures the spread of the middle half of the data, so, unlike the range, extreme values do not affect it. You can also answer "how many waited more than 25 minutes?" by reading up from 25 to the curve (about 48) and subtracting from 60: about 12 people.
Box plotsHigher tier
A box plot summarises a data set with five values on a scale: minimum, LQ, median, UQ and maximum. The box covers the middle 50% of the data, from LQ to UQ, with a line at the median, and the whiskers stretch out to the minimum and maximum. Box plots drawn on the same scale make comparisons quick, as the diagram shows.
Try it: change the data or the frequencies and see the averages, box plot, histogram and cumulative frequency graph change together.
Try it: simulation
Averages, spread and graphs
Loading the simulation…
Comparing distributions
To compare two data sets, always make two comparisons, and always say what they mean in context:
- Compare an average (the median, or the mean): which group is generally higher?
- Compare a measure of spread (the IQR, or the range): which group is more consistent?
For the box plots above, a full answer might be: "Group B's median (22 minutes) is higher than group A's (18 minutes), so group B generally waited longer. Group B's IQR () is about the same as group A's (), so the middle halves of the two groups are about equally spread out, but group A's range (40) is larger than group B's (30) because of one very long wait." Use the median and IQR when there are outliers or skewed data; use the mean and range otherwise.
Practise this topic
Both are part of Premium.