A histogram of 36 fictional trips has a taller bar for the shorter journeys, even though that interval contains only 12 trips. The wider interval contains 24. The heights are 1.2 and 0.8 because this chart divides each count by its interval’s width.

That vertical scale is frequency density. To recover the number of trips, multiply a bar’s height by its width. Looking only at the top of the bar loses the information carried by the horizontal span.

A 10-minute-wide histogram bar of height 1.2 contains 12 trips. A 30-minute-wide bar of height 0.8 contains 24. The second bar is lower but has twice the area.
Frequency-density height multiplied by bin width gives each count: 12 trips in the narrow interval and 24 in the wide one. The data is fictional.Credit: MathBlog

Start with the bin widths

The first interval runs from zero minutes up to, but not including, 10 minutes. The second runs from 10 through 40 minutes. A trip lasting exactly 10 minutes belongs in the second interval; a 40-minute trip is included in the final interval. These choices keep each recorded trip in one bin.

Counts and frequency densities for the fictional trips
Trip duration Width Trips Frequency density
\(0\le t<10\) minutes 10 minutes 12 1.2 trips per minute
\(10\le t\le40\) minutes 30 minutes 24 0.8 trips per minute

Here, “per minute” refers to the width of a duration interval, not the number of trips arriving each minute. The second bin is three times as wide as the first. It holds twice as many observations, but those observations are spread across a larger interval of possible durations.

Recover each count from its area

For the vertical scale used here, divide the count by the bin width:

\[\text{Frequency density}=\frac{\text{count}}{\text{bin width}}.\]

The first height is \(12/10=1.2\); the second is \(24/30=0.8\). Multiplying back gives \(1.2\times10=12\) trips and \(0.8\times30=24\) trips. The bar areas carry the counts.

The narrow bar is 1.5 times as tall, while the wide bar has twice its area. There is no disagreement between the graph and the table. They encode each count using both dimensions of a rectangle.

Read the vertical label before comparing bars

If the vertical axis showed raw counts, the heights would instead be 12 and 24. That is a different scale. With unequal widths, those bar areas would no longer be proportional to the counts. A label such as “frequency density” tells you which calculation the chart requires.

With equal-width bins, dividing every count by the same width preserves the ordering of the bar heights. Unequal widths make the distinction visible.

A chart of review counts at each star rating uses categories on its horizontal axis. Each category gets a bar whose height can show its count. In this trip histogram, horizontal distance measures minutes, so the width of an interval has a numerical meaning.

A probability-density scale has total area one

Software may also divide by the total number of observations. For these 36 trips, the probability-density heights would be \(12/(36\times10)=1/30\) and \(24/(36\times30)=1/45\) per minute.

The areas then become \(10/30=1/3\) and \(30/45=2/3\), matching the observed shares of trips. They add to one. The heights themselves do not have to add to one; multiplying each by its own bin width is essential.

Keep the limits of the grouping in view

A flat bar does not tell you that the trips were evenly distributed within its bin. The table places 24 trips somewhere between 10 and 40 minutes. It does not reveal how many lasted 11 minutes or 39 minutes. Different underlying lists can produce the same two bars.

Before choosing the interval with more observations, check its edges and the vertical unit. For the frequency-density chart here, compare the two areas or use the counts in the table.

Further reading