Once the tree is drawn, the marginal probability of the event at the second level (for example BB) is obtained in a geometrically transparent way: you add up the probabilities of the paths that end in BB. No extra formula: it is all already on the drawing.

Theorem — Total probability, classical formulation

Let {A1,A2,,An}\{A_1, A_2, \ldots, A_n\} be a partition of the sample space (pairwise mutually exclusive events whose union covers everything). Then for every event BB: P(B)=i=1nP(Ai)P(BAi).\boxed{P(B) = \sum_{i=1}^n P(A_i)\cdot P(B\mid A_i).}

Proof — Visual, via the paths of the tree

We build the tree with first level {A1,,An}\{A_1,\ldots,A_n\} and with B,BB,\overline{B} at the second level under each AiA_i. The leaves "B\ldots\cap B" are pairwise disjoint (different outcomes of the first experiment). By additivity over mutually exclusive events: P(B)=P ⁣(i=1n(AiB))=i=1nP(AiB)=i=1nP(Ai)P(BAi),P(B) = P\!\Bigl(\bigcup_{i=1}^n (A_i\cap B)\Bigr) = \sum_{i=1}^n P(A_i\cap B) = \sum_{i=1}^n P(A_i)\cdot P(B\mid A_i), where in the last step the product formula is applied to each path. ∎

Example — Diagnostic test, P(T+)P(T^+) via the paths

We take up again the tree of the rare disease. The paths that end in T+T^+ are two, highlighted in red:

The two red paths both end in T+T^+: the total probability of testing positive is their sum.

Adding the two red paths: P(T+)=0,0010,99percorso MT++0,9990,02percorso MT+0,021.P(T^+) = \underbrace{0,001\cdot 0,99}_{\text{percorso }M\to T^+} + \underbrace{0,999\cdot 0,02}_{\text{percorso }\overline{M}\to T^+} \approx 0,021.

Topics: Probability
Concepts: Tree diagram · Partition · Conditional probability · Total probability
Methods: Total probability theorem
Skills: Calculating probability · Proving