A histogram is a graphical representation of data first introduced by statistician Karl Pearson. A histogram consists of a number of rectangles, or "bins," where the height of the rectangle represents the frequency of observations, and the width of the rectangle represents the quantity being measured. Therefore, the area of the rectangle represents the total number of observations. The histogram is set up like a graph, with numbers on the horizontal axis arranged sequentially so the relative frequency of events can be compared. There is no exact number of bins for a histogram, but there are general rules that can be followed to aid you in developing a histogram.
Determine how wide you would like the bin to be. For example, assume that you would like each bin to represent two consecutive values on the horizontal axis (say 1 and 2, or 5 and 6); therefore, the bin width is 2.
Subtract the maximum value in the data set by the minimum value in the data set. For example, if the maximum observation is 24 and the minimum is zero, the resulting difference is 24.
Divide the difference of the maximum and minimum values by the width of the bins. For the example here, this would mean dividing 24 by 2, which gives 12. This is the number of bins that should be used for your histogram.
Tips & Warnings
- If the optimal number of bins calculated is a decimal number, round this number up to the nearest integer, regardless of the value. For example, if the optimal bin number was calculated to be 4.15, this would be rounded up to 5.
- A wide variety of techniques can be used for determining optimal bin size and number. The method outlined here is the most generally applicable; however, the specific technique used may depend on the specific application of the histogram.
- "Modern Applied Statistics with S, 4th edition"; William N. Venables and Brian D. Ripley; Springer; 2002
- Photo Credit Goodshoot/Goodshoot/Getty Images
How Do I Set Up a Yahoo Email Account?
You can create a free Yahoo email address by signing up for a new Yahoo account on the Web. Your Yahoo Mail...
How to Determine How Many Yards of Concrete to Use
Concrete is a composite construction material made from cement, crushed rock, sand, water and other additives. Concrete is typically sold by the...
How to Determine the Shape of a Histogram
A histogram is a type of bar chart that groups data into intervals. The number of points at each interval is represented...