📊 Data
📶Histograms
Sort continuous data into equal bins, count each one — and the shape of your data appears at a glance.
Spread twelve test scores on the table: 95, 12, 67, 84... Bar graphs shine at comparing categories like "8 dogs, 5 cats", but scores are not categories — they form a continuous stream of numbers, taking any value from 0 to 100. Draw one bar per score and eighty-odd bars cram into a wall. The fix: sort the numbers into groups. That is where the histogram starts.
A histogram is not a bar graph
Both speak through tall and short bars, but they differ in essence:
- A bar graph's horizontal axis holds categories; bars keep gaps between them, and their order can be shuffled;
- A histogram's horizontal axis holds continuous values, fixed in size order and never shuffled, with bars standing shoulder to shoulder — because 50–60 and 60–70 are simply neighbouring stretches of number.
Gaps are not decoration
Bar graphs keep gaps to remind you that categories are independent; histograms keep none to remind you that data flows continuously. Check the gaps first, and you will know whether the axis holds categories or numbers.
Bins and frequency
Sort the twelve scores into four groups of 25 points each. The count in each group is called the frequency:
| Score range | Frequency |
|---|---|
| 0–25 | 1 |
| 25–50 | 2 |
| 50–75 | 5 |
| 75–100 | 4 |
The distribution appears at once: the middle range (50–75) is the most crowded, thinning out toward both ends. Before sorting, decide which group a boundary score belongs to (is 75 in the third group or the fourth?) so nobody is counted twice or skipped.
Switch to the bar mode to feel the move: one group, one bar, and the height is the frequency. A histogram uses exactly this trick, only with the bars standing shoulder to shoulder in value order.
How wide should bins be?
Bin width is the range each group covers (25 points above), and finer is not always better:
- Too wide (say, just pass/fail): all detail is flattened, and the bumps in between vanish;
- Too narrow (every 5 points): bars jump up and down, and noise drowns the shape.
Try several widths
Draw the same data once with 25-point bins and once with 10-point bins, then compare: use whichever width gives the most explainable shape. There is no standard bin width, only a suitable one.
Three questions for any histogram
- Where is the peak? The tallest bar marks where the data crowd together;
- Is it symmetric? A peak shifted left means most scores sit low with a long tail to the right; shifted right, the reverse;
- How wide is the spread? The stretch from the first group to the last echoes the span of the data — range and spread measures the same thing in numbers.
Check yourself
Quick quiz
1. What is the most visible difference between a histogram and a bar graph?
2. In the table above, the 50–75 group holds 5 of the 12 students. What fraction is that?
3. What happens if bins are made too wide?