Skip to content

Seeing distributions

Histograms, densities, box plots, rainclouds and ECDFs, and what each one hides.

Introductory ~10 min7 steps

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

01

One column, many pictures

Read
ChartShows wellWatch for
Histogramshape, peaksbin width
Densitysmooth shape, overlaysbandwidth; can imply values that don't exist
Box plotmedian, spread, flagged pointshides peaks and gaps
ECDFevery percentilepeaks are harder to see
Beeswarm, dotsevery valueonly for small data
Raincloudshape, summary and points togethertakes more room
02

What a box hides

Predict

Predict first

Can two datasets with very different shapes, one with two peaks and one with one, have identical box plots?

Yes, easilyOnly with very large samplesNo, the box shows them
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.

Box & violinHow does a numeric variable differ across groups?
View data
outcomearm
61.900Control
35.400Control
56Control
66.400Control
44.200Control
66.600Control
63.500Control
38.700Control
33.500Control
52.500Control
65.600Control
70Control
39.100Control
44.900Control
69.600Control
53.900Control
51.500Control
54Control
57.700Control
61.800Control
65.400Control
52.200Control
62.100Control
43.200Control
50.300Control
47Control
41.200Control
50.200Control
46.500Control
46.500Control
43.300Control
40.600Control
66.500Control
57.100Control
45.300Control
51Control
45Control
34.200Control
76.900Control
37Control
26.900Control
51.400Control
50.100Control
53.100Control
52.300Control
43.400Control
59.900Control
45.700Control
49.400Control
55.900Control
68.500Control
55.500Control
25.500Control
48.200Control
62.600Control
47.400Control
52.900Control
77Control
58.700Control
61.800Control

First 60 of 240 rows.

03

Bins and bandwidth

Explore

Move 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?

How sure?
2.6
150
12
1.00

Bars: histogram with your bins. Line: kernel density with your bandwidth.

Commit your prediction above to see the result

Make your prediction first; the figure appears when you commit.

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.

04

Show the data when you can

Read

A raincloud plots density, a box and the raw points together. It needs little explanation, and readers can see the sample size for themselves.

RaincloudHow do groups compare in shape, summary and individual observations at once?
View data
rt_mscondition
603Congruent
447Congruent
635Congruent
606Congruent
614Congruent
551Congruent
538Congruent
699Congruent
545Congruent
657Congruent
566Congruent
548Congruent
493Congruent
868Congruent
605Congruent
560Congruent
499Congruent
538Congruent
496Congruent
526Congruent
454Congruent
474Congruent
499Congruent
485Congruent
597Congruent
429Congruent
506Congruent
521Congruent
552Congruent
473Congruent
656Congruent
516Congruent
577Congruent
717Congruent
507Congruent
508Congruent
540Congruent
503Congruent
753Congruent
497Congruent
509Congruent
551Congruent
437Congruent
418Congruent
616Congruent
496Congruent
744Congruent
426Congruent
368Congruent
568Congruent
595Congruent
553Congruent
427Congruent
513Congruent
776Congruent
420Congruent
537Congruent
411Congruent
421Congruent
540Congruent

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.

05

Try it on your data

In the app

In 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.

06

Check your understanding

Checkpoint

Check 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.

07

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