Effects of Bin Width and Height in a Histogram

When reading a histogram, it is important to understand exactly what the vertical scale is measuring and how that is affected by the choice of bins. Here we consider three common choices for the height of a bin: count, probability, and probability density.
Count simply counts the number of items in each bin. Probability is similar to count, except the number of items in each bin is divided by the total number of items. For probability density, the probability is divided by the width of the bin, so that the total area of the rectangles sums to one.
When the bins all have the same width, the resulting histograms all have the same shape, with the heights varying by some constant. When the bins have different widths, count and probability are still similar, but probability density differs.
When the bins all have unit width, probability and probability density are identical.
To add to the potential confusion, narrow bins of a probability density histogram can have a height greater than one.
You can move, add, or remove the locators in the variable width control.
comments
 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+