Bayes' Theorem Visualization

Explore How Evidence Updates Our Beliefs

P(A|B) = P(B|A) · P(A) P(B)
Prior probability: belief before seeing evidence
Likelihood: probability of evidence if hypothesis is true
Evidence: total probability of seeing the evidence
Posterior probability: updated belief after seeing evidence

False Positive Paradox

A rare disease test has high accuracy, but if you test positive, the probability you actually have the disease may be much lower than you think. Let's see why.

0.01% 10%
50% 100%
0.1% 10%

When Test is Positive

9.0% Probability of Actually Having Disease

Calculation Process (based on 10,000 people):

1 Actually diseased people: 10 人
2 Test positive (true positives): ≈10 人
3 Healthy people: 9,990 人
4 False positives: ≈100 人
5 Total positive tests: ≈110 人
6 True disease among positives: 10 / 110 ≈ 9.0%

Population Distribution (10,000 people)

True Positive (Diseased & Test Positive)
False Negative (Diseased & Test Negative)
False Positive (Healthy & Test Positive)
True Negative (Healthy & Test Negative)

Probability Comparison

Bayesian Update Process

Adjust prior probability and likelihood to observe how posterior probability changes. This demonstrates the core mechanism of Bayesian reasoning: how new evidence updates our beliefs.

1% 99%

Initial belief before seeing evidence

1% 99%

Probability of evidence if hypothesis is true

1% 99%

Total probability of seeing evidence in all cases

Posterior Probability P(H|E)

80.0% Updated Belief

Formula Calculation:

Prior: P(H) = 50%
Evidence: P(E|H) = 80%
Normalization: P(E) = 50%
Posterior: P(H|E) = 80.0%

Set Relationship Diagram

Hypothesis H
Evidence E
P(H∩E)

Key Insights

Prior Matters

For rare events, even with high test accuracy, positive results may be mostly false positives. This is because the base rate is too low.

Evidence Updates Beliefs

Bayes' theorem provides a mathematical framework for how to rationally update our beliefs based on new evidence.

Power of Likelihood Ratio

When evidence is more likely under the hypothesis than under its negation (high likelihood ratio), the evidence has strong persuasive power.

Iterative Updating

Today's posterior can become tomorrow's prior, allowing us to continuously accumulate evidence and gradually approach the truth.