Combining classes
In all previous histograms, the classes have had the same width, but this is not essential. Histograms can be drawn with mixed class widths. Indeed, a histogram can be drawn corresponding to any choice of classes, but drawing a histogram with mixed class widths is harder.
The vertical axis of a histogram with mixed class widths must not be 'frequency'.
To retain the correct visual impression, in a histogram with classes of different widths, the vertical axis must be labeled 'density'. (We will not give a precise definition here.) The guiding principle is...
In a correctly drawn histogram, each value contributes the same area.
For example, if there are the same number of values in two classes but one class is twice the width of the other, its height should be half that of the other in order to ensure that their class rectangles have the same area.
Rain days
The histogram below shows the 20 values in the Rain Days data.
Each rectangle represents one value — click on any rectangle to see the value.
Select Wider classes from the pop-up menu to combine the highlighted classes. Observe that each value is still represented by a rectangle of the same area, but of a different shape. The total highlighted area remains the same.
If the height had been 'frequency', the height of the combined class would have been doubled, incorrectly distorting the visual impact of the class. The correct height is the average height of the two classes that have been combined.
Select Narrower classes from the pop-up menu and observe that the areas contributed by each value again remain the same.
Why use mixed class widths?
When all class widths are the same, frequencies can be written on the vertical axis, simplifying interpretation. If possible, histograms should therefore be drawn with constant class widths.
However the goal of smoothness can sometimes be attained better by using narrower classes in regions of high density.
The histogram below shows a skew data set.
Although the histogram is fairly smooth on the left of the axis with narrow classes, it becomes more jagged at higher values where the density is lower. However increasing all class widths to smooth the higher classes leaves the histogram blocky on the left. (Select All classes wide from the pop-up menu.)
Select Mixed classes from the pop-up menu and observe that it gives a smoother picture of the distribution.