A histogram's story depends on how wide you cut the bins
When the US Census Bureau charted how long 124 million people take to get to work, one bar stood out: 30 to 35 minutes was more popular than the slots on either side. Commuters had not converged on half an hour. They had rounded their answers, and a histogram made that human habit visible.
Building one is simple. Split the range of values into consecutive intervals, called bins, and count how many observations land in each. The result sketches the shape of the data, which can be symmetric, skewed to one side, or have one, two or many peaks. Scaled so its total area equals one, a histogram becomes a rough estimate of the underlying probability density.
It is easy to mistake for a bar chart, but the two answer different questions. Each bar of a bar chart stands for a separate category, such as a population, so the chart compares groups. Each block of a histogram covers a range of one variable, and the blocks sit edge to edge to show that the ranges are continuous. Some authors recommend gaps between bars in bar charts precisely to avoid confusion. Strictly, what counts is area: a block's area is proportional to its frequency, so its height is the average density across the interval.
Karl Pearson coined the word in lectures at University College London in 1892, and three years later admitted the kind of graph itself was already common. Popular explanations tie the name to Greek words for history or tissue; both guesses are wrong. Using bars for statistics goes back further still, to William Playfair's atlas of 1786.
There is no single right number of bins, and different choices reveal different features, so trying several is wise. Grouping data dates to Graunt in the seventeenth century, but systematic rules arrived only with Sturges in 1926. His formula assumes roughly normal data and gives too few bins, under seven, for samples below 30. The square-root rule appears in many textbooks, and Scott's rule is the default in Microsoft Excel.
Source: Histogram