Author-reviewedEvidence: highv1.0.1

Bayes Theorem

Bayes theorem is the rule that updates a prior probability with new evidence to give a posterior probability, used for diagnostic tests and model inputs.

Last reviewed byDr Darrin Baines

Concept Architecture

Bayes Theorem from Diagnostic Tests to Probabilistic Decision Models

Bayes' theorem converts the probability of evidence given a hypothesis into the probability of the hypothesis given that evidence. In health economics it explains why the same test result means different things in different populations, and it is the rule by which prior information and new data can be combined into parameter distributions for decision models. The theorem itself is an uncontroversial piece of probability theory; debate has centred on particular uses of it, notably the choice of prior. Its two main uses in health technology assessment are interpreting diagnostic tests and updating model parameters for evidence synthesis and probabilistic sensitivity analysis. Prior choice, computation and the wider Bayesian approach are covered on the Bayesian analysis page.

The rule and why the conditioning must be reversed

The theorem follows directly from the definition of conditional probability. Thomas Bayes's essay on the doctrine of chances was published after his death, in 1763, and the result now carries his name. For a hypothesis HH (for example, "this patient has the disease") and observed evidence EE (for example, "the test is positive"), the theorem reads as follows.

P(H∣E)=P(E∣H) P(H)P(E),P(E)=P(E∣H) P(H)+P(E∣Hˉ) P(Hˉ)P(H \mid E) = \frac{P(E \mid H)\,P(H)}{P(E)}, \qquad P(E) = P(E \mid H)\,P(H) + P(E \mid \bar{H})\,P(\bar{H})

where P(H)P(H) is the prior probability of the hypothesis before the evidence is seen, P(E∣H)P(E \mid H) is the probability of the evidence if the hypothesis is true, P(E∣Hˉ)P(E \mid \bar{H}) is the probability of the same evidence if it is false, P(E)P(E) is the overall probability of the evidence, and P(H∣E)P(H \mid E) is the posterior probability. The denominator counts every route by which the evidence could arise, including the routes where the hypothesis is false.

The practical point is that P(E∣H)P(E \mid H) and P(H∣E)P(H \mid E) are different quantities. A trial or accuracy study usually reports the first; a clinician, payer or modeller usually needs the second. Spiegelhalter and colleagues put the contrast as two different questions, how likely the data are given a parameter value, and how likely a parameter value is given the data.

The odds form and likelihood ratios

Writing the theorem in odds removes the denominator and gives a form that is easy to apply. The same evidence term then works for any starting probability. Dividing the posterior for HH by the posterior for its complement shows that posterior odds equal prior odds multiplied by the likelihood ratio.

posterior odds=prior odds×LR,LR+=sensitivity1−specificity\text{posterior odds} = \text{prior odds} \times \text{LR}, \qquad \text{LR}^{+} = \frac{\text{sensitivity}}{1 - \text{specificity}}

where odds are p/(1−p)p/(1-p) for a probability pp, LR is the likelihood ratio for the observed result, and LR+\text{LR}^{+} is the positive likelihood ratio for a binary test. Deeks and Altman describe the likelihood ratio as the ratio of the probability of a given result in people with the disease to its probability in people without it, and they present the multiplication of pretest odds by this ratio as an application of Bayes' theorem. A likelihood ratio above 1 moves the probability up, below 1 moves it down, and values above 10 or below 0.1 are usually taken as strong evidence to rule a diagnosis in or out.

Diagnostic testing, where prevalence sets the prior

In diagnostic and screening evaluations the prior is the pre-test probability, often the prevalence in the tested population, and the posterior is the post-test probability. Sensitivity and specificity describe how disease status predicts the test result. The positive predictive value and negative predictive value describe the reverse, and Bayes' theorem links the two pairs through prevalence.

This is why predictive values from one study travel poorly. Deeks and Altman note that predictive values depend on the prevalence in the study sample and can rarely be generalised beyond it, while likelihood ratios can be combined with different prior probabilities from different settings. For an economic model of a test strategy, the consequence is that the numbers of true and false positives, and therefore the downstream treatment, confirmation and harm costs, must be recalculated for the prevalence of the population in the decision problem.

Worked example of one test in two settings (illustrative)

The numbers below are hypothetical and chosen for arithmetic clarity. A test with sensitivity 0.90 and specificity 0.95 is used in two settings, population screening with prevalence 0.02 and a symptomatic clinic with prevalence 0.20. Every positive result triggers a confirmatory test costing GBP 150.

For the screening setting, Bayes' theorem gives the following.

