Skip to content

MODULE 4 · LESSON 23 · Data visualization

Histograms

Construct equal-width bins and explain how bin choices affect a distribution display.

By Laurence Svekis · Self-paced · All worked data is synthetic unless you supply your own source.

Try the practice ↓

PredictInspectCalculateCheckExplainTransfer

Your starting point

Prerequisites: Use the ideas and vocabulary from lesson 22; revisit its worked examples if needed.

Definition: A histogram groups numerical observations into intervals and displays their frequencies. Unlike a category bar chart, neighboring bins represent adjacent ranges of one numerical scale. Bin boundaries determine where values are counted.

Specify the intervals

A histogram requires a range and a bin rule. The academy creates equal-width intervals from the observed minimum to maximum, with the maximum included in the final bin. An observation exactly on an interior boundary enters the bin beginning at that boundary. Stating the rule prevents double-counting boundary values or leaving them unassigned.

Explore more than one reasonable bin count

Too few bins can hide clusters or gaps; too many can make a small sample look erratic. Changing the bins changes the display, not the observations. Compare a few choices and retain a rule that helps answer the question without cherry-picking a shape. Always keep the valid count visible so a reader can judge how much evidence supports the apparent pattern.

Distinguish frequency from density

This workbench uses equal-width frequency bins, so bar height is the number of observations in each interval. With unequal widths, raw count heights would not have the same area interpretation and a density scale may be needed. Avoid presenting a frequency histogram as a probability model. A visible pattern in synthetic practice data is an illustration, not an estimate of a real population distribution.

Two worked examples

Boundary assignment

Values are 0,1,2,3,4 with two equal-width bins spanning 0 to 4. The first bin is [0,2), containing 0 and 1. The final bin is [2,4], containing 2,3,4. Frequencies are 2 and 3, totaling all five observations. The maximum belongs in the final bin.

A constant column

If every observation equals 7, the minimum and maximum coincide. The academy displays a single bin at 7 containing all valid observations rather than dividing by a zero-width range. This is a valid description of no observed variation, not evidence that future measurements must also be identical.

Where this becomes useful

A support manager wants to know whether most response times are short with a few long waits. A histogram can reveal that shape more clearly than a mean alone, provided missing times and bin choices are disclosed.

Make an attempt

Open Distribution Visualizer with 0,1,2,3,4. Use two bins and reconcile the total frequency. Increase the bin count, then replace the list with 7,7,7. Explain the special case and verify that no valid observations disappear.

Open the accompanying interactive lab →

Misconception check

Claim: A different histogram shape means the underlying data changed.

Inspect the correction

The binning rule may have changed. Compare the values and boundaries before attributing the display difference to new evidence.

Independent application

Create a twelve-value distribution and draw it with three bin counts. Reconcile frequencies in each version, state the endpoint rule, and describe a pattern that remains visible without claiming the chosen bins reveal a unique true shape.

Completion records practice and self-review. It is not certification of statistical competence.