Ask Mallard

Bayesian analysis

A Bayesian analysis combines the evidence in the data with a stated prior belief to produce a probability distribution for the quantity of interest.

What question does this help answer?

The question clinicians actually ask, which is how likely it is that this treatment helps and by how much, rather than how surprising the data would be if it did nothing.

What is different

A frequentist confidence interval is a statement about a procedure: intervals built this way contain the truth 95 percent of the time. A Bayesian credible interval is a statement about the parameter: given the model, the prior and the data, there is a 95 percent probability the effect lies in this range. That is the interpretation people mistakenly give confidence intervals anyway, and the Bayesian version earns it by adding a prior.

How the prior shapes the posterior

Two panels with the same data. With a sceptical prior centred low, the posterior lies between the prior and the data. With an enthusiastic prior centred high, the posterior again lies between them but in a different place.A sceptical priorEffectPriorDataPosteriorAn enthusiastic priorEffectPriorDataPosteriorThe same data give different posteriors under different priors, which is why a credible analysis shows thesensitivity to the prior rather than one chosen posterior.
Conceptual diagram. It shows the structure of the idea, not data from any study.

The prior is the substance

  • A vague or weakly informative prior lets the data dominate, and often yields answers close to the frequentist ones.
  • A sceptical prior, centred on no effect, asks how strong the evidence must be to overturn doubt; it is a conservative and disciplined choice for a headline claim.
  • An enthusiastic prior does the opposite, and reporting only that one is how a Bayesian analysis loses its credibility.
  • An evidence-based prior built from previous trials is often the most defensible and requires justifying that those trials are relevant.
  • Report several. The range of conclusions across a sensible span of priors is the honest result.

Where it is most useful

In trials that are small or in rare diseases, where borrowing external information is unavoidable and better done explicitly. In adaptive designs, where the framework handles repeated looks naturally without spending a fixed error budget. And in re-analysing a trial that missed significance, to say what the data actually support rather than only that a threshold was not crossed, provided the priors are stated in advance of that re-analysis.

Why Mallard may recommend it

Mallard may suggest a Bayesian analysis when the sample is necessarily small, when relevant prior evidence exists, or when the decision the study informs is better served by a probability of benefit than by a p-value.

What to watch out for

The prior is a modelling choice with real consequences, and a Bayesian analysis is only as credible as its justification and the sensitivity analysis around it: reporting one posterior from one prior chosen without discussion is not more honest than a p-value, it is less. A credible interval is also not a confidence interval renamed. And Bayesian methods are not a way to rescue a null trial: computing a high probability of benefit from an enthusiastic prior after the fact is advocacy, not analysis.

Clinical example

Question: What does a trial that narrowly missed significance actually support? Analysis: Report the posterior probability that the effect exceeds a clinically meaningful threshold, under a sceptical prior, a vague prior and a prior built from the previous trials, and show how the conclusion moves across them.

Code for this method
Loading…
Recent studies that used this
Searching PubMed…
Related Learn pages
Sources & further reading
  1. Bayesian methodology for the design and interpretation of clinical trials in critical care medicine: a primer for clinicians (opens in a new tab) · Crit Care Med · doi 10.1097/CCM.0000000000000576
  2. A Gentle Introduction to the Comparison Between Null Hypothesis Testing and Bayesian Analysis: Reanalysis of Two Randomized Controlled Trials (opens in a new tab) · J Med Internet Res · doi 10.2196/10873
Last source review: 2026-09-06
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.