Formula and example
How it is calculated
P(A|B)=P(A)P(B|A)/[P(A)P(B|A)+(1−P(A))P(B|not A)].
Worked example
For P(A)=10%, P(B|A)=80% and P(B|not A)=20%, P(A|B)=0.08/(0.08+0.18)≈30.7692%.
Things to check
- A and B can be any clearly defined events. Input values are assumptions or your own data, not a diagnosis.
- If B is impossible under the inputs, the conditional probability is undefined.
Frequently asked questions
Why is a high hit rate alone not enough?
The prior probability P(A) and the frequency of B without A affect how many observed B cases actually belong to A.