Histograms & Distribution Shape

Before any test or model, look at the distribution. The histogram answers the most fundamental question about a variable — how are its values spread out? — and it's where most good analyses really begin.

In Lesson 1 we read that list prices have a mean higher than their median. That single fact hinted at something, but a number can't show you a shape. A histogram can. It takes a variable, slices its range into bins, and draws a bar for each bin whose height is the count of values that fall inside. The result is a picture of the entire distribution — and learning to read that picture is one of the most transferable skills in statistics.

A histogram of list price showing a right-skewed distribution
The price distribution at a glance: one peak, a long tail to the right.

Reading the shape

From a histogram you read four things, almost at once:

  • Center — where the bulk of the values sit.
  • Spread — how wide the distribution is.
  • Shape — is it symmetric or skewed? One peak (unimodal) or several (multimodal)?
  • Outliers — isolated bars stranded far from the main mass.

For list price, the story is unmistakable: a single tall peak at the lower end and a long tail stretching right. That's a right-skewed distribution — exactly what the mean-above-median clue predicted. A few very expensive homes stretch the tail and drag the average upward.

The bin-width knob

A histogram has one crucial setting: how many bins. It's a genuine trade-off. Too few bins and you over-smooth, blurring real structure into a couple of fat bars. Too many and every bar becomes noise. Stratum puts this control right in the chart's control bar, so you can feel the trade-off by dragging it.

Adjusting the bin count in the histogram control bar
Bin width is the histogram's tuning knob — adjustable live.

You don't have to guess. Statisticians have devised rules that pick a sensible number for you:

RuleIdeaBest when
Sturgesbins ≈ log₂(n) + 1Small, roughly normal data
Ricebins ≈ 2·n1/3A simple default for larger samples
Freedman–Diaconiswidth ∝ IQR / n1/3Skewed data and outliers (robust)

For right-skewed prices, Freedman–Diaconis usually behaves best, because it keys off the interquartile range rather than the outlier-sensitive full range.

Smoothing it out with a density curve

Bins are a blunt instrument — shift their edges and the picture wobbles. A kernel density estimate (KDE) replaces the bars with a smooth curve, giving you a bin-independent view of the same shape. Switch it on and the distribution's contour comes into focus.

Histogram with a kernel density estimate overlaid
A KDE overlay traces the distribution's shape independently of the bins.

How normal is it?

Many statistical methods assume data is roughly normal — the familiar bell curve. Stratum can overlay a normal curve with the same mean and standard deviation as your data, turning "is this normal?" into a visual question. If the bars hug the curve, you're close. If a long tail pulls away from it, you're not.

Histogram with a fitted normal curve overlay
A normal curve overlay makes the departure from Gaussian obvious.
The visual definition of skew. On a right-skewed distribution, the mean sits to the right of the peak and above the median — the long tail tugs it that way. Once you can spot this on a histogram, you'll never misread a "average price" headline again. And practically, it's your cue that methods assuming normality should be used with care, or after a transformation.

Comparing groups with small multiples

One distribution is useful; several side by side is often more revealing. Facet the histogram by PropertyType and Stratum draws a gallery of small multiples — one panel per category, on shared axes — so you can compare the price distributions of condos, townhouses, and detached homes at a glance.

A gallery of histograms faceted by property type
Small multiples: one histogram per property type, on shared axes.

Ready to share

When the chart says what you need it to, export it. Stratum renders charts to PNG, JPEG, or vector PDF — drop them straight into a report or slide deck.

Exporting the histogram to PDF
One-click export to PDF (or PNG/JPEG).

Follow along

Dataset
housing_market.csv
You'll use
The Histogram chart, bin controls, KDE and normal overlays, faceting, and export
Up next
Lesson 6 — Box-Whisker & Violin Plots

The histogram shows one variable's shape beautifully, but it's awkward for comparing many groups at once. In the next lesson we'll meet two charts built for exactly that — the box-and-whisker plot and its richer cousin, the violin.