Durgical
EN
Open the app

Confidence interval

  • Measure

A range of values for the true value that are compatible with the data. The narrower it is, the more precise the estimate.

Updated

What it is

A 95% confidence interval (CI) is a range built so that, if the study were repeated many times, 95% of those intervals would contain the true value. It is roughly the estimate ± 1.96 standard errors. It reports the size of the effect and its precision at once, and it shows whether a result is statistically significant: for ratios (RR, OR) check whether it includes 1; for differences, whether it includes 0.

Formula and reading

  • 95% CI = estimate ± 1.96 × SE. A 99% CI uses 2.58 instead of 1.96.
  • For ratios the calculation is done on the log scale, so the CI is not symmetric around the RR or OR.
  • Null value: 1 for ratios, 0 for differences.

Worked example

  1. Data: in a survey of 400 adults in one town, 80 have hypertension.
  2. Proportion = 80 / 400 = 0.20 (20%).
  3. SE = √(0.20 × 0.80 / 400) = √0.0004 = 0.02.
  4. 95% CI = 0.20 ± 1.96 × 0.02 = 0.20 ± 0.039: 16.1% to 23.9% (rounded).
  5. Another study reports RR = 1.4 with a 95% CI of 0.9 to 2.2: it includes 1, so it is not significant at α = 0.05.
  6. A trial reports a risk difference of −3 percentage points, 95% CI −5 to −1: it excludes 0, so it is significant.
  7. Reading: the true prevalence is compatible with values between 16% and 24%; the width of the interval shows the precision.

How to read a 95% CI by type of measure

MeasureNull valueCI excluding the nullCI including the null
RR, OR or HR1E.g. 1.2 to 1.9: significant associationE.g. 0.8 to 1.6: not significant
Difference in means0E.g. 2 to 7: significant differenceE.g. −1 to 6: not significant
Risk difference0E.g. −6% to −2%: significant reductionE.g. −4% to 1%: not significant

Markers

  • 95% CI
  • SE
  • 1.96

Common pitfalls

  • Saying there is a 95% probability that the true value lies in this particular interval: the 95% refers to the method repeated many times.
  • Concluding ‘no effect’ because the CI includes the null: a wide CI that includes 1 is also compatible with a large effect.
  • Comparing two groups only by whether their CIs overlap: they can overlap slightly and still differ with p < 0.05.

Test yourself

Think of the answer, then tap the question to see it.

An OR of 2.1 has a 95% CI of 0.8 to 5.4. Is it statistically significant?

Not at α = 0.05: the interval includes 1, the null value for a ratio. The result is imprecise and compatible with no effect or a large one.

What null value applies to a difference in means?

Zero: if the 95% CI includes 0, the difference is not significant.

What makes a confidence interval narrower?

A larger sample, less variability in the data or a lower confidence level.

How does a 95% CI relate to the p value?

If the 95% CI excludes the null value, the two-sided p value is below 0.05; if it includes it, p is above 0.05.

Add to my cards (4)

Connections

← All of epidemiology

Educational content on epidemiological and statistical methods; the examples use made-up numbers to teach the calculation. Not a clinical or legal guide: current Colombian rules are in the official sources.

Sources: What are confidence intervals? (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012); What is the relationship between a test and a confidence interval? (NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology, 2012); Chapter 15: Interpreting results and drawing conclusions (Cochrane, 2024).

Spotted a mistake?We are always improving for the community. Tell us what is wrong and our team will review it.Report a mistake

Representative model, for educational purposes only.