Leave lesson

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:

frequency density=frequencyclass width.\text{frequency density} = \frac{\text{frequency}}{\text{class width}}.

Then

area of bar=width×height=width×frequencywidth=frequency.\text{area of bar} = \text{width} \times \text{height} = \text{width} \times \frac{\text{frequency}}{\text{width}} = \text{frequency}.

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 ×\times 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 10t<2010 \le t < 20 the width is 1010. But for data recorded to the nearest unit and grouped 20202424, 25252929, the class 25252929 really runs 24.524.5 to 29.529.5, so its width is 55, not 44. A width that is off by one makes every frequency density wrong.

Here is a histogram of the times (minutes) taken by 4545 people, with classes of unequal width — note how the frequency-density heights, not the frequencies, keep the picture honest:10203040500.511.522.5Time (min)Frequency densityThe class 15t<2015 \le t < 20 (frequency 1212, width 55) is the tallest bar because its density 125=2.4\tfrac{12}{5} = 2.4 is largest — even though the class 0t<100 \le t < 10 has nearly as many people (88), spread over a width of 1010 its density is only 0.80.8.

Frequency == area == density ×\times 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 "kk items per cm²", and any other bar's frequency is its page-area ×k\times\, k.

Frequency polygon. Join the midpoints of the tops of the bars with straight lines. The point for each class is plotted at (class midpoint,frequency)(\text{class midpoint}, \text{frequency}) — useful for comparing two distributions on the same axes, because two polygons overlay more clearly than two sets of bars.