Histograms & the Shape of Data
How binning turns a pile of numbers into a picture — and how that picture's shape tells you where the center really is.
From a list of numbers to a picture
Suppose someone hands you the wait times of 500 customers, or the scores on a class quiz. As a raw list it is unreadable — just a wall of numbers. A histogram fixes that with one simple trick.
Chop the number line into equal-width slices called bins, then count how many values fall into each slice and draw a bar that tall. A bin holding lots of values gets a tall bar; an empty stretch gets no bar at all. The height of each bar is just a frequency — a count. Stand back, and those bars trace out the shape of the data.
Bin width changes the picture
Here is the catch that trips people up: the same data can look very different depending on how many bins you use. Bin width is a decision you make, not something baked into the numbers.
- Too many, very narrow bins: each bin catches only a value or two, so the histogram looks spiky and full of gaps — you see random noise, not the pattern.
- Too few, very wide bins: everything is crushed into two or three fat bars, hiding features like a second peak.
The number of bins and the bin width are two sides of one coin — for a fixed range, more bins means each is narrower.
Try it: change the bins, change the shape
In the tool below, start with the Bins slider. Drag it high and the bars turn jagged and gappy; drag it low and the shape smooths into a few blocky bars — yet the underlying values never changed. Then use the Population menu to switch shapes, and watch the two dashed markers: the blue mean line and the green median line. On the right-skewed data they pull apart; on the bell-shaped data they sit almost on top of each other. Resample draws a fresh batch so you can see the shape is a property of the population, not one lucky sample.
How skew moves the mean and the median
Shape is not just decoration — it tells you which summary of the center to trust. The mean is an average, so a few extreme values in a long tail tug it in their direction. The median is just the middle value once the data is sorted, so it barely notices those outliers.
Put those two facts together and you get a reliable rule of thumb: in a right-skewed distribution the tail on the right hauls the mean above the median; in a left-skewed one the mean sits below the median; and in a symmetric distribution they land in essentially the same place.
- Mean: add them up and divide by 5. Sum = 3 + 4 + 4 + 5 + 34 = 50, so the mean = 50 ÷ 5 = 10 hours.
- Median: sort the values (they already are: 3, 4, 4, 5, 34) and take the middle one. With five values the middle is the 3rd, so the median = 4 hours.
- Compare: the mean (10) is far above the median (4). The single 34-hour job is a long right tail that drags the mean upward while the median stays near the typical case.
Check your understanding
- A histogram slices the number line into equal-width bins and shows how many values land in each — the bar heights are frequencies (counts).
- Bin width is a choice, not a fact: too many bins looks jagged and full of gaps, too few hides the shape. Adjust it until the real pattern is clear.
- Learn the vocabulary of shape — symmetric, right-skewed, left-skewed, uniform, and bimodal — because the shape tells you which summary numbers to trust.
- In a symmetric distribution the mean and median sit together; skew separates them.
- The mean is pulled toward the long tail, so mean > median signals right skew and mean < median signals left skew. The median resists outliers.