Confidence Intervals Explained: Meaning, Calculation and Real Data

Home › Research Methodology › Confidence Intervals Explained

Quick answerA confidence interval is a range of values that is likely to contain the true value you are estimating. A 95% confidence interval means that if you repeated the study many times, about 95% of the intervals calculated this way would contain the true value. Narrow intervals mean precise estimates; wide intervals mean more uncertainty.

Below, we explain confidence intervals in plain language and calculate them live on real data from ScholarsColab.

Confidence intervals at a glance

Term Plain meaning
Point estimate Your single best guess, such as 22% or a mean of 7.2
Confidence interval The range of plausible values around that guess
Confidence level Usually 95%; 99% gives a wider, more cautious range
Margin of error Half the width of the interval
What makes it narrower More data, and less variation in the data

Worked example: which research topics are rising, and how sure can we be?

We estimate the share of papers on five topics over time, each with a 95% confidence interval, notebook-style. Every result is calculated live, and you can run the same code yourself.

The data: 41,792 papers, mostly published between 1998 and 2026, by 967 ScholarsColab mentors (data updated 15 October 2026). The file you will load is anonymised: no paper titles, journal names or researcher identities.

Step 1: Load the data

In [1]:
import numpy as np
import pandas as pd
from datetime import date

# The ScholarsColab Research Methods Index (papers level): anonymised, updated daily
DATA = "https://scholarscolab.com/wp-json/scholarscolab/v1/research-methods-data?level=papers"
papers = pd.read_csv(DATA, comment="#")   # lines starting with # hold the citation

def p_text(p):
    return "< 0.001" if p < 0.001 else f"= {p:.3f}"

print(papers.shape)
papers.head()
Out [1]:
(41792, 15)
yearcitationsvenue_typevenue_grouptitle_wordstitle_colonreviewsystematicmachine_learningdeep_learningiotblockchaincovidsustainabilitydiscipline
02023.031journalOther journals12000000000Medicine & health
12024.024journalOther journals13000110000Medicine & health
22024.012journalOther journals16000000000Medicine & health
32024.09journalOther journals20010000000Medicine & health
42024.09journalGeneric "International Journal of"9000000000Medicine & health

Step 2: Calculate each topic’s share with a confidence interval

For each two-year period and each topic, we calculate the share of papers on that topic and a 95% Wilson interval, which works well for proportions, including small ones. Here are the results for deep learning:

In [2]:
from statsmodels.stats.proportion import proportion_confint

THIS_YEAR = date.today().year
start = THIS_YEAR - 11
recent = papers[papers["year"].between(start, THIS_YEAR)].copy()
recent["period"] = ((recent["year"] - start) // 2 * 2 + start).astype(int)
topics = ["deep_learning", "iot", "blockchain", "covid", "sustainability"]

rows = []
for period, grp in recent.groupby("period"):
    for t in topics:
        k, n = grp[t].sum(), len(grp)
        low, high = proportion_confint(k, n, method="wilson")
        rows.append({"period": f"{period}–{period + 1}", "topic": t,
                     "share %": 100 * k / n, "low %": 100 * low, "high %": 100 * high})
ci = pd.DataFrame(rows)
ci[ci["topic"] == "deep_learning"].round(2)
Out [2]:
periodtopicshare %low %high %
02015–2016deep_learning1.731.312.29
52017–2018deep_learning1.921.522.43
102019–2020deep_learning3.282.803.84
152021–2022deep_learning4.974.485.52
202023–2024deep_learning8.437.889.02
252025–2026deep_learning9.628.8910.40

Each row gives an estimate (share %) and a range of plausible values (low % to high %).

Step 3: Plot the trends with their confidence bands

In [3]:
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(9, 4.5))
for t in topics:
    d = ci[ci["topic"] == t]
    ax.plot(d["period"], d["share %"], marker="o", label=t)
    ax.fill_between(d["period"], d["low %"], d["high %"], alpha=0.2)
