Build a confidence interval for an average from raw data or a summary, or for a proportion, and check whether a target value is consistent with your sample.
x̄ ± t × s ÷ √n
A confidence interval is a range of plausible values for a population figure, built from a sample by a method that captures the true value a set share of the time. A 95% interval method succeeds in 95 samples out of 100.
For an average, the interval is centred on the sample mean and stretches a t multiplier times the standard error each way. The t multiplier is larger than 1.96 for small samples, because the spread itself is uncertain.
An interval doubles as a test. Values outside a 95% interval are exactly those a two-sided t-test would reject at the 5% level, which is why the optional check above is useful.
As given in the NIST/SEMATECH e-Handbook, section 7.2.2.1, and Agresti & Coull (1998) for proportions. See Sources.
Wilson stays inside 0–100% and keeps close to its stated coverage for small samples, where the textbook p̂ ± z√(p̂(1 − p̂)/n) falls short.
1,000 g sits above the whole interval, so the filling line looks set a few grams light. The table below shows a 99% interval only just reaches 1,000 g, so the evidence is strong but not overwhelming.
The flour-bag sample at each level. More confidence buys a wider net.
| Level | t (df 9) | Interval (g) | Contains 1,000? |
|---|---|---|---|
| 80% | 1.383 | 993.8 to 997.6 | No |
| 90% | 1.833 | 993.2 to 998.2 | No |
| 95% | 2.262 | 992.6 to 998.8 | No |
| 99% | 3.25 | 991.3 to 1,000.1 | Yes |
95% is the convention. Use 99% when a wrong conclusion is costly, or 90% for early, exploratory work.
Because s is estimated from the sample. The t distribution allows for that extra uncertainty and approaches z as n grows.
Roughly symmetric without extreme outliers for small samples. For 30+ values the central limit theorem makes the t interval robust.
It has more reliable coverage than the textbook (Wald) interval, especially for small samples or results near 0% or 100%. Both are shown.
Collect more data. The width falls with √n, so four times the data halves the width.
The margin of error is half the interval’s width. The interval is the estimate plus and minus that margin.
Yes. In proportion mode, 25%, 0.25 and 1/4 all mean the same thing.
For a lower or upper bound only, use the two-sided interval at double the tail: a 90% two-sided interval gives a 95% one-sided bound.
Related Tools
Required sample size.
Survey accuracy measure.
Single parameter value.
Sampling variability.
Sample statistic distribution.
Sample vs population difference.