What is conditional probability?
The shared part over what is known to have happened.
Example
Given P(A)=0.5, P(B)=0.4 and P(A∩B)=0.2. Find P(A|B).
Answer: P(A|B)=12
Try it yourself: Given P(A)=0.6, P(B)=0.5 and P(A∩B)=0.3. Find P(A|B).
Why do I need this?
40 percent of the students have a dog. How many of them also have a cat? The question changes the group you look at.
The idea
Conditional probability is the chance of A once we know B happened, so we look inside B.
P(A|B)
Step by step
Shrink the sample space
Knowing B happened makes B the new sample space.
What is shared
Look for the part of B that is also in A.
P(A∩B)=0.2,P(B)=0.4Divide
The shared part over all of B.
P(A|B)=0.20.4=12
More cases and examples
A test for independence
If knowing B changes nothing, the events are independent.
P(A)=0.5=P(A|B)
The rule
Conditional probability
When to use it: The chance of B is not zero.
P(A|B)=P(A∩B)P(B)
- Athe event we look for
- Bwhat we already know happened
- ∩and: both events together
Common mistakes
- WrongP(A|B)=0.20.5RightP(A|B)=0.20.4
Divide by the chance of what is known, B, not A.
- WrongP(A|B)=P(A)P(B)RightP(A∩B)=P(A|B)P(B)
Multiplying chances works only for independent events.