Law of Total Probability and Bayes' Rule
In questa pagina 3
Law of total probability
Let with . Recalling the disjoint decomposition (Sample Spaces and EventsThe sample space collects all possible outcomes of an experiment, events are its subsets, and set operations (complement, union, intersection, difference, partitions) translate into statements about what occurs.Sample Spaces and Events →) and the multiplication formulas (Conditional ProbabilityThe conditional probability P(E|F) = P(E and F)/P(F) updates the probability of E after learning that F occurred; it is itself a probability measure and yields the multiplication formula for intersections.Conditional Probability →): (valid for , so that both conditional probabilities exist).
Example (continuation of the urn with 80 black and 20 red balls).
Generalization. If is a partition of with for all , then The events are disjoint since is a partition; this identity is the law of total probability, valid if is a partition of . It is typical of applications in which the data of the problem are the and the for .
Example (memory chips). A company produces PCs assembling components bought from several vendors. The memory chips come from 3 vendors in proportions . Chips of vendor are defective in of cases, those of in , those of in . The chips are kept together in a common bin and a chip is picked randomly from the bin. Probability that the chip picked is defective? (Recall that a percentage is an empirical probability.) Data: where "chip is defective" and is the probability that the chip comes from . By the law of total probability:
Bayes' rule
This is possibly the single most important result of the first six introductory lectures. The mathematics behind the rule is elementary; the examples clarify its importance.
Lemma (Bayes' rule). Let be a partition of with for all . Then for any (with ) and for all , where the numerator uses the multiplication rule and the denominator the law of total probability.
Terminology.
- : given a-priori probabilitiesprobabilities assigned before observing E;
- : given conditional probabilities;
- : posterior probabilities, computed on the basis of the data and the observation of the occurrence of . They are interesting because they tell how the a-priori probabilities change after observing .
Example: diagnostic tests
Diagnostic tests are quick, cheap procedures to evaluate the presence of a critical condition (in medicine: disease or no disease; in engineering: signal or no signal; etc.). The test is subject to errors: it can be positive when the condition is not present and negative when the condition is present. Properly interpreted it is nevertheless very useful in managing uncertainty. Notation: condition present, condition absent, test positive, test negative. The table of outcomes:
| true positive | false positive | |
| false negative | true negative |
and the table of conditional probabilities:
| = sensibility | = false positive | |
| = false negative | = specificity |
Ideally and ; in reality and . Commercial tests declare their sensibility and specificity . To use the test one also needs the a-priori probability .
Numerical example. Suppose , and (empirical observations show that the condition affects 2 per 10,000 individuals in the general population). You take the test and it turns out positive: has occurred. The rational reaction is to compute the posterior probability with Bayes' rule: after observing you do not belong anymore to the general population but to the population that tested positive. The a-priori probability has increased 50 times after the positive test, reaching , but it is still rather small. A complete examination to determine whether the condition is actually present is advisable but not urgent.
(Here by the complement property of conditional probability.)
Versione ripasso
- Law of total probability: partition of , : Proof: disjoint, then multiplication formula.
- Bayes' rule: a-priori, given conditional, posterior.
- Chips: .
- Diagnostic test: sensibility , specificity ; with , , : (50 times the prior but still small).
- Typical mistakes: confusing with ; ignoring the prior ; applying the law on events that are not a partition.