Overview
Conditional probability is the chance of A given that B has happened, written P(A|B). It's the basis of Bayes' theorem and many real decisions.
Enter the probability of both A and B, and the probability of B, as percentages.
Worked examples
| Inputs | Result |
|---|---|
| P(A and B) (%)12P(B) (%)30 | Conditional probability P(A|B): 40% |
Show 2 more examples
| P(A and B) (%)7.69P(B) (%)23.08 | Conditional probability P(A|B): 33.32% |
| P(A and B) (%)5P(B) (%)50 | Conditional probability P(A|B): 10% |
Conditional probability P(A|B) by P(B)
With the calculator's starting values, the conditional probability P(A|B) is 40%. The table shows how it changes with the P(B).
| P(B) (%) | Conditional probability P(A|B) |
|---|---|
| 15% | 80% |
| 20% | 60% |
| 25% | 48% |
| 30%starting value | 40% |
| 35% | 34.29% |
| 40% | 30% |
| 45% | 26.67% |
Other inputs: P(A and B): 12%. Change them in the calculator above for your own numbers.
How it works
P(A|B) is P(A and B) divided by P(B). Knowing B happened shrinks the possible outcomes to those where B is true, and A's share of those is the answer.
The formula
Practical tips
- With P(A and B) = 12% and P(B) = 30%, P(A|B) is 40%.
- Drawing a king given the card is a face card: 4/52 ÷ 12/52 = 1/3.
- P(A|B) and P(B|A) are usually different, which is a common mix-up.
Frequently asked questions
What if A and B are independent?
Then P(A|B) equals P(A).
How do I get P(A and B)?
From data, or P(A) × P(B) if they're independent.
Why can't P(A and B) exceed P(B)?
Both happening can't be more likely than B alone.