MyCalCute
Install
Science

Histogram bars with unequal widths: compare area, not height

Understand frequency density when histogram intervals cover different widths.

Method

A categorical bar chart compares separate categories, while a histogram groups a numeric variable into intervals. When all histogram intervals have equal widths, frequency heights are easy to compare. When widths differ, drawing height as frequency can mislead because a wider interval naturally has more opportunities to contain observations.

One consistent construction uses frequency density as height: frequency divided by interval width. The area of a rectangle is then its width multiplied by its height, so it represents the frequency. State this convention on the vertical axis. If relative frequency density is used instead, divide once more by the total count; the areas then sum to one.

Calculation path: Average & statistics
  1. InputsNumbers (comma separated)
  2. MethodMean = sum ÷ count; population variance = Σ(x − mean)² ÷ count
  3. ResultAverage & statistics

Example only; replace these assumptions with your own values.

Worked example

Consider 10 observations in the interval from 0 to less than 5, and 15 in the interval from 5 to less than 15. The interval widths are 5 and 10. Their frequency densities are 2 and 1.5 observations per unit respectively. The wider interval contains more observations overall, but the narrower interval has the larger density. Both statements can be true.

The rectangle areas recover the original counts: 5 times 2 is 10, and 10 times 1.5 is 15. With 25 observations in total, the relative frequencies are 40% and 60%. Do not interpret density 2 as a 200% probability; it has units of count per unit of the horizontal variable. A density value may exceed one without the interval probability exceeding one.

⁦10 / 5 = 2⁩

⁦15 / 10 = 1.5⁩

⁦5 × 2 = 10; 10 × 1.5 = 15⁩

⁦10 / 25 = 40%; 15 / 25 = 60%⁩

Histogram frequency density
0 to <5: count 10
2 count/unit
5 to <15: count 15
1.5 count/unit

Heights show density; multiply by widths 5 and 10 to recover counts 10 and 15.

Checks and limits

Keep interval boundaries unambiguous so an observation on a shared edge belongs to one bin only. The choice of bins changes the appearance of a histogram and can hide structure. The two-bin example is a teaching illustration rather than a claim about collected data. Average and standard deviation summarize other aspects of a dataset and cannot reconstruct its histogram from those summary values alone.

Related calculators

Source: OpenStax