What is a Histogram?
A histogram groups numeric data into intervals (bins) and displays the frequency (count) of observations in each bin as vertical bars. It is one of the most fundamental tools for exploring the shape, spread, and central tendency of a dataset.
Unlike bar charts, histogram bars touch each other to emphasize that the data is continuous. The choice of bin width can affect the story the histogram tells — too few bins hide detail, too many bins create noise. This tool uses the square root choice (√n) to determine optimal bin count automatically.
How to Read a Histogram
- Symmetric bell-shaped suggests a normal distribution — common in natural phenomena like heights or test scores.
- Long tail to the right indicates right-skew (positive skew), typical of income data, response times, or any variable with a natural lower bound.
- Long tail to the left indicates left-skew (negative skew), common in variables with an upper ceiling like exam scores on an easy test.
- Two or more peaks reveal a bimodal (or multimodal) distribution — often a sign of two distinct subpopulations in your data.
Frequently Asked Questions
How are bin sizes determined?
What's the difference between a histogram and a bar chart?
How do I know if my data is normally distributed from a histogram?
Key Terms
- Bin
- An interval that groups data points for counting.
- Frequency
- The count of data points falling within each bin.
- Skewness
- A measure of asymmetry in the distribution.
Computation Method
- Quartiles are calculated using linear interpolation (method 7 from Hyndman & Fan, 1996), consistent with Python's NumPy and pandas defaults.
- Outlier detection uses the Tukey fences method: lower fence = Q1 − 1.5 × IQR, upper fence = Q3 + 1.5 × IQR.
- Chart scaling caps the display axis at the upper fence value so the visualization remains clear even when extreme outliers are present.
References
- Hyndman, R. J. & Fan, Y. (1996). “Sample Quantiles in Statistical Packages.” The American Statistician, 50(4), 361–365.
- Tukey, J. W. (1977). Exploratory Data Analysis. Addison-Wesley.