6.10 Probability, Conditional Probability & Bayes' Theorem
Key Takeaways
- For mutually exclusive events the probability of A or B is simply the sum, but for overlapping events the intersection must be subtracted once under the addition rule.
- Two events are independent when the probability of their intersection equals the product of their individual probabilities, which is a different condition from being mutually exclusive.
- Conditional probability P(A given B) equals the probability of the intersection divided by P(B), and this definition is the starting point for both the multiplication rule and Bayes' theorem.
- Bayes' theorem reverses the direction of conditioning, converting the probability of evidence given a cause into the probability of a cause given the evidence.
Classical Definition and Sample Spaces
For an experiment with a finite set of equally likely outcomes, the probability of an event $A$ is
with $0 \leq P(A) \leq 1$. The complement satisfies $P(\bar{A}) = 1 - P(A)$, and the complement route is very often the shorter one — "at least one" problems are almost always solved as $1 - P(\text{none})$.
Common sample space sizes worth having ready: one die has 6 outcomes; two dice have 36; a standard deck has 52 cards, of which 26 are red, 13 per suit, 12 face cards and 4 aces; tossing $n$ coins has $2^n$ outcomes.
The Addition Rule
For any two events,
The subtraction removes the double count of the overlap. When the events are mutually exclusive they cannot occur together, so $P(A \cap B) = 0$ and the rule simplifies to a plain sum.
For three events the pattern extends by inclusion-exclusion:
Independence Versus Mutual Exclusivity
These two ideas are constantly confused, and CIL-style papers reward telling them apart.
| Mutually exclusive | Independent | |
|---|---|---|
| Meaning | Cannot both happen | One does not affect the other |
| Intersection | $P(A\cap B) = 0$ | $P(A\cap B) = P(A)P(B)$ |
| Example | Drawing a card that is both a king and a queen | Two successive tosses of a fair coin |
Note the consequence: two events with non-zero probabilities cannot be both mutually exclusive and independent. If they are mutually exclusive, knowing that $A$ occurred tells you with certainty that $B$ did not — the strongest possible dependence.
Conditional Probability and the Multiplication Rule
The probability of $A$ given that $B$ has occurred is
Rearranging gives the multiplication rule $P(A\cap B) = P(B),P(A\mid B)$. For independent events this collapses to $P(A)P(B)$, which is precisely the definition of independence.
Worked example — sampling without replacement. A bin holds 6 conforming and 4 defective bearings. Two are drawn without replacement. The probability that both are defective is
The second fraction uses 3 and 9 because the first draw is not replaced — this is conditional probability in action. Had the draw been with replacement, the events would be independent and the answer would be $(4/10)^2 = 4/25$.
Total Probability and Bayes' Theorem
Suppose the events $B_1, B_2, \ldots, B_n$ partition the sample space — they are mutually exclusive and collectively exhaustive. The law of total probability gives
Bayes' theorem then reverses the conditioning:
In words: the prior probability $P(B_k)$ is updated by the evidence $A$ into the posterior $P(B_k\mid A)$. Bayes questions are recognisable by their phrasing — a defect is found, and you are asked which machine most likely produced it.
Worked example: which machine made the defective part?
A CIL central workshop runs three machines producing identical bushes:
| Machine | Share of output | Defect rate |
|---|---|---|
| $M_1$ | 50% | 3% |
| $M_2$ | 30% | 4% |
| $M_3$ | 20% | 5% |
A bush drawn at random is found defective. What is the probability it came from $M_3$?
First the total probability of a defect:
Then Bayes:
So although $M_3$ makes only 20% of the output, it accounts for 27% of the defectives — the posterior is shifted upward because its defect rate is the worst. Note also $P(M_1\mid D) = 0.015/0.037 = 0.405$: machine 1 still produces the largest number of defectives simply because it makes the most parts. Distinguishing "highest defect rate" from "most defectives produced" is the conceptual point such items test.
Odds and Expectation
Odds in favour of an event are the ratio of favourable to unfavourable outcomes, so odds of $a{:}b$ correspond to $P = a/(a+b)$. The mathematical expectation of a random variable taking values $x_i$ with probabilities $p_i$ is
A game or contract is called fair when its expectation is zero. Expectation is developed further in the next section, where it becomes the mean of a probability distribution.
Two events A and B, each with non-zero probability, are mutually exclusive. It follows that they are:
A bin contains 6 good and 4 defective bearings. Two are drawn at random without replacement. The probability that both are defective is:
Three machines supply 50%, 30% and 20% of output with defect rates 3%, 4% and 5% respectively. The overall proportion of defective items is:
Bayes' theorem is used to compute: