Skip to content

Frequentist or Bayesian? One model, two answers

The same logistic regression fitted the frequentist and the Bayesian way: what a confidence interval, a p-value, a credible interval and a posterior probability each mean, why the two can disagree near the line, and a methods paragraph that reports both.

Tesfahun Mulatu · 8 November 2026 · 6 min read

Most health research is analysed the frequentist way: odds ratios with 95% confidence intervals and p-values. Bayesian analysis is now easy to run too, and reviewers increasingly ask about it. The two are not rivals. They answer slightly different questions, and on the same data they usually agree. This guide fits one model both ways, shows where they part, and ends with how to report both.

Two ways to read the same data

FrequentistBayesian
The effectOne fixed, unknown numberUncertain, described by a distribution
What goes inThe dataThe data and a prior (what was known before)
The interval95% confidence interval95% credible interval
What the interval meansIf the study were repeated many times, 95% of such intervals would contain the true valueGiven the data and the prior, there is a 95% probability the value lies in it
The extra numberp-value: how surprising the data would be if there were no effectPosterior probability: how likely an effect in a given direction is

The most common mistake is reading a confidence interval the Bayesian way ("a 95% chance the odds ratio is between 0.21 and 1.02"). That sentence belongs to a credible interval. The second most common is reading p = 0.056 as "no effect".

The example: one model, fitted both ways

The data are simulated: a malaria survey of 420 households. From it I drew a random sample of 150, stratified by residence (Rural 104, Urban 46, seed 97438), to show what happens in a smaller study. The outcome is a positive malaria rapid test (39 of 150). The factors are residence, age, sleeping under a bed net and indoor spraying in the last 12 months.

The same multivariable model, fitted by maximum likelihood (frequentist) and by Bayesian logistic regression with weakly informative priors:

FactorAOR (95% CI)p-valueAOR (95% CrI)P(AOR > 1)Same conclusion
Residence: Urban (vs Rural)0.41 (0.16, 1.02)0.0560.39 (0.14, 0.96)0.021No
Age, per year0.99 (0.96, 1.02)0.5330.99 (0.96, 1.02)0.251Yes
Slept under a bed net: Yes0.46 (0.21, 1.02)0.0560.46 (0.20, 0.97)0.021No
Indoor spraying: Yes0.60 (0.26, 1.38)0.2290.59 (0.25, 1.35)0.103Yes

"Same conclusion" means both intervals exclude 1, or both include it.

Why they disagree here, and why it matters less than it looks

Look at the bed net row. The frequentist result is "not significant": p = 0.056, and the confidence interval just reaches 1.02. The Bayesian result says the credible interval ends at 0.97, and the probability that bed nets are protective is 1 − 0.021 = 97.9%.

It is tempting to say the Bayesian analysis "found" an effect the frequentist one missed. That is the wrong lesson. The two intervals are almost the same width (the credible interval is 0.99 to 1.04 times as wide as the confidence interval), so the weak prior added very little. The estimates are nearly identical too. What differs is which side of an arbitrary line each interval ends on: 1.02 against 0.97.

Both analyses are telling the same story: bed net use is probably protective, the sample is small, and the estimate is imprecise. The real problem is the habit of cutting results into "significant" and "not significant". Near the line, a small change in method, prior or sample can tip the label. That is why the American Statistical Association advises against basing conclusions on whether p crosses 0.05 (Wasserstein and Lazar, 2016).

For age and indoor spraying, both approaches agree: the data are compatible with no effect.

When a Bayesian analysis helps

  • There is earlier evidence. A prior from a previous survey or a meta-analysis lets you build on it rather than start from zero. Say where the prior came from.
  • The sample is small or a category is sparse. Weakly informative priors keep odds ratios sensible when a cell has few cases, where maximum likelihood can give huge or infinite estimates (Gelman et al., 2008).
  • You want a direct probability. "A 97.9% probability that bed nets are protective" is often what programme managers and policymakers want to know.

When the frequentist analysis is enough

  • Large samples. With hundreds of events and weak priors, the two give practically the same numbers.
  • Your university, journal or protocol expects it. Report it as the main analysis, and add the Bayesian one as a sensitivity analysis if it helps.
  • Survey weights, clusters and strata. Design-based (weighted) frequentist analysis is the standard for DHS-type surveys. Bayesian models can handle complex designs, but not as simply.

How to report both

Methods:

Factors associated with a positive malaria test were examined with multivariable binary logistic regression, reported as adjusted odds ratios (AOR) with 95% confidence intervals. As a sensitivity analysis, the same model was fitted as a Bayesian logistic regression with weakly informative normal priors on the coefficients (rstanarm defaults), using 4 chains of 1,000 draws after warm-up; convergence was checked with R̂ (all below 1.01). Posterior medians are reported with 95% credible intervals and the posterior probability of each effect's direction.

Results:

Sleeping under a bed net was associated with lower odds of malaria (AOR 0.46, 95% CI 0.21 to 1.02, p = 0.056). In the Bayesian analysis, the 95% credible interval was 0.20 to 0.97, with a 97.9% posterior probability of a protective effect.

Give both numbers and let the reader see the uncertainty. Do not switch methods after seeing which one gives the answer you hoped for: decide in the protocol, and say so.

Doing it in Researchite

  1. Open the study's Quantitative → Data and analysis and load the data.
  2. Optional: Select cases keeps the rows where a condition is true, or draws a random sample (seeded, and stratified if you want).
  3. Analyze → Regression: choose the outcome and the factors, then Bayesian logistic as the model. Keep the default weakly informative priors, or set your own.
  4. Under the results, Frequentist and Bayesian, side by side fits the same model both ways and marks where the conclusions differ. Download it in Word or CSV.
  5. Commands for Stata, R and SPSS gives the same model as code (rstanarm in R, the bayes prefix in Stata) to check or rerun.

References

  • Gelman A, Jakulin A, Pittau MG, Su YS. A weakly informative default prior distribution for logistic and other regression models. Annals of Applied Statistics. 2008;2(4):1360–1383.
  • Greenland S, Senn SJ, Rothman KJ, et al. Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations. European Journal of Epidemiology. 2016;31(4):337–350.
  • Wasserstein RL, Lazar NA. The ASA statement on p-values: context, process, and purpose. The American Statistician. 2016;70(2):129–133.
Tesfahun Mulatu, photo

Tesfahun Mulatu

Epidemiologist and biostatistician with more than 10 years in academia and research, including multi-country and mixed-methods studies with local and international research institutions, and monitoring, evaluation and learning across Ethiopia’s development and humanitarian sectors on projects funded by UN agencies and international donors. Tesfahun’s work spans maternal and child health, sexual and reproductive health, gender-based violence and mental health, with over 19 publications.

Epidemiologist and biostatistician, founder of Researchite · LinkedIn

More guides