P(disease) 1.0%
How common is the condition in the population?
P(test+ | disease) 99.0%
Sensitivity: when sick, % the test correctly says so.
P(test− | healthy) 95.0%
Specificity: when healthy, % the test correctly says so.
Population shown 10,000
Larger = smoother visualization; same math regardless.
P(disease | test+) = [P(test+ | disease) × P(disease)] ÷ P(test+)
Likelihood ratios: LR⁺ = sensitivity ÷ (1 − specificity) = - LR⁻ = (1 − sensitivity) ÷ specificity = -
LR⁺ > 10 = strong positive evidence. LR⁻ < 0.1 = strong negative evidence. Multiply prior odds by the likelihood ratio to obtain posterior odds. This is one standard odds form of Bayes rule.
Run a second test: For this idealized chain, assume the second result is conditionally independent of the first given the true condition and has the same sensitivity/specificity. Then the first posterior becomes the second prior.
Has disease (red) Healthy (green) Yellow ring = test + Blue ring = test −
If your test is POSITIVE, prob. you're actually sick:
-
If your test is NEGATIVE, prob. you're actually sick:
-
🌳 Show probability tree (alternative representation)
✨ Featured comparison
Featured comparison

Change the base rate before changing sensitivity or specificity. A strong test can still produce a surprising posterior when the condition is rare.

Run one scenario with a rare condition and one with a common condition, then compare posterior probability.

🧭 Visual explanation

Live state to watch
No state captured yet. Run or adjust the applet first.
Misread to avoid

📚 Lesson tour (5 steps)
Step 1/5: -

-

📝 Worksheet (3 questions)

Q1. Disease test. Set prior=1%, sensitivity=99%, specificity=99%. P(disease | positive) is closest to:

Q2. Hold sens=99%, spec=99%. Raise prior from 1% to 20%. P(disease | positive) goes:

Q3. Under the stated conditional-independence assumption, return to prior=1%, sens=99%, spec=99%. After ONE positive (posterior ≈ 50%), click "Test came back POSITIVE" to retest. After the SECOND positive, P(disease) is closest to:

🧪 Quick Assign · QA-BAYES-01 · 10–15 min
QA-BAYES-01 · Level 1 · 10–15 min
Base rates and false alarms

Predict how a positive result changes belief, adjust the prior and test characteristics, then explain the base-rate effect.

State snapshot appears here.
♿ Text and keyboard support

Text and keyboard support

Keyboard path

  • Use Tab and Shift+Tab to move through controls.
  • Use Enter or Space on buttons, and arrow keys on sliders or select controls.
  • The visual region is focusable and described by the state summary below.

Text state summary

Reduced motion and non-visual support

Reduced-motion settings are honored where possible. The current state is also available as text, so the main result does not depend only on color, animation, or spatial position.

Accessibility note: this layer gives a text equivalent for the applet state. It does not replace a full human screen-reader audit.