About this tool
Applies Bayes' theorem to compute conditional probabilities from a prior probability, sensitivity, and specificity. Shows positive and negative predictive values, useful for interpreting diagnostic tests (medical, drug, antivirus) and for any problem where you need to update a belief based on new evidence.
How to use
- Enter the prevalence or prior probability (frequency of the condition in the population).
- Enter the test sensitivity (how many true positive cases it detects).
- Enter the specificity (how many true negative cases it correctly identifies).
- See the positive and negative predictive values.
Frequently asked questions
- What are positive and negative predictive values for?
- Positive predictive value is the probability you actually have the condition given that the test came back positive. Negative predictive value is the probability you don't, given a negative result. They're more useful in practice than sensitivity and specificity alone, because they answer what matters when you have a concrete result.
- Why can a very sensitive test produce many false positives?
- When a condition is rare in the population (low prevalence), even a test with 99% specificity generates many false positives in absolute terms, because there are so many true negatives that the 1% error accumulates. This is Bayes' paradox and is why screening tests must be interpreted carefully.
- How do I know which prevalence to use?
- Ideally from epidemiological studies. In medical diagnosis it varies a lot between populations: mass screenings use the general prevalence, whereas for a patient with specific symptoms the prior is higher (adjusted based on the clinical picture). Without real data, you can try several values to see how sensitive the result is.