Toolstia / Bayes theorem calculator
Bayes theorem calculator
Bayes theorem tells you how to update the chance of something after you see evidence. Enter the starting chance, how often the evidence appears when it is true and how often when it is false, and get the updated chance plus a count out of 10,000 people.
Bayes theorem updates a starting chance (the prior) after seeing new evidence. A common example is a medical test: a positive result from a good test can still be more likely a false alarm than a real case when the condition is rare. This is for learning, not for medical decisions.
How it works
- Enter the prior chance of A.
- Enter the chance of B when A is true and when A is false.
- Read the posterior chance and the table of counts.
The formula
P(A given B) equals P(B given A) times P(A), divided by P(B). P(B) adds the true positives and the false positives.
Natural frequencies
The table imagines 10,000 people and counts how many fall in each case. Many people find this easier to follow than percentages.
Likelihood ratios
The positive ratio is how much more likely B is when A is true than when it is false. Multiply the starting odds by it to get the new odds.
Rare conditions
When A is rare, most positive results can be false alarms even for an accurate test. That is why the prior matters.
Questions
Is this uploaded anywhere?
Everything happens in your browser, and nothing you enter is sent anywhere.
Can I enter specificity instead?
Yes. Choose the specificity option and the tool uses 100 percent minus it as the false positive rate.
Is this medical advice?
No. It is a maths and learning tool and should not be used to make medical decisions.