P(D∣+)=0.90×0.020.90×0.02+0.05×0.98=0.0180.067=0.2687P(D \mid +) = \frac{0.90 \times 0.02}{0.90 \times 0.02 + 0.05 \times 0.98} = \frac{0.018}{0.067} = 0.2687

where DD is disease, ++ is a positive result, 0.90 is the sensitivity, 0.05 is one minus specificity and 0.98 is the probability of not having the disease. The odds form agrees. Prior odds are 0.02/0.98 = 0.02041, the positive likelihood ratio is 0.90/0.05 = 18, posterior odds are 18 × 0.02041 = 0.3674, and the posterior probability is 0.3674/1.3674 = 0.2687.

Per 10,000 people tested, the two settings compare as follows.

Quantity per 10,000 testedScreening (prevalence 0.02)Clinic (prevalence 0.20)
People with disease2002,000
True positives (0.90 of diseased)1801,800
False positives (0.05 of non-diseased)490400
All positives6702,200
Positive predictive value180/670 = 0.2691,800/2,200 = 0.818
Confirmation cost (GBP 150 per positive)GBP 100,500GBP 330,000
Confirmation cost per true caseGBP 558GBP 183

The test's accuracy is identical in both columns, yet only about 27% of screening positives have the disease against about 82% in the clinic. Most of the screening confirmation budget is spent on false positives, so the cost per true case confirmed is about three times higher. A cost-effectiveness model of a screening programme would carry this through to treatment, anxiety and follow-up costs, which is why accuracy figures alone do not settle whether a test strategy is good value.

Updating model parameters for evidence synthesis and PSA

The same rule applies when the unknown is a model parameter rather than a diagnosis. Probabilities are then attached to every possible value of the parameter, not to a single yes or no hypothesis. Spiegelhalter and colleagues describe how a prior distribution expressing the relative plausibility of values of an unknown quantity, such as a treatment effect, is combined with study evidence to form a posterior that is proportional to the prior multiplied by the likelihood.

p(θ∣y)∝p(y∣θ) p(θ)p(\theta \mid y) \propto p(y \mid \theta)\,p(\theta)

where θ\theta is the parameter, yy the observed data, p(θ)p(\theta) the prior distribution, p(y∣θ)p(y \mid \theta) the likelihood and p(θ∣y)p(\theta \mid y) the posterior distribution. The constant omitted from this expression is p(y)p(y), the counterpart of P(E)P(E) in the event form.

This matters for health technology assessment because the posterior is itself a distribution that a model can sample from. The NICE manual (PMG36, section 4.7.10) asks that distributions for probabilistic sensitivity analysis represent the available evidence on each parameter rather than being chosen arbitrarily, and section 4.7.12 states that the committee's preferred cost-effectiveness estimate should come from a probabilistic analysis when possible unless the model is linear. NICE DSU Technical Support Document 2 explains that, in Bayesian evidence synthesis by Markov chain Monte Carlo, sampling from the posterior serves both for inference and for the Monte Carlo approach to probabilistic modelling, and it keeps the correlation between parameters estimated from the same data. Hierarchical models for Bayesian meta-analysis and network meta-analysis apply Bayes' theorem to many parameters at once.

Worked example of updating an event probability (illustrative)

For a single probability with binomial data there is a closed-form answer. This is the usual case for a transition or event probability estimated from counts. A beta distribution prior is conjugate for a binomial likelihood, so the posterior is also beta.

θ∣y∼Beta(α+y, β+n−y),E(θ∣y)=α+yα+β+n\theta \mid y \sim \text{Beta}(\alpha + y,\ \beta + n - y), \qquad E(\theta \mid y) = \frac{\alpha + y}{\alpha + \beta + n}

where θ\theta is the event probability, α\alpha and β\beta are the prior parameters, yy is the number of events and nn the number of patients observed. The posterior mean always lies between the sample proportion and the prior mean.

In a hypothetical Markov model, earlier registry evidence on the annual probability of hospital admission is summarised as Beta(4, 36), with mean 4/40 = 0.10. A new cohort records 30 admissions among 150 patients, a proportion of 30/150 = 0.20. The posterior is Beta(4 + 30, 36 + 120) = Beta(34, 156), with mean 34/190 = 0.179. Each probabilistic iteration of the model then draws the admission probability from Beta(34, 156) instead of fixing it at one value. The posterior sits closer to the new data because the cohort contributes 150 observations against a prior equivalent to a much smaller amount of information; a sceptical reviewer could rerun the analysis with a weaker or stronger prior and compare the cost-effectiveness results. For more than two mutually exclusive transitions, the Dirichlet distribution plays the same role as the beta, and Briggs, Ades and Price show that a Bayesian prior also handles transitions with zero observed counts.

