Section 18.1.11

Confidence intervals, whiskers, and uncertainty semantics

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:

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 n−1=99n - 1 = 99, is 100×22/99≈2.01\sqrt{100 \times 2^2 / 99} \approx 2.01 ms. The standard error is 2.01/100≈0.2012.01 / \sqrt{100} \approx 0.201 ms. The 95% Student t interval of the confidence interval entry multiplies the standard error by 1.984 for 100 observations: 10±1.984×0.201≈10±0.4010 \pm 1.984 \times 0.201 \approx 10 \pm 0.40 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 1000×0.95=9501000 \times 0.95 = 950 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 ee. Their 95% intervals overlap until the means differ by 2×1.96e=3.92e2 \times 1.96\,e = 3.92\,e, but the 95% interval for the difference, of half-width 1.962e≈2.77e1.96 \sqrt{2}\,e \approx 2.77\,e, excludes zero as soon as the means differ by more than 2.77e2.77\,e. 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).