page_title: Histogram
section_title: Remark
hierarchical_section_title: Histogram / Mathematical definition / Number of bins and width / Remark
caption_attribution_description: English: Histogram and density function for a Gumbel distribution
context_page_description: A histogram is an approximate representation of the distribution of numerical data. It was first introduced by Karl Pearson. To construct a histogram, the first step is to "bin" the range of values—that is, divide the entire range of values into a series of intervals—and then count how many values fall into each interval. The bins are usually specified as consecutive, non-overlapping intervals of a variable. The bins must be adjacent, and are often of equal size.
  If the bins are of equal size, a rectangle is erected over the bin with height proportional to the frequency—the number of cases in each bin. A histogram may also be normalized to display "relative" frequencies. It then shows the proportion of cases that fall into each of several categories, with the sum of the heights equaling 1.
  However, bins need not be of equal width; in that case, the erected rectangle is defined to have its area proportional to the frequency of cases in the bin. The vertical axis is then not the frequency but frequency density—the number of cases per unit of the variable on the horizontal axis. Examples of variable bin width are displayed on Census bureau data below.
context_section_description: A good reason why the number of bins should be proportional to  is the following: suppose that the data are obtained as  independent realizations of a bounded probability distribution with smooth density. Then the histogram remains equally "rugged" as  tends to infinity. If  is the "width" of the distribution (e. g., the standard deviation or the inter-quartile range), then the number of units in a bin (the frequency) is of order  and the relative standard error is of order . Comparing to the next bin, the relative change of the frequency is of order  provided that the derivative of the density is non-zero. These two are of the same order if  is of order , so that  is of order . This simple cubic root choice can also be applied to bins with non-constant width.
caption: Histogram and density function for a Gumbel distribution [24]
exif: {}