Ithy

Standard deviation, standard error and a confidence interval: one worked example

Use eight illustrative measurements to distinguish sample variability, uncertainty in a mean and a 95% t interval. Includes the complete data and assumptions.

Published 2026-10-23 · AI-assisted Ithy editorial. Primary references checked 2026-10-23. Original examples are labeled; this is not a named human expert review.

Standard deviation describes spread among observations. Standard error describes the sampling uncertainty of an estimator, such as a mean. A confidence interval combines an estimate, its standard error and a method-specific critical value. They answer different questions; a narrow interval for a mean does not say that individual measurements are almost identical.

The complete illustrative dataset

Use these eight hypothetical measurements in arbitrary units: 12, 13, 15, 14, 16, 11, 15, 14. They were created for this example, not measured from people, devices or a clinical study. Assume independent observations from a setting where a one-sample t interval for the mean is appropriate.

n = 8
mean = 13.75
sample standard deviation = sqrt(19.5 / 7) ≈ 1.6690
standard error of the mean = 1.6690 / sqrt(8) ≈ 0.5901

The squared deviations from 13.75 sum to 19.5. The sample variance divides by n−1, so using a population-standard-deviation function would answer a different calculation.

Build the 95% t interval

With seven degrees of freedom, a two-sided 95% t critical value is approximately 2.365. Following the NIST mean-interval formula:

mean ± t × standard error
13.75 ± 2.365 × 0.5901
≈ 13.75 ± 1.3956
≈ [12.3544, 15.1456]

Rounding at a different stage changes the final decimals slightly. Keep more precision internally than you display. The interval is a result of the assumed method and data; it is not a measured specification for a real system.

Interpret the three quantities

Each quantity has the same measurement unit but a different role
QuantityHereInterpretation
Sample SDAbout 1.67Spread among the eight illustrative observations.
Mean's standard errorAbout 0.59Estimated sampling uncertainty of the mean under the assumptions.
95% t intervalAbout 12.35 to 15.15An interval produced by a method with its stated repeated-sampling coverage under appropriate conditions.

A frequentist 95% confidence interval does not assign a 95% probability to the fixed population mean lying inside this particular realized interval. It also does not mean 95% of individual observations lie inside it. A prediction interval is a different construction.

Why more arithmetic cannot repair a poor sample

Dependence, selective sampling, measurement error, changing conditions and an unsuitable distribution can make a simple interval misleading. Repeated readings from the same drifting process are not automatically independent replicates. A very large biased sample can give a narrow interval around the wrong target.

Reproduce the example

from statistics import mean, stdev
from math import sqrt
x = [12, 13, 15, 14, 16, 11, 15, 14]
se = stdev(x) / sqrt(len(x))
margin = 2.365 * se
print(mean(x), stdev(x), se)
print(mean(x) - margin, mean(x) + margin)

This standard-library arithmetic was executed during editorial checking. The rounded critical value is supplied explicitly rather than estimated by that code. For a different error in interpreting evidence, compare correlation, causation and denominators.

Primary sources

Download the complete illustrative data as CSV and inspect the independent calculation record. These eight values were invented for explanation, not collected from people or a scientific experiment.

For a correction, send the specific claim and a supporting source through Ithy Help. Read our research methodology or more research guides.