Leave lesson

Statistics · Probability

1 / 10

Conditional probability

The probability of A given B, P(A|B) = P(A ∩ B) / P(B), as restricting the sample space to B — reading it off a Venn diagram, the multiplication formula P(A ∩ B) = P(B)P(A|B), and testing independence with P(A|B) = P(A).

Statistics · Probability

Conditional probability

The probability of A given B, P(A|B) = P(A ∩ B) / P(B), as restricting the sample space to B — reading it off a Venn diagram, the multiplication formula P(A ∩ B) = P(B)P(A|B), and testing independence with P(A|B) = P(A).

Why it works

Conditional probability asks: given that one event has already happened, how likely is another? Written P(AB)P(A \mid B) — "the probability of AA given BB" — it measures AA within the new, smaller world where BB is known to have occurred.

That "smaller world" is the whole idea. Once you know BB has happened, the only outcomes still possible are those in BB, so BB becomes the new sample space. The chance of AA is then the slice of BB that also lies in AA: P(AB)=P(AB)P(B).P(A \mid B) = \frac{P(A \cap B)}{P(B)}. On a Venn diagram this is simply (the overlap) ÷ (the whole of BB) — you ignore everything outside BB.ξ0.1AB0.30.20.4For the diagram above, P(AB)=P(AB)P(B)=0.20.2+0.4=0.20.6=13P(A \mid B) = \dfrac{P(A \cap B)}{P(B)} = \dfrac{0.2}{0.2 + 0.4} = \dfrac{0.2}{0.6} = \dfrac13.

The multiplication formula. Rearranging gives a way to find an intersection: P(AB)=P(B)P(AB)=P(A)P(BA).P(A \cap B) = P(B)\,P(A \mid B) = P(A)\,P(B \mid A). This is the engine behind tree diagrams — multiplying along the branches.

The addition formula still holds alongside it: P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B).

Testing independence. Two events are independent when knowing one tells you nothing about the other — that is, the condition makes no difference: A,B independent    P(AB)=P(A)    P(AB)=P(A)P(B).A, B \text{ independent} \iff P(A \mid B) = P(A) \iff P(A \cap B) = P(A)\,P(B). So to test independence, check whether P(AB)P(A \cap B) equals P(A)P(B)P(A)P(B) (or whether the conditional probability equals the unconditional one). If they differ, the events are dependent — one event shifts the odds of the other.