// RANGES · UNCERTAINTY · COMPARISON

Error Bars — Uncertainty Overlay

Switch error mode · Hover for full statistics · Bars show mean · Error bars encode spread

Bar chart with error bars showing mean values per group. Error bar length encodes the selected uncertainty measure. Interactive D3 bar chart with error bars. Switch between standard deviation, standard error, 95% confidence interval, and min–max range modes. Hover any bar or error bar for full statistics.

// About Error Bars

Error bars are a graphical enhancement layered onto a Cartesian chart to add a second data dimension: the spread or uncertainty around each plotted central value. The bar height encodes the group mean; the error bar's length encodes how reliable or variable that mean is. Short bars signal concentrated measurements with high confidence. Long bars signal dispersed values where the mean is less precise. This length-as-uncertainty mapping is pre-attentive — viewers read reliability differences before consciously analyzing individual values.

The critical rule: error bars must always identify which measure they encode. SD, SE, and 95% CI bars on identical data produce very different lengths — an unlabelled error bar is statistically meaningless. Use the mode tabs above to compare how the same data looks across all four conventions.

// The Four Error Modes

± SD
Standard Deviation — the spread of individual observations around the mean. Use when the message is about population variability. SD stays constant as sample size grows.
± SE
Standard Error (= SD ÷ √n) — how precisely the mean was estimated. SE shrinks as n increases. SE bars are always shorter than SD bars — sometimes misused to make results appear more precise than they are.
95% CI
Confidence Interval — the most honest choice for scientific communication. The range in which the true population mean would fall 95% of the time if the experiment were repeated. Can be asymmetric for skewed data.
Min–Max
The full observed span of raw data. Most conservative; most sensitive to outliers. Use when you must show actual extremes, not statistical estimates.

// Reading Guide

  • Bar height = group mean; error bar length = uncertainty in that mean
  • Shorter error bar = higher confidence in the mean / less variable data
  • Overlapping 95% CI bars suggest difference may not be statistically significant
  • Non-overlapping SD bars do NOT necessarily imply statistical significance
  • The cap marks the boundary of the range — no cap implies open-ended or unknown
  • Hover any bar or error mark for full stats: mean, SD, SE, CI, range, and n
// LEARN — ERROR BARS

What error bars are

The perceptual mechanism

Error bars are not a chart type — they are a graphical enhancement layered onto a Cartesian graph. They exploit the same channel as the primary encoding (position along a quantitative axis) to add a second layer of information: the spread or uncertainty around each plotted value. The cap-tipped line extending from a central point forces the eye to read a range rather than a single value, making it immediately visible whether groups have tight, reliable measurements or wide, unreliable ones.

The perceptual key: length encodes uncertainty. Short bar = concentrated values, high confidence in the mean. Long bar = dispersed values, lower confidence. This mapping is pre-attentive — viewers grasp it before conscious analysis.

The four error modes and when to use each

Standard deviation (SD) describes the spread of the raw data around the mean. Use it when your message is about the distribution of individual observations — how variable the thing being measured actually is in the population.

Standard error (SE) describes the precision of the mean estimate itself (SE = SD ÷ √n). Use it when your message is about how reliably you estimated the mean — SE shrinks as sample size grows, SD does not. SE bars are always shorter than SD bars for the same data, which is why they are sometimes misused to make data look more precise than it is.

95% confidence interval (CI) is the most honest choice for most scientific communication. It conveys the range in which the true population mean would fall 95% of the time if the experiment were repeated. Unlike SD and SE, CI can be asymmetric for skewed data — this implementation supports distinct upper and lower bounds.

Min–max range shows the full observed span of the data. It is the most conservative encoding and the most sensitive to outliers. Use it when you need to show the reader the actual observed extremes, not a statistical estimate.

Why error bars on a bar chart here

The data structure is grouped categorical measurements with pre-computed statistics. The message is comparison across groups with explicit uncertainty — not just "which group has the higher mean" but "how reliable is each group's mean, and do the uncertainty ranges overlap?" Overlapping confidence intervals are a rapid visual test for whether differences between groups are likely to be statistically significant. The bar chart provides the primary comparison channel (bar height = mean); the error bars provide the uncertainty channel as an additive overlay rather than a separate chart.

What the alternative would break

A plain bar chart without error bars would answer "which group is highest" but not "is that difference real?" A box plot would show the full distribution more honestly (quartiles, median, outliers) but loses the direct mean-comparison that error bars preserve. Box plots are the better choice when the distribution shape matters; error bars are the better choice when the message is specifically about mean reliability and group difference significance.

A critical error flagged by the Data Visualisation Catalogue: never display error bars without labelling which measure they represent. SD, SE, and 95% CI bars on the same data have very different lengths — an unlabelled error bar is statistically meaningless.

The one design decision worth knowing

The cap width is set to 60% of the bar width — wide enough to be clearly readable as a range boundary, narrow enough not to be mistaken for an additional data series. The cap is the visual full stop that tells the eye "the range ends here." Without it, an error whisker reads as an arrow or an indefinite extension rather than a bounded interval.

// Framework — FT Visual Vocabulary

FT Visual Vocabulary category: Distribution / Ranges — showing the spread of values within a group alongside the central tendency. Abela quadrant: Comparison (comparing means across categories with uncertainty context). Tufte principle applied: every mark on the chart earns its place — the error bar adds a full second data dimension (uncertainty) to each existing mark without adding ink that duplicates information already present.