When constructing a histogram with equal class widths, we mark the class boundaries on the horizontal axis and draw above each interval a rectangle whose height corresponds to the relative frequency of that class. However, when dealing with classes of unequal width, my book says we should calculate the height of each rectangle using the formula $$\text{rectangle height}=\frac{\text{relative frequency of the class}}{\text{class width}}$$ My question is, why do we do that? Why not just stick with the relative frequency to determine the height of each rectangle? Thanks.

  • 2
    $\begingroup$ This makes the area of each rectangle approximate the probability of the class. Said differently, this makes the histogram itself approximate the probability density function. $\endgroup$ – Matthew Drury Jan 22 '18 at 20:41
  • $\begingroup$ You describe the construction of a bar chart rather than a histogram. The distinction is that bar charts use height to represent quantities while histograms use areas to represent quantities. The two will have the same appearance (caeteris paribus) when all bins have the same width, whence the confusion. $\endgroup$ – whuber Jan 22 '18 at 21:35