Statistics · Histograms
1 / 18
Histograms & frequency density
Why a histogram with unequal class widths cannot use frequency as the bar height, and how the rule "area = frequency" fixes it: height = frequency ÷ class width. Drawing the bars, reading a frequency back off a bar as density × width, and why the axis must say "Frequency density".
Statistics · Histograms
Histograms & frequency density
Why a histogram with unequal class widths cannot use frequency as the bar height, and how the rule "area = frequency" fixes it: height = frequency ÷ class width. Drawing the bars, reading a frequency back off a bar as density × width, and why the axis must say "Frequency density".
Why it works
A bar chart and a histogram look like the same picture, and they are not. A bar chart is for categories — favourite sport, eye colour — and its bars stand apart, because there is nothing in between "football" and "netball". A histogram is for continuous data grouped into classes, and its bars touch, because the data runs straight on from one class into the next.That would be a cosmetic difference if every class were the same width. The trouble starts because in real data they usually aren't: you group finely where the values are packed together and coarsely out in the tail, or half your classes come out empty.
The trap, with real numbers. Ninety people were timed on a puzzle.
| Time, (minutes) | Frequency |
|---|---|
| 15 | |
| 20 | |
| 15 | |
| 30 | |
| 10 |
It isn't true. That class is minutes wide; is only . Of course the wide one collected more people — it was catching them for four times as long. Chop into four five-minute strips and each strip holds roughly people. The single five-minute strip from to holds . Minute for minute, the class the chart called small is nearly three times as crowded as the class it called biggest. The tall bar is tall because the class is wide, not because the data is dense there.
The repair: let area carry the frequency. If a bar is going to be rewarded for being wide, that width has to be paid for. So insist that the area of each bar is its frequency, and then solve for the height that makes it so:
That height has a name — the frequency density — and it is a rate: the number of items per unit of whatever is on the -axis, per minute or per gram or per centimetre. Like speed, which is distance per hour, a rate is exactly the thing that lets you compare fairly across intervals of different length. Redo the table with it:
| Time, (minutes) | Frequency | Class width | Frequency density |
|---|---|---|---|
| 15 | 10 | ||
| 20 | 5 | ||
| 15 | 5 | ||
| 30 | 20 | ||
| 10 | 20 |
Class width means the true width of the interval. For that is . Take care when data has been rounded before it was grouped: nail lengths measured to the nearest millimetre and grouped – really run from up to , so that class is wide, not . A class width that is out by one makes its frequency density wrong, which makes its bar the wrong height, which loses the accuracy mark.
Going backwards is where the marks go. Almost every histogram question is the same equation rearranged, so read it in both directions:
Forwards (drawing): from the table, work out each width, divide, plot. Backwards (reading): take a bar's height off the vertical axis, multiply by how wide the bar is, and that is the frequency — the number of items in that class. The height on its own is never a frequency. And to total up a histogram you add the areas, never the heights: the five densities above sum to , which is not and is not a count of anything.
Why the axis must be labelled "Frequency density". The label is what tells a reader which rule to use. Write "Frequency" on a frequency-density axis and you have invited them to read off the tallest bar and conclude that people took between and minutes, when in fact did. The axis label is not decoration; on a "draw the histogram" question it carries a mark of its own, and it is one examiners take.