Data Visualization › Histograms: Understanding Distributions

Michael BrenndoerferMay 25, 20253 min read
Machine Learning from ScratchAll chapters
Part 1 of 9Statistics 101
Chapter 8Data Visualization › Histograms: Understanding Distributions
Reading section 3 of 10 · Histograms: Understanding Distributions · 3 minSection 3 of 10 · 3 min

Book contents

Section 3 of 10 · 3 min read

Data Visualization › Histograms: Understanding DistributionsOne section · Sections in this chapter3 / 10 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Histograms display the distribution of a continuous variable by dividing the range of values into bins and counting how many observations fall into each bin. The resulting bar chart provides an immediate visual sense of where data is concentrated, how spread out it is, and whether it exhibits unusual patterns like multiple peaks or long tails.

The shape of a histogram reveals important information about the underlying data generation process. A symmetric, bell-shaped distribution centered around a single peak suggests data that might follow a normal distribution, which justifies many classical statistical procedures. Skewed distributions, with long tails extending to the right or left, indicate that extreme values occur more frequently than a normal distribution would predict. Such skewness might suggest the need for data transformation or the use of robust statistical methods that don't assume normality.

Histograms also expose potential data quality issues. Unexpected gaps in the distribution might indicate missing categories or measurement problems. Sharp cutoffs at round numbers could reveal data entry practices rather than true properties of the measured phenomenon. Multiple distinct peaks (bimodal or multimodal distributions) often suggest that the data combines multiple subpopulations that should be analyzed separately.

The choice of bin width significantly affects histogram appearance and interpretation. Too few bins obscure detail and make the distribution appear overly smooth. Too many bins create a jagged appearance dominated by random noise rather than meaningful signal. Most visualization libraries provide reasonable default binning strategies, but practitioners should experiment with different bin widths to ensure they're not missing important features or being misled by arbitrary binning choices.

Out[2]:
Visualization
Histogram showing normal distribution with symmetric bell shape.
Histogram of normally distributed data showing the characteristic symmetric, bell-shaped curve centered around zero. Most observations cluster near the mean, with frequency declining smoothly toward both tails. This pattern justifies the use of statistical methods that assume normality, such as t-tests and ordinary least squares regression.
Histogram showing right-skewed distribution with long right tail.
Histogram of right-skewed data with a long tail extending toward higher values. The bulk of observations concentrate at lower values, but occasional extreme high values stretch the distribution rightward. This pattern is common in income data, response times, and other variables where small values dominate but extreme values occasionally occur.