What Happens When You Increase the Number of Classes in a Histogram?

happens-increase-number-classes-histogram Credit: Adrian Assalve/E+/Getty Images

When the number of classes in a histogram is increased, the data set is divided into more categories, and the histogram gives a more detailed picture of the data distribution. However, if there are too many classes, it becomes difficult to extract useful information from the histogram.

A histogram is a method for data visualization in which data frequency, or counts, are plotted against data value. For instance, if a data set has eight data points falling in the range 3 - 5, a bar spanning the data range 3 - 5 would be plotted, with a height of 8 units. The number of classes controls how wide the data ranges are. Increasing the number of classes will shrink the data ranges, for instance from 3 - 5 to 3.8 - 4.2.

Histograms are useful for getting an overall picture of the data set and its features. They are particularly useful for quickly identifying skewness, modality and outliers. Skewness is lack of symmetry in the data, modality refers to the number of peaks in the data distribution, and outliers are data points that lie far away from the rest of the data set. Histograms can also be used to compare two data sets to determine how similar or different they are.