Statistics & Data Science · pattern A, Numeric fields
Enter a prior, a true positive rate and a false positive rate to get the posterior probability — the calculation that explains why most positive results on a rare condition are false.
P(A|B) = P(B|A)P(A) ÷ [P(B|A)P(A) + P(B|¬A)P(¬A)]
The denominator is the total probability of the evidence, from both the true and the false positive routes. Forgetting the second route is the classic error.
0.166667
With a base rate of one in a hundred, a test that catches 99% of cases and falsely flags 5% of healthy people produces 990 true positives and 4,950 false ones per 100,000 people. A positive result therefore carries about a 17% chance of being real. Nothing is wrong with the test; the arithmetic is dominated by the size of the healthy group, and ignoring the base rate is the single most common probability error in professional practice.
If the number is not the part you are stuck on, that is what the service is for — a specialist who explains the working, not just the answer.
Statistical output here is for coursework and learning. Reported p-values and intervals assume the conditions stated on the page; nothing here checks whether those conditions hold for your data.