Section 1.4

Visualizing Data

A good picture shows you in a second what a table of numbers hides for an hour. The single most useful chart for one quantitative variable is the histogram. It comes with a hidden dial, the bin width, that can reveal a distribution's true shape or completely distort it.

What a histogram shows

A histogram chops the number line into equal-width bins and draws a bar for how many values land in each. Unlike a bar chart (which compares separate categories), a histogram's bars touch, because they cover a continuous range. At a glance it reveals the three things you most want to know about a distribution:

  • Shape — symmetric and bell-like, skewed to one side, or with multiple peaks?
  • Center — roughly where do the values pile up?
  • Spread — tightly clustered or widely scattered, and any outliers stranded out in the tails?

🎮 The Bin-Width Dial

Same data, different number of bins. Too few bins hides the shape; too many turns it into noise. Find the bin count that tells the truth.

The bin-width lesson: with only 2–3 bins, a two-peaked distribution looks like a single blob — the structure is smoothed away. With 50+ bins, even bell-shaped data looks jagged and random. The right number of bins (often somewhere around 10–20 for a few hundred points) shows the real shape without inventing fake detail. Always try a couple of bin widths before you trust a histogram.

Other workhorses

  • Bar chart — for categorical data: one bar per category, with gaps between them (the categories aren't a continuum).
  • Boxplot — a compact five-number summary (min, quartiles, max) that's great for spotting outliers and comparing groups side by side.
  • Scatterplot — for two quantitative variables at once; the gateway to correlation and regression.

Torn between them for a real dataset? The Which Chart Should I Use? chooser walks you to the right display in a few clicks. And when the picture is headed for a paper, Tables & Figures That Don't Lie shows how to keep it honest.

Why it matters: visualizing first is a discipline, not a decoration. The shape you see decides which summaries are honest (mean vs. median) and which tests are valid, so the picture always comes before the formula. Once you have looked, the test chooser turns what you saw into a shortlist.

Common questions

How many bins should a histogram have?

There's no single right answer — around 10–20 bins works well for a few hundred observations, and rules like Sturges' or Freedman–Diaconis give reasonable starting points. The practical advice: always try several bin widths. Too few bins hides real structure (like two peaks); too many turns the shape into noise.

Why do people say never to use a pie chart?

Because pie charts make readers judge angles and areas, which humans do poorly — classic perception experiments (Cleveland & McGill, 1984) show we compare aligned bar lengths far more accurately. With more than two or three slices, "which is bigger?" becomes guesswork that a sorted bar chart answers instantly. The defensible pie is rare: a single part-of-whole message with two or three very different slices. Our chart chooser has a whole "resist the pie" verdict explaining the alternatives.

When should I use a boxplot instead of a histogram?

Use a boxplot when comparing several groups side by side (five boxplots fit neatly where five histograms would be a mess), or when you want outliers flagged automatically by the 1.5 × IQR rule. Use a histogram when the shape matters (skew, two peaks), because a boxplot can't show bimodality. Our descriptives calculator draws both from pasted data.