What the theorem settles and what it leaves to judgement

Bayes' theorem is an exact identity, so disagreements about a Bayesian result are disagreements about its inputs. The prior, the likelihood model and the definition of the population all have to match the decision problem. A posterior probability of disease, or a posterior distribution for a treatment effect, becomes a decision only when combined with costs and outcomes in a cost-effectiveness analysis; Spiegelhalter and colleagues describe this combination with utilities as a formal decision analysis. Where remaining uncertainty is costly, the same posterior feeds value of information analysis.

Nearby ideas are easily confused. Bayesian analysis is the whole inferential approach built on the theorem; the theorem is the single rule at its centre. A frequentist confidence interval is not a statement of posterior probability, whereas a credible interval is. The likelihood ratio in diagnosis is the evidence term of the theorem, not a probability of disease.

Limitations and common misreadings

The commonest error is to read sensitivity as the probability of disease after a positive test, which ignores the prior and overstates the positive predictive value in low-prevalence settings. A second error is to multiply likelihood ratios from several tests in sequence as though their results were independent given disease status; correlated tests then overstate the evidence. A third is to transfer accuracy figures between settings without checking them. The NICE manual (PMG36, section 4.7.18) notes that sensitivity and specificity are usually correlated and may vary with how a test is used or interpreted, so point estimates with distributions are not usually appropriate for them in a probabilistic model.

For parameter updating, the main limitation is the prior. The Spiegelhalter review of Bayesian methods in health technology assessment concludes that the prior is important and not unique, so a range of priors should be examined in a sensitivity analysis. Evidence already used to build the prior should not be counted again in the likelihood. Conjugate priors are a convenience. Where the available information does not fit the beta shape, a more realistic prior may be needed even if the posterior then has to be computed by simulation.

Sources

  • Bayes T. An essay towards solving a problem in the doctrine of chances. Philosophical Transactions of the Royal Society of London. 1763:370-418. doi:10.1098/rstl.1763.0053
  • Briggs AH, Ades AE, Price MJ. Probabilistic sensitivity analysis for decision trees with multiple branches: use of the Dirichlet distribution in a Bayesian framework. Medical Decision Making. 2003;23(4):341-350. doi:10.1177/0272989X03255922
  • Deeks JJ, Altman DG. Diagnostic tests 4: likelihood ratios. BMJ. 2004;329(7458):168-169. doi:10.1136/bmj.329.7458.168
  • Dias S, Welton NJ, Sutton AJ, Ades AE. NICE DSU Technical Support Document 2: A generalised linear modelling framework for pairwise and network meta-analysis of randomised controlled trials. Decision Support Unit; 2011, last updated September 2016. Sections 1 and 7.1.
  • Gelman A, Carlin JB, Stern HS, Dunson DB, Vehtari A, Rubin DB. Bayesian Data Analysis. 3rd ed. Boca Raton: Chapman and Hall/CRC; 2013. Sections 1.3 and 2.4.
  • National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36). London: NICE; 2022, last updated 13 October 2026. Sections 4.7.10, 4.7.12 and 4.7.18. https://www.nice.org.uk/process/pmg36/chapter/economic-evaluation-2
  • Spiegelhalter DJ, Myles JP, Jones DR, Abrams KR. An introduction to Bayesian methods in health technology assessment. BMJ. 1999;319(7208):508-512. doi:10.1136/bmj.319.7208.508
  • Spiegelhalter DJ, Myles JP, Jones DR, Abrams KR. Bayesian methods in health technology assessment: a review. Health Technology Assessment. 2000;4(38). doi:10.3310/hta4380

Library

Publications

