Seeing distributions
Histograms, densities, box plots, rainclouds and ECDFs, and what each one hides.
You will be able to
- Choose a distribution chart for your sample size and question
- Name what a box plot can hide
- Show the raw data when it's small enough
Read first
One column, many pictures
Read| Chart | Shows well | Watch for |
|---|---|---|
| Histogram | shape, peaks | bin width |
| Density | smooth shape, overlays | bandwidth; can imply values that don't exist |
| Box plot | median, spread, flagged points | hides peaks and gaps |
| ECDF | every percentile | peaks are harder to see |
| Beeswarm, dots | every value | only for small data |
| Raincloud | shape, summary and points together | takes more room |
What a box hides
PredictPredict first
Can two datasets with very different shapes, one with two peaks and one with one, have identical box plots?
Reveal
The answer: Yes, easily
Yes. A box plot shows five numbers. Two clusters at the ends of a range and a smooth spread between them can share all five. That's why you should draw the points or a density beside it when you can.
View data
| outcome | arm |
|---|---|
| 61.900 | Control |
| 35.400 | Control |
| 56 | Control |
| 66.400 | Control |
| 44.200 | Control |
| 66.600 | Control |
| 63.500 | Control |
| 38.700 | Control |
| 33.500 | Control |
| 52.500 | Control |
| 65.600 | Control |
| 70 | Control |
| 39.100 | Control |
| 44.900 | Control |
| 69.600 | Control |
| 53.900 | Control |
| 51.500 | Control |
| 54 | Control |
| 57.700 | Control |
| 61.800 | Control |
| 65.400 | Control |
| 52.200 | Control |
| 62.100 | Control |
| 43.200 | Control |
| 50.300 | Control |
| 47 | Control |
| 41.200 | Control |
| 50.200 | Control |
| 46.500 | Control |
| 46.500 | Control |
| 43.300 | Control |
| 40.600 | Control |
| 66.500 | Control |
| 57.100 | Control |
| 45.300 | Control |
| 51 | Control |
| 45 | Control |
| 34.200 | Control |
| 76.900 | Control |
| 37 | Control |
| 26.900 | Control |
| 51.400 | Control |
| 50.100 | Control |
| 53.100 | Control |
| 52.300 | Control |
| 43.400 | Control |
| 59.900 | Control |
| 45.700 | Control |
| 49.400 | Control |
| 55.900 | Control |
| 68.500 | Control |
| 55.500 | Control |
| 25.500 | Control |
| 48.200 | Control |
| 62.600 | Control |
| 47.400 | Control |
| 52.900 | Control |
| 77 | Control |
| 58.700 | Control |
| 61.800 | Control |
First 60 of 240 rows.
Bins and bandwidth
ExploreMove the hump separation, then change the bins and bandwidth. Find a setting that hides the two humps, then one that invents extra ones.
AExplorable · Bins and bandwidth
How do histogram bins and smoothing bandwidth change the story the same data tell?
How many humps does the population really have?
Bars: histogram with your bins. Line: kernel density with your bandwidth.
Commit your prediction above to see the result
Make your prediction to see the result.
Try more than one setting before you publish a shape. CodeSplash's histogram starts from a data-driven rule, and you can override it.
Show the data when you can
ReadA raincloud plots density, a box and the raw points together. It needs little explanation, and readers can see the sample size for themselves.
View data
| rt_ms | condition |
|---|---|
| 603 | Congruent |
| 447 | Congruent |
| 635 | Congruent |
| 606 | Congruent |
| 614 | Congruent |
| 551 | Congruent |
| 538 | Congruent |
| 699 | Congruent |
| 545 | Congruent |
| 657 | Congruent |
| 566 | Congruent |
| 548 | Congruent |
| 493 | Congruent |
| 868 | Congruent |
| 605 | Congruent |
| 560 | Congruent |
| 499 | Congruent |
| 538 | Congruent |
| 496 | Congruent |
| 526 | Congruent |
| 454 | Congruent |
| 474 | Congruent |
| 499 | Congruent |
| 485 | Congruent |
| 597 | Congruent |
| 429 | Congruent |
| 506 | Congruent |
| 521 | Congruent |
| 552 | Congruent |
| 473 | Congruent |
| 656 | Congruent |
| 516 | Congruent |
| 577 | Congruent |
| 717 | Congruent |
| 507 | Congruent |
| 508 | Congruent |
| 540 | Congruent |
| 503 | Congruent |
| 753 | Congruent |
| 497 | Congruent |
| 509 | Congruent |
| 551 | Congruent |
| 437 | Congruent |
| 418 | Congruent |
| 616 | Congruent |
| 496 | Congruent |
| 744 | Congruent |
| 426 | Congruent |
| 368 | Congruent |
| 568 | Congruent |
| 595 | Congruent |
| 553 | Congruent |
| 427 | Congruent |
| 513 | Congruent |
| 776 | Congruent |
| 420 | Congruent |
| 537 | Congruent |
| 411 | Congruent |
| 421 | Congruent |
| 540 | Congruent |
First 60 of 180 rows.
With a dozen values, plot each one. A mean and an error bar on a small sample hide nearly everything.
Try it on your data
In the appIn Charts, open Histogram, then choose Use my data and pick a numeric column. Change the controls. Then open the How to read tab, which explains what to look for and what can mislead.
Check your understanding
CheckpointCheck yourself
You have 14 measurements in each of two groups. Which chart shows the most?
Show the answer
Answer: b
With so few values, the raw points are honest and readable. A density curve would invent smoothness that 14 points can't support.
Check yourself
You suspect a column has two peaks. Which chart is the worst choice for finding out?
Show the answer
Answer: a
A box plot reduces the column to five numbers, so peaks can't appear.
Check yourself
Which chart has no bin width or bandwidth to choose?
Show the answer
Answer: c
An ECDF steps up at each value, so no smoothing choice can change it.
Recap
Recap- Every distribution chart hides something, so know what.
- Box plots hide shape, and histograms and densities depend on their settings.
- With small data, show every point.
Concepts in this lesson