Statistics · Data presentation
1 / 14
Histograms and frequency polygons
Why a histogram for continuous data plots frequency DENSITY, not frequency, so that the AREA of each bar is proportional to the frequency — and how that one rule lets you find a missing frequency, a missing class width, or read a frequency off a drawn bar. Plus the frequency polygon, which joins class midpoints.
Statistics · Data presentation
Histograms and frequency polygons
Why a histogram for continuous data plots frequency DENSITY, not frequency, so that the AREA of each bar is proportional to the frequency — and how that one rule lets you find a missing frequency, a missing class width, or read a frequency off a drawn bar. Plus the frequency polygon, which joins class midpoints.
Why it works
A bar chart is for categories — the bars are separate and only the height carries meaning. A histogram is for continuous data grouped into classes, and it has to cope with a problem a bar chart never faces: the classes can have different widths. If you simply plotted frequency as the height, a wide class would look far more crowded than it really is, just because its bar is fat.The fix is to make area, not height, represent frequency. Each bar spans its class on the x-axis (with no gaps — the data is continuous), and its height is the frequency density:
Then
So every bar's area equals its frequency, and equal areas mean equal frequencies no matter how wide the class. That is the entire idea — almost every histogram question is really the single equation frequency frequency density class width rearranged for whichever piece is missing.
Getting the class width right. Use the true class boundaries (see [[data-presentation.types-of-data]]). For the width is . But for data recorded to the nearest unit and grouped –, –, the class – really runs to , so its width is , not . A width that is off by one makes every frequency density wrong.
Here is a histogram of the times (minutes) taken by people, with classes of unequal width — note how the frequency-density heights, not the frequencies, keep the picture honest:The class (frequency , width ) is the tallest bar because its density is largest — even though the class has nearly as many people (), spread over a width of its density is only .
Frequency area density width. Read it both ways. Drawing: given the table, fill in width, then density, then plot. Reading: given the histogram, multiply a bar's height by its width to recover its frequency.
When a histogram is drawn to a scale. On squared paper the area on the page (in cm²) is proportional to frequency, so a fixed area of paper represents a fixed number of items. If a bar of known frequency has a known area in cm², that sets the scale " items per cm²", and any other bar's frequency is its page-area .
Frequency polygon. Join the midpoints of the tops of the bars with straight lines. The point for each class is plotted at — useful for comparing two distributions on the same axes, because two polygons overlay more clearly than two sets of bars.