Total probability, independence and application
The law of total probability
The principle: adding up all the possible paths
When a final event can occur through several different paths in a tree, the law of total probability says that you must add the probabilities of all the paths that lead to that event.
The case of two complementary events
If B and its complementary event (not-B) share the whole universe (B occurs or not-B occurs, never both, never neither), then for any event A:
P(A) = P(B) x P(A given B) + P(not-B) x P(A given not-B)
(we add the only two possible paths that lead to A)
(P(B) + P(not-B) = 1, because B and not-B cover the whole universe)
This formula generalises to more than two branches at the first level: just add a term "P(branch) x P(A given that branch)" for each branch of the first level.
Example
A factory receives parts from two suppliers: supplier 1 delivers 70 percent of the parts with a defect rate of 2 percent, supplier 2 delivers 30 percent of the parts with a defect rate of 5 percent. The probability that a part picked at random is defective is:
P(defect) = 0.70 x 0.02 + 0.30 x 0.05 = 0.014 + 0.015 = 0.029, i.e. 2.9 percent.
Common pitfall
The first-level branches must form a complete partition of the universe (they cover everything, without overlapping) to apply this formula directly. Forgetting a branch (a third supplier, for example) completely distorts the result: the sum of the branch probabilities must always equal 1 before applying the formula.