ax.set_ylabel("% of papers")
ax.legend()
plt.show()
Out [3]:
Topic trends with 95% confidence bands0.0%2.4%4.8%7.2%9.6%12.0%2015–20162017–20182019–20202021–20222023–20242025–2026deep_learningiotblockchaincovidsustainability% of papers
Lines show the share of papers on each topic; shaded bands are 95% confidence intervals. The latest period is still in progress.
How to read it: deep learning, IoT, blockchain and sustainability have clearly grown: their bands in the latest period sit entirely above their bands in the first. Some topics rose and then fell back: COVID-19 (peak in 2021–2022). Where bands overlap a lot, the data cannot tell the periods apart.

Step 4: Read the most recent period

In [4]:
latest = ci[ci["period"] == ci["period"].iloc[-1]]
for _, r in latest.iterrows():
    print(f"{r['topic']:<15} {r['share %']:5.2f}%  (95% CI {r['low %']:.2f}% to {r['high %']:.2f}%)")
Out [4]:
deep_learning    9.62%  (95% CI 8.89% to 10.40%)
iot              5.31%  (95% CI 4.76% to 5.91%)
blockchain       2.12%  (95% CI 1.78% to 2.52%)
covid            0.46%  (95% CI 0.32% to 0.67%)
sustainability   4.64%  (95% CI 4.13% to 5.21%)
For the most common topic, deep learning, the interval spans about 16% of the estimate; for the rarest, COVID-19, about 77%. With fewer papers on a topic, the estimate is less certain relative to its size.
Run this analysis yourself. Download the notebook and open it in Jupyter or Google Colab (File → Upload notebook). It loads the same anonymised ScholarsColab data, so your results will match this page.Download notebook (.ipynb) →Data files: papers.csv · mentors.csv

Confidence intervals vs p-values

A p-value only says whether an effect is likely to be zero. A confidence interval shows the size of the effect and how precisely it is known. That is why many journals now ask authors to report confidence intervals alongside, or instead of, p-values.

How to calculate and report a confidence interval

  1. Calculate your estimate (a mean, a proportion, a difference or a regression coefficient).
  2. Calculate its standard error, which depends on the variation and the sample size.
  3. Multiply the standard error by 1.96 for a 95% interval (for large samples), and add and subtract it from the estimate.
  4. For proportions, prefer the Wilson interval (used above), which works better near 0% or 100%.
  5. Report it as, for example, “12.5% (95% CI 10.1% to 15.2%)”.

Common mistakes reviewers point out

  • Saying there is a 95% chance the true value is in this interval; strictly, the 95% describes the method, not one interval.
  • Reporting estimates without any interval.
  • Using simple formulas for proportions near 0% or 100%, which can give impossible negative values.
  • Ignoring wide intervals when drawing strong conclusions from small samples.

Frequently asked questions

What does a 95% confidence interval mean?

If the same study were repeated many times, about 95% of the intervals calculated in the same way would contain the true value. In practice, it shows the range of plausible values for what you estimated.

What makes a confidence interval wider?

A smaller sample, more variation in the data, and a higher confidence level (such as 99% instead of 95%) all make the interval wider.

What is the margin of error?

The margin of error is half the width of the confidence interval: the amount added to and subtracted from the estimate.

How are confidence intervals related to p-values?

If a 95% confidence interval for a difference does not include zero, the difference is statistically significant at the 0.05 level.

Should I report confidence intervals in my thesis?

Yes. Reporting confidence intervals for your main estimates shows both the size of effects and how precisely they are known, which examiners and journals value.

Use this data in your own work

Use this data in your own research. Download the aggregated figures behind these charts (counts, medians and shares by type of paper, period, method and discipline) as a CSV file. Please cite it as:ScholarsColab (2026). ScholarsColab Research Methods Index [Data set]. Vidhilekha Soft Solutions Pvt Ltd. Retrieved 15 October 2026, from https://scholarscolab.com/research-methodology/. Licensed under CC BY 4.0.Download the data (CSV) →

More research methodology guides

About the data on this page. The ScholarsColab Research Methods Index is built from the Google Scholar publication lists of PhD researchers who mentor on ScholarsColab, and is updated daily as mentors and publications are added. Methods, designs and paper types are identified from titles, so papers whose titles do not mention them are not counted in those groups. The mentors are not a random sample of all researchers (engineering and computer science are strongly represented), so the figures describe this group of researchers and may not apply to research as a whole.