Home › Research Methodology › Confidence Intervals Explained
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
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()(41792, 15)
| year | citations | venue_type | venue_group | title_words | title_colon | review | systematic | machine_learning | deep_learning | iot | blockchain | covid | sustainability | discipline | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 2023.0 | 31 | journal | Other journals | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Medicine & health |
| 1 | 2024.0 | 24 | journal | Other journals | 13 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | Medicine & health |
| 2 | 2024.0 | 12 | journal | Other journals | 16 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Medicine & health |
| 3 | 2024.0 | 9 | journal | Other journals | 20 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Medicine & health |
| 4 | 2024.0 | 9 | journal | Generic "International Journal of" | 9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Medicine & 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:
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)| period | topic | share % | low % | high % | |
|---|---|---|---|---|---|
| 0 | 2015–2016 | deep_learning | 1.73 | 1.31 | 2.29 |
| 5 | 2017–2018 | deep_learning | 1.92 | 1.52 | 2.43 |
| 10 | 2019–2020 | deep_learning | 3.28 | 2.80 | 3.84 |
| 15 | 2021–2022 | deep_learning | 4.97 | 4.48 | 5.52 |
| 20 | 2023–2024 | deep_learning | 8.43 | 7.88 | 9.02 |
| 25 | 2025–2026 | deep_learning | 9.62 | 8.89 | 10.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
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()Step 4: Read the most recent period
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}%)")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%)
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
- Calculate your estimate (a mean, a proportion, a difference or a regression coefficient).
- Calculate its standard error, which depends on the variation and the sample size.
- Multiply the standard error by 1.96 for a 95% interval (for large samples), and add and subtract it from the estimate.
- For proportions, prefer the Wilson interval (used above), which works better near 0% or 100%.
- 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
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) →Need help applying this to your research?
Discuss your research problem with a PhD mentor, hand the whole project to a research project manager, or post your project and let matched experts apply.
Mentors whose published work uses this approach:
Avik SinhaXi'an Jiaotong-Liverpool University5 related papers · View profile →
Mahesh ChaudhariParas anti-drone Technologies PVT LTD 5 related papers · View profile →
Dr. Raghuraj Singh Harcourt Butler Technical University, Kanpur 8 related papers · View profile →
Moses EMETEREBowen University8 related papers · View profile →
