Probability rules, conditional probability and tree diagrams
IB Math AA · Statistics and Probability
The basic rules
$$P(A\cup B)=P(A)+P(B)-P(A\cap B),\qquad P(A')=1-P(A)$$The subtraction removes the double count of the overlap; leaving it out is the single most common slip in Venn-diagram questions.
Conditional probability
$$P(A\mid B)=\frac{P(A\cap B)}{P(B)}\qquad\text{hence}\qquad P(A\cap B)=P(B)\,P(A\mid B)$$Conditioning on $B$ shrinks the sample space to $B$: the denominator changes, and that is the whole idea.
Independent versus mutually exclusive
These are different, and in fact opposite in spirit:
- $A$ and $B$ are independent when $P(A\cap B)=P(A)P(B)$, equivalently $P(A\mid B)=P(A)$: knowing $B$ tells you nothing about $A$;
- $A$ and $B$ are mutually exclusive when $P(A\cap B)=0$: they cannot both happen.
If two events with non-zero probabilities are mutually exclusive, they are certainly not independent, because knowing that $B$ happened tells you that $A$ did not.
Tree diagrams and Bayes
Multiply along a branch to get an intersection; add the branches leading to the same outcome to get a total probability. To reverse a conditional, divide one branch by that total:
$$P(A\mid B)=\frac{P(A)\,P(B\mid A)}{P(A)\,P(B\mid A)+P(A')\,P(B\mid A')}$$Worked example: two conditional probabilities and the independence test
Given $P(A)=0.6$, $P(B)=0.5$ and $P(A\cup B)=0.8$. Find $P(A\cap B)$, $P(A\mid B)$ and $P(B\mid A)$, then decide whether $A$ and $B$ are independent.
Solution
The intersection. From the addition rule:
$$P(A\cap B)=P(A)+P(B)-P(A\cup B)=0.6+0.5-0.8=0.3$$The two conditional probabilities. Same numerator, different denominator:
$$P(A\mid B)=\frac{0.3}{0.5}=0.6,\qquad P(B\mid A)=\frac{0.3}{0.6}=0.5$$Independent or not. Compare $P(A\cap B)$ with $P(A)P(B)$:
$$P(A)P(B)=0.6\times 0.5=0.3=P(A\cap B)$$They are equal, so $A$ and $B$ are independent. This result agrees with the two conditional probabilities just calculated: $P(A\mid B)=0.6=P(A)$ and $P(B\mid A)=0.5=P(B)$ — knowing one event does not change the assessment of the other.
Note that the two events are not mutually exclusive, since $P(A\cap B)=0.3\neq 0$. Independent and mutually exclusive stand on opposite sides here: one holds, the other does not.
Worked example: reversing the condition on a tree diagram
The probability that it rains on a given morning is $0.3$. If it rains, the probability that An is late for school is $0.8$; if it does not rain, that probability is $0.1$. Calculate the probability that An is late, and the probability that it had rained given that An was late that day.
Solution
The four branches of the tree. Multiply along each branch:
$$P(R\cap M)=0.3\times 0.8=0.24,\qquad P(R'\cap M)=0.7\times 0.1=0.07$$Total probability. Two branches lead to "late":
$$P(M)=0.24+0.07=0.31$$Reversing the condition.
$$P(R\mid M)=\frac{P(R\cap M)}{P(M)}=\frac{0.24}{0.31}=0.774$$The two numbers $0.8$ and $0.774$ look close but are entirely different quantities. $0.8=P(M\mid R)$ divides by $P(R)=0.3$; while $0.774=P(R\mid M)$ divides by $P(M)=0.31$. They are close in this problem only because $P(R)$ and $P(M)$ happen to be close.
Check the total: $P(R'\mid M)=\dfrac{0.07}{0.31}=0.226$, and $0.774+0.226=1$ — as it should be, because given that An was late, it either rained or it did not.