Histogram
Frequency distribution with boxplot and statistics
Anatomy of a Histogram
A histogram shows the frequency distribution of a numeric variable. Values are bucketed into equal-width classes (bins); the height of each bar equals the number of observations in that class. It is one of the most important tools for visually characterizing a dataset.
Bins (classes): The number of bars controls how finely the distribution is resolved. Too few bins hide structure, too many produce a jagged picture. Rule of thumb: ⌈√n⌉ or the Sturges / Freedman–Diaconis rules.
Frequency vs. density: The Y axis shows either absolute frequencies (count) or densities (relative frequency per bin width). Density mode is required to overlay a theoretical distribution curve.
Normal curve: Optional overlay of a normal distribution with the same location (μ) and spread (σ) as the sample. Shows at a glance how closely the data matches the bell curve.
Specification limits: USL and LSL can be drawn as vertical lines. This lets you immediately judge whether the distribution lies within the tolerance — a first step before a formal Cpk analysis.
In short: a histogram shows location, spread, shape, and possible outliers of a sample — and should appear at the start of almost every data-driven analysis.
Typical Shapes
- Bell-shaped, symmetric → normality is plausible.
- Right-skewed (long right tail) → typical for processing times, waiting times, reaction times.
- Left-skewed → rarer, often with upper saturation effects.
- Two peaks (bimodal) → mixed populations — e.g. two machines, two shifts — stratify the data.
- Plateau / rectangle → uniform distribution or a mix of several sources with similar frequency.
- Comb pattern with regular gaps → rounding or measurement resolution — check the scale or instrument.
- Isolated bars far out → outliers.
- Distribution "cut off" at USL/LSL → data was filtered beforehand or the instrument has a hard limit.
Pitfalls
Too few data points: With n < 30 the shape is only weakly reliable. Random gaps can look like bimodality, smooth bells can still hide non-normal shapes.
Bin count shapes the picture: The same sample looks completely different with 5 or 50 bins. For important statements, test several bin counts before committing to an interpretation.
Histogram ≠ normality test: A bell shape is an indication, not a proof. Before Cpk or t-test applications, verify with a probability plot or formal test.
Missed mixed populations: A single peak can be produced by two very close means. If stratification attributes exist (shift, machine), display the data separately.
Discrete data in a continuous histogram: Count data or rounded values create characteristic gaps. For discrete data, bar charts or Pareto are more appropriate.
Examples
This module ships with the following example datasets — load any of them in the app with a single click.