Sandhya Indurkar

Math foundations

Bayes Theorem: Update Belief When New Evidence Arrives

Prior, likelihood, and posterior in Bayes theorem

The idea

You start with a prior: how common the event is before new data. A test or alert arrives. Bayes theorem tells you how to revise belief. The posterior is not the test accuracy alone. It blends how often the signal fires on true cases and false cases with the base rate.

Screening is the textbook case. High sensitivity means most sick patients test positive. That is P(positive | disease). Clinicians and reviewers need P(disease | positive), which is the reverse question and requires Bayes.

Bayes answers: After seeing evidence B, what is the updated chance of A?

Example: prior, likelihood, and posterior

Bayes combines what you believed before the signal with how often the signal appears when the event is true or false. Drag sliders to see P(disease | positive) update.

A positive test updates belief, but the prior base rate still sets the starting point.

Prior

2.0%

Posterior

19.5%

Bayes components

PriorLikelihoodPosterior2.0%95.0%19.5%

P(positive): true vs false

True pos 19.5%False pos 80.5%

P(Has disease | Positive test) = 19.5%. Prior was 2.0%; the positive signal raised belief, but 80.5% of positives are still false alarms at these rates.

The math

Bayes theorem

P(A | B) = P(B | A) P(A) / P(B)

Posterior equals likelihood times prior, divided by the overall rate of evidence B. All terms are probabilities between 0 and 1.

Law of total probability

P(B) = P(B | A) P(A) + P(B | not A) P(not A)

The denominator sums true positives and false positives across the population. This is the expanded form you use when only sensitivity and false-positive rate are known.

Odds form (optional)

odds(A | B) = odds(A) x LR

Likelihood ratio LR = P(B|A) / P(B|not A) multiplies prior odds. Same update, different bookkeeping when you think in odds instead of probabilities.

A simple application

When a fraud model fires, report the posterior chance of fraud given that alert, not just recall on known fraud. Include base rate and false-positive rate in the readout so reviewers know how many alerts to expect per true hit.

Build on conditional probability, base rates, and sensitivity-specificity. Bayes is the glue that turns those pieces into an updated belief.