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:

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')}$$
0,3 0,7 0,8 0,2 0,1 0,9 R R′ M M′ M M′ 0,24 0,06 0,07 0,63 R: rain M: late P(M) = 0,24 + 0,07 = 0,31 ⇒ P(R|M) = 0,24 / 0,31 = 0,774
The tree reads along the rows, Bayes reads down the columns. Multiplying along a branch gives the intersection probability: $P(R\cap M)=0.3\times 0.8=0.24$. Adding the branches with the same outcome gives the total probability: $P(M)=0.24+0.07=0.31$. And the reverse question — "was it raining, given that the student was late" — takes one branch divided by the total: $P(R|M)=\dfrac{0.24}{0.31}=0.774$. The figure clarifies two numbers that are easily confused: $0.8$ is $P(M|R)$ written on the branch, while $0.774$ is $P(R|M)$ and it does not appear on any branch. They differ because the denominators differ: one divides by $P(R)$, the other by $P(M)$.

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.

Common mistake

Treating "do not overlap on a Venn diagram" as "independent". This is a semantic trap: in everyday language, two events that are "unrelated to each other" sound very similar to "cannot happen together". But mathematically they are opposites. Mutually exclusive means $P(A\cap B)=0$; independent means $P(A\cap B)=P(A)P(B)$. These two conditions are both true only when at least one of the events has probability equal to $0$ — a trivial case. For all $P(A),P(B)>0$, being mutually exclusive implies strong dependence: knowing $B$ occurred is knowing for certain that $A$ did not, so $P(A\mid B)=0\neq P(A)$. Consequence in the exam room: faced with "$A$ and $B$ are mutually exclusive, find $P(A\cap B)$", the candidate multiplies $P(A)P(B)$ and gets a positive number, while the answer is $0$. Conversely, faced with "$A$ and $B$ are independent, find $P(A\cup B)$", the candidate simply adds $P(A)+P(B)$ and forgets to subtract the intersection — because they thought independent means no overlap.

Key takeaway

Every time you see the words "given that", ask immediately: what is the denominator now? That is the entire content of conditional probability. And keep the two concepts separate: mutually exclusive is about $P(A\cap B)=0$, independent is about $P(A\cap B)=P(A)P(B)$ — they are almost never both true.

← Descriptive statistics, outliers and linear transformations · All IB Math AA lessons · Practice IB Math AA questions (free, instant scoring) · The binomial and normal distributions →