- P(A∩B) — both events together
- 0.2
- P(B) — the event you condition on
- 0.5
0.4000
Open with these values0.4000
Result: 0.4000Knowing that B happened shrinks the world to the outcomes where B is true, so the joint probability is rescaled by P(B). Enter both as decimals between 0 and 1. The joint probability can never exceed P(B), because every outcome with both A and B is also an outcome with B.
0.4000
Open with these values0.2500
Open with these values0.4000
Open with these valuesP(A|B) = P(A∩B) ÷ P(B)
Swapping the two asks a different question and generally gives a different number. Turning one into the other takes Bayes' theorem, which also needs P(A) and P(B) — this formula will not do it.
Knowing that B happened narrows the outcomes to those where B is true, and the joint probability is rescaled by P(B). That rescaling is the whole of the formula.
Every outcome in which A and B both happen is also an outcome with B, so P(A∩B) is at most P(B). A larger entry would give a result above 1, which no probability can be.
Both fields run from 0 to 1, so a 20 percent chance goes in as 0.2. Entering 20 and 50 instead of 0.2 and 0.5 falls outside the range.
P(A|B) = 0.4 means A and B happen together 40 percent of the time.
That would be the joint probability, the number you entered. 0.4 is the share of the B outcomes in which A also holds — 0.2 out of 0.5.
If P(A|B) is high, P(B|A) must be high as well.
They are two separate quantities and agree only by coincidence. Bayes' theorem is what converts one into the other, using P(A) and P(B).
The formula assumes A and B are independent.
It is the other way round: the definition holds for any two events. Independence is the special case in which P(A|B) equals P(A).
| P(A∩B), P(B) | Reading | P(A|B) |
|---|---|---|
| 0, 0.5 | A never happens alongside B | 0 |
| 0.1, 0.4 | A holds in a quarter of the B outcomes | 0.25 |
| 0.12, 0.3 | Two fifths of the B outcomes | 0.4 |
| 0.2, 0.5 | Two fifths again, on a larger B | 0.4 |
| 0.3, 0.6 | Half of the B outcomes | 0.5 |
| 0.5, 0.5 | A always happens when B does | 1 |
Divide the joint probability by the probability of the condition: P(A|B) = P(A∩B) ÷ P(B). Enter both values as decimals between 0 and 1. With P(A∩B) = 0.2 and P(B) = 0.5 the result is 0.2 ÷ 0.5 = 0.4, a 40 percent chance of A once B is known.
It is the probability that event A occurs given that event B has already occurred. Knowing B happened narrows the sample space to the outcomes where B is true, so the calculation rescales the joint probability by P(B). The result always lies between 0 and 1.
You cannot condition on an event that never happens. If P(B) is zero then B is impossible, and asking what follows once B occurred has no meaning. The formula divides by P(B), and division by zero is undefined.
The joint event is a subset of B: every outcome where A and B both happen is also an outcome where B happens. So P(A∩B) can never be larger than P(B). A joint probability above P(B) would give a result greater than 1, which is impossible for a probability.
Two events are independent when knowing B tells you nothing about A, that is when P(A|B) equals P(A). In that case the joint probability factorises into P(A) × P(B). If P(A|B) differs from P(A), the events are dependent and B changes the chance of A.
This calculator uses the direct definition, for when the joint probability is already known. Bayes' theorem reverses a conditional probability, finding P(A|B) from P(B|A), P(A) and P(B) when the joint probability is not given. Both rest on the same definition.
Information, not professional advice.
Diese Seite gibt es auch auf Deutsch.
Zu Deutsch wechseln