Bayes's theorem

Bayes's theorem is a rule for calculating how evidence changes the probability of a hypothesis. It combines the hypothesis's prior probability with the probability of observing the evidence if the hypothesis is true, while accounting for how often that evidence occurs overall. The rule underlies Bayesian inference and helps explain why test results must be interpreted alongside base rates.

Last updated
19 October 2026
Confidence
High (97%)
Sources
4
Versions
2
This article was researched and drafted with AI assistance and checked by an automated review pass. It is not guaranteed to be accurate — verify important facts against the references below.

Statement and notation

For events H (a hypothesis) and E (observed evidence), with P(E) greater than zero, Bayes's theorem is:

P(H given E) = P(E given H) × P(H) / P(E).

Here P(H) is the prior probability assigned to the hypothesis before taking E into account; P(E given H) is the likelihood of observing E if H is true; and P(H given E) is the posterior probability of H after E is observed. The denominator P(E) is the probability of the evidence across all relevant possibilities. If H and its negation form an exhaustive pair, it can be written as P(E) = P(E given H)P(H) + P(E given not H)P(not H).

The theorem relates two different conditional probabilities. P(H given E), the probability of a hypothesis given evidence, is not generally equal to P(E given H), the probability of that evidence given the hypothesis. Bayes's theorem shows how to calculate the former from the latter and the prior probabilities.

Why prior probabilities matter

A positive test result, for example, can be evidence for a condition without making the condition likely in every tested person. The posterior probability depends both on how often the condition occurs beforehand and on the test's behavior among people with and without it. This is why sensitivity (the chance of a positive result when the condition is present) should not be confused with the probability that a person with a positive result has the condition.

An illustrative example in a peer-reviewed introduction assumes a condition affects 1 in 1,000 people, a test has no false negatives, and 5 percent of people without the condition receive a false positive. Among 10,000 people, this gives about 10 true positives and about 500 false positives; roughly 2 percent of positive results would correspond to the condition under those assumptions. The example is hypothetical: changing the prevalence or test characteristics changes the result.

This calculation does not make a diagnosis by itself. In practice, estimates of prevalence, test performance, and the population to which they apply must be supported by appropriate evidence.

Derivation and more than two possibilities

The rule follows from the definition of conditional probability. When P(E) and P(H) are nonzero, P(H given E) = P(H and E) / P(E), while P(E given H) = P(H and E) / P(H). Substituting the second relationship into the first gives Bayes's theorem.

For a set of mutually exclusive and exhaustive hypotheses H₁, H₂, …, the probability of one hypothesis after observing E is P(Hᵢ given E) = P(E given Hᵢ)P(Hᵢ) / Σⱼ P(E given Hⱼ)P(Hⱼ). The denominator adds the contributions from every hypothesis that could have produced the evidence. This form is useful when several explanations compete, rather than just H and not-H.

Bayesian inference and its limits

Bayesian inference applies the theorem to update probabilities or probability distributions as data are observed. In statistics, a prior represents information or assumptions before new data, a likelihood describes how the data arise under a model, and the posterior expresses the resulting uncertainty after updating. When new observations arrive, an analysis can update the previous posterior using the new evidence and an appropriate likelihood.

The theorem is a mathematical identity; it does not select a suitable prior, guarantee that a likelihood model is correct, or ensure that evidence is representative. Different defensible assumptions can produce different posterior results. A sound application therefore states its model and assumptions and tests whether its conclusions are sensitive to uncertain inputs. Bayes's theorem is used in fields including scientific inference and medical-test interpretation, but results remain conditional on the information and model supplied.

Key facts

Purpose
Calculates the probability of a hypothesis after evidence is observed, using prior probabilities and likelihoods.
Binary form
P(H given E) = P(E given H)P(H) / P(E), for P(E) greater than zero.
Prior probability
The probability assigned to a hypothesis before the evidence being analyzed is incorporated.
Posterior probability
The updated probability of the hypothesis given the observed evidence.
Important distinction
P(H given E) and P(E given H) answer different questions and are generally not equal.
Interpretation
The result depends on the prior, likelihood model, evidence, and the assumptions connecting them.

Ask about this article

Answers use only “Bayes's theorem” and its references, with citations.

References

  1. 1.
    Bayes’s theorem Definition & Example

    Encyclopaedia Britannica · other · reliability: high · retrieved 19 October 2026

    Supports: Overview of the theorem, its formula, prior and posterior probabilities, and an illustrative screening-test calculation.

  2. 2.
    Bayes’ Rule for Clinicians: An Introduction

    Frontiers in Psychology (available through PubMed Central, U.S. National Library of Medicine) · other · reliability: high · retrieved 19 October 2026

    Supports: Peer-reviewed explanation and derivation of the rule, including a clearly specified hypothetical base-rate example.

  3. 3.
    Tutorial for Metrologists on the probabilistic and statistical apparatus underlying the GUM and related documents

    National Institute of Standards and Technology · other · reliability: high · retrieved 19 October 2026

    Supports: Technical discussion of Bayes's formula, uncertainty, likelihoods, prior information, and sequential evidence.

  4. 4.
    Lecture 2: Conditioning and Bayes' Rule Probabilistic Systems Analysis and Applied Probability

    MIT OpenCourseWare · other · reliability: high · retrieved 19 October 2026

    Supports: University lecture covering conditional probability, the multiplication rule, total probability and Bayes's rule.

References are suggested by the research engine and may be incomplete. Unverified URLs are omitted rather than guessed.

Article history

  1. Version 219 October 2026 · EditorUpdated by Zapia
  2. Version 119 October 2026 · EditorCreated by Zapia