6
  • Journal article

    Diagnostic tests 4: likelihood ratios — Deeks JJ, Altman DG, Vol. 329, No. 7458, pp. 168-169 ed., 2004 (BMJ)

    Statistics note on likelihood ratios, cited for post-test odds equal to pre-test odds times the likelihood ratio, the positive likelihood ratio as sensitivity divided by one minus specificity, ratios above 10 or below 0.1 as strong evidence, and predictive values depending on prevalence while likelihood ratios adapt to different prior probabilities.

  • Journal article

    Bayesian methods in health technology assessment: a review — Spiegelhalter DJ, Myles JP, Jones DR, Abrams KR, Vol. 4, No. 38 ed., 2000 (Health Technology Assessment)

    Journal article listed in the Sources of the HealthEconomics.wiki Concept Architecture articles on Bayesian Analysis CEA and Bayes Theorem, where it is cited as a reference for that concept.

  • Journal article

    An introduction to Bayesian methods in health technology assessment — Spiegelhalter DJ, Myles JP, Jones DR, Abrams KR, Vol. 319, No. 7208, pp. 508-512 ed., 1999 (BMJ)

    Introduction to Bayesian methods in health technology assessment, cited for Bayes' theorem being uncontroversial probability theory whose particular uses have been debated, its origin in a posthumous publication of 1763, the contrast between how likely the data are given a parameter and how likely a parameter is given the data, and posterior distributions combined with utilities in decision analysis.

  • Journal article

    An essay towards solving a problem in the doctrine of chances — Bayes T, pp. 370-418; communicated by Richard Price ed., 1763 (Philosophical Transactions of the Royal Society of London)

    Thomas Bayes's essay, published after his death and communicated to the Royal Society by Richard Price, cited as the posthumous publication of 1763 from which Bayes' theorem takes its name.

  • Book

    Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)

    A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.

  • Book

    Bayesian Theory — José M. Bernardo & Adrian F. M. Smith, 1st Edition ed., 1994 (John Wiley & Sons)

    A comprehensive theoretical account of Bayesian inference, prior and posterior distributions, probability, information and statistical decision theory.

Frequently Asked Questions (6)

  • How does Bayes' theorem update a belief with new evidence?

    Bayes theorem is the rule that updates a prior probability with new evidence to give a posterior probability, used for diagnostic tests and model inputs.

    Source: Spiegelhalter et al. 1999

  • What is Bayes' theorem?

    In probability theory, Bayes' theorem gives the rule for turning the probability of some evidence under a hypothesis into the probability of the hypothesis once that evidence has been seen. It follows directly from the definition of conditional probability and was published after Thomas Bayes's death, in 1763. Spiegelhalter and colleagues describe the result itself as simple and uncontroversial, noting that two centuries of debate have concerned particular uses of it. In health economics the theorem underlies the interpretation of diagnostic tests and the Bayesian updating of model parameters.

    Source: Spiegelhalter et al. 1999

  • How does Bayes' theorem work?

    The theorem multiplies a prior probability by the likelihood of the observed evidence and then rescales the product so that the probabilities sum to one. For a hypothesis H and evidence E, the posterior P(H|E) equals P(E|H) multiplied by P(H), divided by P(E). The denominator counts every route by which the evidence could arise, including those where the hypothesis is false. Spiegelhalter and colleagues describe the same operation for a whole distribution, in which the prior and likelihood curves are multiplied together and the result is scaled to an area of one to give the posterior.

    Source: Spiegelhalter et al. 1999

  • Why is Bayes' theorem important?

    Most studies report how likely the data are given a particular state of the world, such as the chance of a positive test in someone with the disease, whereas clinicians and modellers usually need the reverse. Spiegelhalter and colleagues set out this contrast as two different questions, and Bayes' theorem is the rule that converts one into the other. Reading sensitivity as the probability of disease after a positive result ignores the prior and overstates the predictive value of a test in low-prevalence settings. The theorem also allows direct probability statements about a treatment effect, which P values and confidence intervals cannot provide.

    Source: Spiegelhalter et al. 1999

  • How is Bayes' theorem applied in health and statistics?

    Diagnostic testing is the most familiar application, since a prior belief about disease, based on prevalence and symptoms, is revised by the test result. The same positive result therefore means different things in population screening and in a symptomatic clinic. Spiegelhalter and colleagues extend the logic to less tangible unknowns, such as the average survival benefit of one drug over another, where a prior distribution is combined with trial evidence. Hierarchical models apply the theorem to many parameters at once in meta-analysis, and the resulting posterior can be combined with measures of utility in a formal decision analysis.

    Source: Spiegelhalter et al. 1999

  • What is the role of prior and posterior in Bayes' theorem?

    The prior summarises what is believed about an unknown before the new evidence is considered, and the posterior is the revised belief once the evidence, through the likelihood, has been combined with it. Spiegelhalter and colleagues describe the prior as a summary of evidence external to a trial, while the posterior pools that external evidence with the trial's own results. Because the posterior depends on the prior, analysts often report results under more than one, using archetypal sceptical and enthusiastic priors to represent extreme opinions in sensitivity analyses. Evidence already used to build the prior should not be counted again in the likelihood.

    Source: Spiegelhalter et al. 1999

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 27 Oct 2026

Content version: 1.0.1

Canonical Identity

Term code
HE-ES-RM-008
Wikidata
Q182505

Stable URI · Machine-readable · Resolvable · CC BY 4.0