Definition
Whiskers, also called error bars, are line segments drawn above and below a plotted value. Identical whiskers can show the spread of individual observations or the uncertainty of an estimate such as their mean; only the caption says which. A 95% confidence interval §11.18, one kind of uncertainty whisker, is a range computed by a rule that, over repeated experiments, contains a fixed true value, such as the true mean of the measured process, in 95% of the experiments. It does not show where individual observations fall.
Where it fits
Main entry: Confidence interval (§11.18).
The confidence interval entry explains the repeated-sampling meaning in full; this entry is about reading whiskers. Four meanings are common:
the range, from the smallest to the largest observation;
the mean plus and minus one standard deviation §11.14, the typical distance of single observations from their mean;
the mean plus and minus one standard error §11.15, the standard deviation divided by for observations, which measures how much the mean itself varies from sample to sample;
a confidence interval, which for the mean of many observations is close to the mean plus and minus two standard errors.
A fifth convention belongs to the box plot, which draws a box from the 25th to the 75th percentile §11.16; its whiskers usually reach the most extreme observations within 1.5 box lengths beyond the box.
The meanings can differ greatly. Take 100 invented runs: 50 take 8 milliseconds (ms) and 50 take 12 ms. The mean is 10 ms and every run lies 2 ms from it, so the sample standard deviation, which divides the sum of squared distances by , is ms. The standard error is ms. The 95% Student t interval of the confidence interval entry multiplies the standard error by 1.984 for 100 observations: ms, from 9.60 to 10.40 ms. Range whiskers run from 8 to 12 ms and contain all 100 runs; the confidence interval contains none.
Limits and common mistakes
The 95% describes the rule, not one computed interval. If a whole experiment of independent runs were repeated 1000 times with a rule of exact 95% coverage, about of the intervals would contain the true mean; the exact count varies. One computed interval either contains the true mean or does not. The statement that the true value lies in this particular interval with probability 95% belongs instead to a Bayesian credible interval, which combines the data with a prior: a belief about the value stated before the data are seen.
Coverage needs the independence that the rule assumes. Timings repeated within one start-up of a device are usually correlated, so 100 timings from 5 start-ups treated as 100 independent observations give too narrow an interval; this error is pseudoreplication §11.6. A cluster bootstrap §11.21, which resamples whole start-ups, treats each start-up as one independent unit.
Overlap of two intervals is not a test. Take two independent means from large samples, each with standard error . Their 95% intervals overlap until the means differ by , but the 95% interval for the difference, of half-width , excludes zero as soon as the means differ by more than . Compute the interval for the difference itself; for paired measurements, from the per-pair differences.
Range whiskers make no coverage claim, and they never narrow as runs are added.
Questions answered
Does a 95% confidence interval contain 95% of the runs?
No: a 95% confidence interval does not contain 95% of the runs. It is a range for one fixed unknown quantity, usually the true mean of the measured process, computed by a rule that captures that quantity in 95% of repeated experiments. With independent runs of comparable variability, typical interval width decreases as the sample grows. One new extreme run can widen the realized interval. For example, adding a 100 ms observation to two identical 10 ms observations increases the sample standard error from zero to 30 ms. With 100 runs, half taking 8 milliseconds and half taking 12, the 95% interval for the mean of 10 milliseconds runs from about 9.60 to 10.40 milliseconds and contains none of the runs.
A range meant to contain a stated fraction of all runs, with a stated confidence, is a tolerance interval; a range meant to contain one future run with a stated probability is a prediction interval. Whiskers can show a confidence interval, a standard deviation, a standard error or the observed range, so read the caption before reading the whiskers.
Related entries: Variance and standard deviation (§11.14), Standard error (§11.15), Cluster bootstrap (§11.21), Pseudoreplication (§11.6).