Bayes' theorem: change disease frequency, test sensitivity, and specificity in a rare disease test; see the probability that someone with a positive result actually has the disease in a population diagram of 10 000 people
Return to simulation
Explore probability calculations and the logic of the test paradox interactively with the Bayes' theorem simulation. This interactive tool allows you to visualize conditional probability by modifying parameters such as disease prevalence, test sensitivity, and specificity on a 10 000 person population chart. As you learn step-by-step this theorem, which is critical especially in medicine and data science, you will strengthen your mathematical intuition.
What can you do in this simulation?
You can set the prevalence rate to 1 percent, 10 percent, or 50 percent.
You can calculate the probability that someone with a positive result on the population chart is actually sick.
You can answer questions by dragging and dropping or tapping the cards into their corresponding boxes.
You can check your correct and incorrect answers instantly by proceeding with the guide.
You can reset the simulation using the Start Over button and retry different scenarios.
Basic concepts and formulas
Bayes' theorem is used to update the probability of an event occurring in light of new evidence or information. Its basic formula is P(A|B) = P(B|A) · P(A) / P(B). The population chart used in the simulation visualizes True Positive (TP), False Positive (FP), True Negative (TN), and False Negative (FN) values, concretizing the logic of conditional probability.
How to use?
Open the simulation screen and follow the guide steps.
Observe how the distribution in the population chart is affected by changing the prevalence percentage.
To answer the questions, tap or drag and drop the cards into the correct boxes.
Save your guess and test its accuracy by pressing the Check Results button.
Move on to the next steps using the Next button and review your shortcomings.
Frequently asked questions
Where is Bayes' theorem used in daily life?
Bayes' theorem is used to make decisions wherever uncertainty is involved, from diagnostic accuracy in medical tests to AI spam filters.
Is everyone who tests positive actually sick?
No, not everyone who gets a positive result may be sick, especially in rare disease tests where the false positive rate can be high.
How does the population chart help me understand probability?
Visualizing sick and healthy individuals over a population of 10 000 people turns abstract formulas into concrete numbers.