Tree diagrams. Each node has children whose probabilities sum to 1. The probability of a particular sequence is the product of the conditional probabilities along the path.
Law of total probability. If {B1,B2,…,Bk} is a partition of the sample space (mutually exclusive and exhaustive), then for any event D,
P(D)=∑i=1kP(Bi)⋅P(D∣Bi).
This is the 'add over all branches that lead to D' rule.
Worked example (factory defects). Machines X (60% output, 3% defect), Y (40% output, 5% defect).
0.03 D
X ─────────┤
/ 0.97 D'
0.6 │
\ 0.05 D
Y ─────────┤
0.95 D'
- P(X∩D)=0.6×0.03=0.018.
- P(Y∩D)=0.4×0.05=0.020.
- P(D)=0.018+0.020=0.038.
Reversing the conditioning (Bayes-style). Given the defect, which machine made it?
P(X∣D)=P(D)P(X∩D)=0.0380.018≈0.474.
Even though X produces more output, only about 47% of defective items come from X, because Y's defect rate is higher.