A histogram is a type of graph that has wide applications in statistics. Histograms provide a visual interpretation of numerical data by indicating the number of data points that lie within a range of values. These range of of values are called classes or bins. The frequency of the data that falls in each class is depicted by the use of a bar. The higher that the bar is, the greater the frequency of data values in that bin.

### Histograms vs. Bar Graphs

At first glance, histograms look very similar to bar graphs. Both graphs employ vertical bars to represent data. The height of a bar corresponds to the relative frequency of the amount of data in the class. The higher the bar, the higher the frequency of the data. The lower the bar, the lower the frequency of data. But looks can be deceiving. It is here that the similarities end between the two kinds of graphs.

The reason that these kinds of graphs are different has to do with the level of measurement of the data. On one hand, bar graphs are used for data at the nominal level of measurement. Bar graphs measure the frequency of categorical data, and the classes for a bar graph are these categories. On the other hand, histograms are used for data that is at least at the ordinal level of measurement. The classes for a histogram are ranges of values.

Another key difference between bar graphs and histograms has to do with the ordering of the bars.

In a bar graph it is common practice to rearrange the bars in order of decreasing height. However, the bars in a histogram cannot be rearranged. They must be displayed in the order that the classes occur.

### Example of a Histogram

The diagram above shows us a histogram. Suppose that four coins are flipped and the results are recorded.

The use of the appropriate binomial distribution table or straightforward calculations with the binomial formula shows the probability that no heads are showing is 1/16, the probability that one head is showing is 4/16. The probability of two heads is 6/16. The probability of three heads is 4/16. The probability of four heads is 1/16.

We construct a total of five classes, each of width one. These classes correspond to the number of heads possible: zero, one, two, three or four. Above each class we draw a vertical bar or rectangle. The heights of these bars correspond to the probabilities mentioned for our probability experiment of flipping four coins and counting the heads.

### Histograms and Probabilities

The above example not only demonstrates the construction of a histogram, it also shows that discrete probability distributions can be represented with a histogram. Indeed, and discrete probability distribution can be represented by a histogram.

To construct a histogram that represents a probability distribution, we begin by selecting the classes. These should be the outcomes of a probability experiment. The width of each of these classes should be one unit. The heights of the bars of the histogram are the probabilities for each of the outcomes.

With a histogram constructed in such a way, the areas of the bars are also probabilities.

Since this sort of histogram gives us probabilities, it is subject to a couple of conditions. One stipulations is that only nonnegative numbers can be used for the scale that gives us the height of a given bar of the histogram. A second condition is that since probability is equal to area, all of the areas of the bars must add up to a total of one, equivalent to 100%.

### Histograms and Other Applications

The bars in a histogram do not need to be probabilities. Histograms are helpful in areas other than probability. Anytime that we wish to compare the frequency of occurrence of quantitative data a histogram can be used to depict our data set.