How this calculator works
Bayes theorem reweights a prior by how well each case predicts the observed evidence. The two cases A and not A must exhaust the possibilities. The evidence probability is a weighted sum across those cases. Inverse modes reject impossible solutions and cases that do not determine one unique answer. These are model probabilities; the calculation does not establish whether the prior or likelihood estimates are reliable.
Formula
P(A | B) = P(A)P(B | A) / [P(A)P(B | A) + (1 - P(A))P(B | not A)].
Worked example
A factory supplies 20% of parts. A flag occurs for 80% of its parts and for 10% of all other parts. The flag rate is 0.2 × 0.8 + 0.8 × 0.1 = 0.24. A flagged part came from this factory with probability 0.16/0.24 = 66.67%.
Advertisement
Frequently asked questions
Are P(A | B) and P(B | A) interchangeable?
No. They condition on different events. A common effect can have a very different reverse probability when the cause is rare.
Can the evidence have probability zero?
No. A conditional probability needs a positive conditioning probability. Zero-probability evidence is rejected.
Why can an inverse mode have no solution?
The supplied numbers may imply a likelihood above 100%, or may leave the unknown undetermined. Neither case gives a unique valid probability.