Histograms, Box Plots, Scatter Plots
Three pictures that show shape, spread with outliers, and relationships: histograms show the shape, box plots show the quarters, scatter plots pair up.
Why Does This Exist?
Summary numbers hide shapes. A mean latency of 90ms can mean every request takes about 90ms or that most take 40ms with a few 500ms disasters, and those two systems need completely different fixes. Before modeling, you look: shape of one column, spread and outliers of one column, relationship between two columns. These three plots are that look, and every data review starts with some version of them.
Descriptive statistics gives the numbers behind these pictures: mean, median, quartiles, and spread. This page is the visual half: which picture answers which question.
The one idea you need first
A dataset column is a list of values, like twelve request latencies in milliseconds. Every plot here is a way of stacking, sorting, or pairing that list so your eyes catch what a single average cannot show.
Think of It Like This
Three views of the same classroom
A histogram is lining students up by height bands and counting each band: you see where the crowd stands and whether a few giants stretch one end. A box plot is the teacher's summary hand: quarters marked, arms reaching to the last normal student, and the one exchange student standing apart flagged with a dot. A scatter plot pairs two facts per student, height against shoe size, with one dot each, so you see whether they climb together.
Same class, three questions answered: where is the crowd, who stands apart, and do two measures move together. No single view answers all three, which is why the trio travels together.
How It Actually Works
Histogram: shape of one column. Chop the value range into bins and stack a bar per bin showing how many values land inside. Twelve latencies (ms): 22, 25, 28, 31, 34, 38, 42, 47, 55, 68, 95, 210. With bins of width 40 starting at 20: bin 20 to 40 holds 5 values, 40 to 60 holds 4, 60 to 80 holds 1, 80 to 100 holds 1, and 200 to 220 holds 1. Read it: most requests cluster low with a long right tail, plus one extreme value at 210. The mean is about 58ms while the median is 40ms, and that gap is the skew talking.
Box plot: quarters and outliers of one column. Sort the values and mark five numbers: minimum, first quartile Q1, median, third quartile Q3, maximum, with whiskers reaching the farthest normal points. For the twelve latencies, the median sits between 38 and 42 (about 40), Q1 is about 29.5, Q3 is about 61.5, so the interquartile range IQR is about 32. Points beyond flag as outliers: the 210ms request stands alone. One box compares columns at a glance, which is why box plots line up nicely across features.
Scatter plot: relationship between two columns. Plot one dot per row with column A on one axis and column B on the other. Pair each latency with its payload size in KB: (22, 8), (25, 10), (28, 9), (31, 14), (34, 15), (38, 18), (42, 20), (47, 24), (55, 30), (68, 38), (95, 55), (210, 140). The dots climb left to right: bigger payloads ride with slower responses. That visible climb is what a correlation coefficient later compresses into one number.
Watch Out For
Letting bin width choose your conclusion
The symptom is a histogram that flips its story when you nudge a parameter: wide bins merge two humps into one reassuring mound, narrow bins shred one group into spiky noise. The fix is to redraw with two or three bin widths before believing a shape, and to mistrust any histogram argument made from a single binning. A box plot beside it keeps you honest, since quartiles never depend on bins.
Reading a box plot as the whole shape
A box plot cannot show two humps: a 50/50 mix of fast and slow requests draws the same box as a single broad group with the same quarters. The symptom is surprise bimodality found late, usually by a model that underperforms on one hump. Pair the box with a histogram (or a violin view) whenever the shape matters, and use the scatter plot, not either of these, when the question involves two columns at once.
The Quick Version
- Histograms bin one column into bars and show shape: skew, humps, gaps, and tails.
- Box plots mark Q1, median, and Q3 with whiskers, and flag points past as outliers.
- Scatter plots put one dot per row across two columns and show whether they climb together.
- Twelve latencies with mean 58ms and median 40ms are right skewed with a 210ms outlier.
- Vary the bin width before trusting a histogram, and never ask one plot all three questions.