Bayes Theorem

Bayes’ theorem is conditional probability rearranged so evidence can update belief. For events and with ,

Here is the hypothesis or event being updated, and is the observed evidence. The prior is multiplied by the likelihood , then divided by the evidence probability so the posterior is properly normalized.

For a partition , the denominator expands to

The events are mutually exclusive possibilities that cover the sample space. The denominator is the total probability of seeing the evidence under all possible hypotheses, weighted by their priors.

The denominator works because the partition the full probability space. It is not necessary to restrict the sample space to ; rather, every outcome belongs to exactly one , so the evidence event can be decomposed into disjoint slices :

Bayes theorem denominator shown as evidence mass sliced across a mutually exclusive, exhaustive partition of hypotheses.

That normalization is what prevents a high likelihood from overwhelming a low base rate. The theorem is the algebra behind Bayesian statistics, MAP estimation, and many diagnostic calculations built from conditional probability.

Worked scenario

Suppose 1 percent of a screening population has a disease. The test is highly sensitive, , but it also has a 5 percent false-positive rate, . Among 10,000 comparable people, about 100 are diseased and 9,900 are healthy. A positive result is expected for about diseased people and about healthy people, so

A positive test therefore moves the disease probability from 1 percent to about 16.7 percent, not 99 percent. The false-positive term is applied to the much larger healthy majority, which is what keeps the posterior low; for a sampling simulation of the same base-rate effect, see conditional probability.

Diagnostic-test Bayes example where the positive-test circle is larger than the condition circle, so false positives outnumber true positives.

In the diagram, the positive-test circle is larger than the condition circle because positives include both true positives and false positives. The overlap contains the 99 diseased people who test positive; the positive-only region contains the 495 healthy people who test positive. Bayes’ denominator counts both regions before asking what fraction of positives came from the condition circle.

Caveats

Bayes’ theorem is exact only relative to its model: the prior, sensitivity, specificity, and partition must describe the population being analyzed. Dependent pieces of evidence cannot be multiplied as if they were independent.

References