Skip to the content

Topics Covered

Random Experiment Sample Space Events Classical Definition Statistical Definition Axiomatic Definition Probability Space Conditional Probability Independence Addition Theorem Multiplication Theorem Boole's Inequality Bayes' Theorem Total Probability
On this page
  1. 1. Basic Concepts
  2. 2. Definitions of Probability
  3. 3. Conditional Probability
  4. 4. Independence of Events
  5. 5. Addition Theorem of Probability
  6. 6. Multiplication Theorem of Probability
  7. 7. Boole's Inequality
  8. 8. Bayes' Theorem
  9. Worked Problems on Elementary Probability
  10. Key Take-aways from Unit 1

1. Basic Concepts

1.1 Random Experiment

DEFINITION

An experiment whose outcome cannot be predicted with certainty in advance, although the set of all possible outcomes is known, is called a random experiment (or a trial).

EXAMPLE 1

Tossing a fair coin: outcomes = {Head, Tail}. We don't know in advance which one will occur.

EXAMPLE 2

Drawing a card from a well-shuffled pack: outcomes = 52 cards. The drawn card cannot be predicted.

1.2 Trial & Outcome

1.3 Sample Space (\(S\) or \(\Omega\))

DEFINITION

The set of all possible outcomes of a random experiment is called the sample space.

EXAMPLE 1

Tossing two coins: \(S = \{HH, HT, TH, TT\}\); \(|S|=4\).

EXAMPLE 2

Throwing a die: \(S = \{1,2,3,4,5,6\}\); \(|S|=6\).

1.4 Event

DEFINITION

An event is any subset of the sample space \(S\).

1.5 Types of Events

A B A∩B S A and B (intersection)
Overlapping events
A B S Mutually Exclusive
A ∩ B = ∅
A Ā S Complement
A and its complement
EXAMPLE 1 (Mutually exclusive)

Throwing one die. \(A\) = "even number", \(B\) = "odd number". \(A \cap B = \varnothing\); they are mutually exclusive and also exhaustive.

EXAMPLE 2 (Equally likely)

Drawing one card from a pack: each of the 52 cards is an equally likely outcome.

Deterministic and Random Experiments

TWO KINDS OF EXPERIMENT

An experiment is any activity that produces a result, called its outcome: tossing a coin, measuring the length of a table.

Probability is about random experiments only. A deterministic experiment has a single possible outcome, which happens with certainty, so there is nothing to measure.

A trial is one performance of the experiment. Tossing three coins once is one trial of the experiment “toss three coins”; drawing one card from a pack is one trial of “draw a card”. If three players A, B and C play a game, the sample space of “who wins” is \(S = \{A, B, C\}\).

The Kinds of Event, Illustrated

DEFINITIONS WITH COINS, DICE AND CARDS

A Short History of Probability

The theory of probability began in the 17th century with problems of gambling on dice, in the correspondence of Blaise Pascal and Pierre de Fermat (1654). James (Jacob) Bernoulli's Ars Conjectandi (published in 1713, after his death) proved the first law of large numbers, and Abraham De Moivre's The Doctrine of Chances appeared in 1718. Bayes, Laplace, Chebyshev, Markov, Lyapunov, Lévy, von Mises, Fisher and Khinchin developed it further, and in 1933 Kolmogorov gave it the axioms of §2.3.

2. Definitions of Probability

2.1 Mathematical (Classical / A-priori) Definition

LAPLACE

If a random experiment has \(n\) mutually exclusive, exhaustive and equally likely outcomes, of which \(m\) are favourable to event \(A\), then

\[ P(A) \;=\; \dfrac{m}{n} \;=\; \dfrac{\text{Number of favourable outcomes}}{\text{Total number of outcomes}} \]

Limitations: assumes all outcomes equally likely; fails when \(n\) is infinite or outcomes are not equally likely.

EXAMPLE 1

Probability of getting a king from a pack of 52 cards.
Favourable = 4 kings, total = 52. \(P(K) = 4/52 = 1/13\).

EXAMPLE 2

Probability of getting a sum of 7 on two dice.
Total outcomes = 36. Favourable: (1,6),(2,5),(3,4),(4,3),(5,2),(6,1) = 6. \(P = 6/36 = 1/6\).

2.2 Statistical (Empirical / Frequency) Definition

VON MISES

If a random experiment is repeated \(N\) times under identical conditions and event \(A\) occurs \(m\) times, then

\[ P(A) \;=\; \lim_{N \to \infty} \dfrac{m}{N} \]
EXAMPLE 1

A coin is tossed 10 000 times and 5 037 heads are observed. The empirical probability of head is \(5037/10000 = 0.5037\), close to the theoretical value 0.5.

EXAMPLE 2

From last 1 000 customers, 320 ordered tea. Empirical probability that a new customer orders tea = 0.32.

2.3 Axiomatic Definition (Kolmogorov, 1933)

DEFINITION

Let \(S\) be a sample space and \(\mathcal{F}\) a \(\sigma\)-field of events. A probability measure \(P\) is a function \(P : \mathcal{F} \to \mathbb{R}\) satisfying three axioms:

AXIOMS
  1. Axiom of positivity (non-negativity): \(P(E_i) \ge 0\) for every event \(E_i\).
  2. Axiom of certainty: \(P(S) = 1\).
  3. Axiom of additivity: if \(E_1, E_2, \ldots, E_n\) are mutually disjoint events, \[ P\!\left(\bigcup_{i=1}^{n} E_i\right) \;=\; \sum_{i=1}^{n} P(E_i). \]

For an infinite sample space the third axiom is required for every sequence \(E_1, E_2, \ldots\) of mutually disjoint events (countable additivity); the finite form is the case \(E_{n+1} = E_{n+2} = \cdots = \varnothing\).

Consequences of the Axioms

Probability Space

THE TRIPLET \((S, \mathcal{B}, P)\)

When \(S\) is finite (or countable), \(\mathcal{B}\) can be the class of all subsets of \(S\), and every subset is an event. That is the setting of every problem on this page.

The Properties, Proved

EACH FROM THE AXIOMS

Result 1: \(P(\varnothing) = 0\). \(S = S \cup \varnothing\), and \(S\) and \(\varnothing\) are disjoint, so by additivity and certainty

\[ 1 = P(S) = P(S) + P(\varnothing) = 1 + P(\varnothing) \quad\Rightarrow\quad P(\varnothing) = 0 . \]

Result 2: \(P(\bar A) = 1 - P(A)\). \(A \cup \bar A = S\) with \(A\) and \(\bar A\) disjoint, so \(P(A) + P(\bar A) = P(S) = 1\).

Result 3: \(P(\bar A \cap B) = P(B) - P(A \cap B)\). Split \(B\) by whether \(A\) happens: \(B = (A \cap B) \cup (\bar A \cap B)\), a union of two disjoint events (Fig 1.1, in §5). By additivity \(P(B) = P(A \cap B) + P(\bar A \cap B)\); subtract. In the same way, \(P(A \cap \bar B) = P(A) - P(A \cap B)\).

Monotonicity. If \(A \subset B\) then \(A \cap B = A\), and Result 3 gives \(P(B) - P(A) = P(\bar A \cap B) \ge 0\). In particular \(A \subset S\) gives \(0 \le P(A) \le 1\).

Result 9: \(P(A \cap B) \le P(A) \le P(A \cup B) \le P(A) + P(B)\).

  1. \(A = (A \cap \bar B) \cup (A \cap B)\), a union of disjoint events, so by additivity \(P(A) = P(A \cap \bar B) + P(A \cap B) \ge P(A \cap B)\), since \(P(A \cap \bar B) \ge 0\). …(1)
  2. \(P(\bar A \cap B) \ge 0\), and by Result 3 \(P(\bar A \cap B) = P(B) - P(A \cap B)\), so \(P(B) - P(A \cap B) \ge 0\). …(2)
  3. By the addition theorem (§5), \(P(A \cup B) = P(A) + [P(B) - P(A \cap B)] \ge P(A)\), by (2). …(3)
  4. By Boole's inequality (§7), \(P(A \cup B) \le P(A) + P(B)\). …(4)

Putting (1), (3) and (4) together gives the chain.

Geometric Probability

DEFINITION

When the outcome is a point chosen "at random" in a region \(S\) of a line, plane or space, equally likely outcomes are replaced by equal measure: the probability of falling in a part \(A\) of \(S\) is \(P(A) = \dfrac{\text{length (area, volume) of } A}{\text{length (area, volume) of } S}\). This is the classical definition with counting replaced by measuring, and it satisfies the axioms.

EXAMPLE (The meeting problem)

Two friends each arrive at a random time between 5:00 and 6:00 and wait 15 minutes for the other. With arrival times \(x, y\) in minutes, the sample space is the square \([0,60]^{2}\) and they meet if \(|x - y| \le 15\). The two corner triangles where they miss each have legs of 45, so

\[ P(\text{meet}) = 1 - \frac{45^{2}}{60^{2}} = 1 - \frac{9}{16} = \frac{7}{16} = 0.4375. \]

3. Conditional Probability

DEFINITION

The conditional probability of event \(A\) given that event \(B\) has occurred (\(P(B) > 0\)) is

\[ P(A \mid B) \;=\; \dfrac{P(A \cap B)}{P(B)} \]
EXAMPLE 1

A die is rolled. Given that the outcome is even, what is the probability that it is 4?
\(B\) = even = {2,4,6}; \(A \cap B\) = {4}.
\(P(A|B) = (1/6)/(3/6) = 1/3\).

EXAMPLE 2

In a class of 60 students, 30 study Math, 24 study Statistics and 12 study both. Find probability that a randomly selected student studies Statistics, given that he studies Math.
\(P(\text{Stat}|\text{Math}) = P(\text{Stat} \cap \text{Math})/P(\text{Math}) = (12/60)/(30/60) = 12/30 = 0.40\).

Conditional Probability by Counting

EQUALLY LIKELY OUTCOMES

When the \(n(S)\) outcomes are equally likely, \(P(E) = n(E)/n(S)\) for every event, and the definition becomes a count:

\[ P(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{n(A \cap B)/n(S)}{n(B)/n(S)} = \frac{n(A \cap B)}{n(B)} . \]

The \(n(S)\) cancels: once \(B\) is known to have happened, \(B\) is the new sample space, and \(A\) is favoured by the outcomes of \(B\) that are also in \(A\). In Example 1 above, \(n(A \cap B) = 1\) and \(n(B) = 3\), so \(P(A \mid B) = 1/3\) at once. The counting form holds only for equally likely outcomes; the ratio of probabilities holds always.

The Rules Still Hold Given C

RESULTS 4 AND 5 (\(P(C) > 0\))

For a fixed event \(C\) with \(P(C) > 0\), \(P(\,\cdot \mid C)\) obeys the same rules as \(P\).

Result 4: \(P(A \cup B \mid C) = P(A \mid C) + P(B \mid C) - P(A \cap B \mid C)\). By the distributive law \((A \cup B) \cap C = (A \cap C) \cup (B \cap C)\). Apply the addition theorem to the events \(A \cap C\) and \(B \cap C\), whose intersection is \((A \cap C) \cap (B \cap C) = A \cap B \cap C\):

\[ P[(A \cup B) \cap C] = P(A \cap C) + P(B \cap C) - P(A \cap B \cap C) . \]

Divide every term by \(P(C)\); each ratio is a conditional probability.

Result 5: \(P(A \cap \bar B \mid C) + P(A \cap B \mid C) = P(A \mid C)\). By the definition of conditional probability,

\[ \begin{aligned} P(A \cap \bar B \mid C) + P(A \cap B \mid C) &= \frac{P(A \cap \bar B \cap C)}{P(C)} + \frac{P(A \cap B \cap C)}{P(C)} = \frac{P(A \cap C)}{P(C)} \\ &= P(A \mid C), \end{aligned} \]

because \(A \cap \bar B \cap C\) and \(A \cap B \cap C\) are disjoint and together make up \(A \cap C\), so their probabilities add to \(P(A \cap C)\).

4. Independence of Events

DEFINITION

Two events \(A\) and \(B\) are independent if the occurrence of one does not affect the probability of the other:

\[ P(A \cap B) \;=\; P(A) \cdot P(B) \]

Equivalently, \(P(A|B) = P(A)\) and \(P(B|A) = P(B)\), provided both probabilities are positive.

For three events \(A,B,C\) — mutual independence requires:

EXAMPLE 1

Two coins are tossed. \(A\) = "first coin H", \(B\) = "second coin H". \(P(A)=P(B)=1/2\), \(P(A \cap B) = 1/4 = P(A)P(B)\). Independent ✓.

EXAMPLE 2

A die is rolled. \(A\) = "even", \(B\) = "≥ 4".
\(P(A) = 1/2,\; P(B) = 1/2,\; A \cap B = \{4,6\},\; P(A \cap B) = 2/6 = 1/3\).
\(P(A)P(B) = 1/4 \ne 1/3\). Hence not independent.

Complements of Independent Events

RESULTS 6, 7 AND 8

The two forms of the definition agree: if \(P(B \mid A) = P(B)\), the multiplication theorem (§6) gives \(P(A \cap B) = P(A)P(B \mid A) = P(A)P(B)\), and in the same way \(P(A \mid B) = P(A)\) gives the product. If \(A\) and \(B\) are independent, so are their complements, in every combination.

Result 6: \(A\) and \(\bar B\). By Result 3 and independence,

\[ \begin{aligned} P(A \cap \bar B) &= P(A) - P(A \cap B) = P(A) - P(A)P(B) = P(A)\,[1 - P(B)] \\ &= P(A)\,P(\bar B) . \end{aligned} \]

Result 7: \(\bar A\) and \(B\). The same with the roles exchanged: \(P(\bar A \cap B) = P(B) - P(A)P(B) = P(B)\,P(\bar A)\).

Result 8: \(\bar A\) and \(\bar B\). By De Morgan's law \(\bar A \cap \bar B = \overline{A \cup B}\), so

\[ \begin{aligned} P(\bar A \cap \bar B) &= 1 - P(A \cup B) = 1 - P(A) - P(B) + P(A)P(B) \\ &= [1 - P(A)]\,[1 - P(B)] = P(\bar A)\,P(\bar B) . \end{aligned} \]

The last step is the factorisation \(1 - a - b + ab = (1 - a)(1 - b)\).

Independent is not the same as mutually exclusive. If \(A\) and \(B\) are mutually exclusive with \(P(A), P(B) > 0\), then \(P(A \cap B) = 0 \ne P(A)P(B)\): knowing that \(A\) happened tells you that \(B\) did not, so they are dependent.

5. Addition Theorem of Probability

5.1 For Two Events

\[ P(A \cup B) \;=\; P(A) + P(B) - P(A \cap B) \]

If \(A,B\) are mutually exclusive: \(P(A \cup B) = P(A) + P(B)\).

5.2 For Three Events

\[ \begin{aligned} P(A \cup B \cup C) \; &= \; P(A) + P(B) + P(C) - P(A \cap B) - P(B \cap C) \\ &\quad - P(A \cap C) + P(A \cap B \cap C) \end{aligned} \]

5.3 For \(n\) Events (Inclusion–Exclusion)

\[ \begin{aligned} P\!\left(\bigcup_{i=1}^{n} A_i\right) &= \sum_{i} P(A_i) - \sum_{i<j} P(A_i \cap A_j) \\ &\quad + \sum_{i<j<k} P(A_i \cap A_j \cap A_k) - \cdots + (-1)^{n+1} P(A_1 \cap \cdots \cap A_n) \end{aligned} \]
EXAMPLE 1

From a deck, find the probability of drawing a king or a heart.
\(P(K) = 4/52,\; P(H) = 13/52,\; P(K \cap H) = 1/52\).
\(P(K \cup H) = 4/52 + 13/52 - 1/52 = 16/52 = 4/13\).

EXAMPLE 2

Probability that a student passes Math is 0.7, Physics 0.6 and both 0.5. Probability of passing at least one = 0.7 + 0.6 − 0.5 = 0.8.

Proof of the Addition Theorem for Two Events

PROOF

Write \(A \cup B\) as the union of two disjoint events, \(A\) and \(\bar A \cap B\) (Fig 1.1):

\[ A \cup B = A \cup (\bar A \cap B) \quad\Rightarrow\quad P(A \cup B) = P(A) + P(\bar A \cap B) \]

by additivity. Add and subtract \(P(A \cap B)\):

\[ \begin{aligned} P(A \cup B) &= P(A) + P(\bar A \cap B) + P(A \cap B) - P(A \cap B) \\ &= P(A) + P[(\bar A \cap B) \cup (A \cap B)] \\ &\quad - P(A \cap B) \qquad [\bar A \cap B \text{ and } A \cap B \text{ are disjoint}] \\ &= P(A) + P(B) - P(A \cap B) \qquad [B = (\bar A \cap B) \cup (A \cap B), \text{ Fig 1.1}] . \end{aligned} \]

Hence \(P(A \cup B) = P(A) + P(B) - P(A \cap B)\). \(\square\)

In words: adding \(P(A)\) and \(P(B)\) counts the overlap \(A \cap B\) twice, so it is taken away once.

S A B A ∩ B A ∩ B A only
Fig 1.1 — \(A \cup B\) is the disjoint union of \(A\) and the amber region \(\bar A \cap B\); and \(B\) is the disjoint union of the blue overlap \(A \cap B\) and that same amber region. Those two splits are the whole proof of the addition theorem.

Addition Theorem for \(n\) Events, by Induction

PROOF

Statement. For \(n\) events \(A_1, A_2, \ldots, A_n\),

\[ \begin{aligned} P\!\left(\bigcup_{i=1}^{n} A_i\right) &= \sum_{i=1}^{n} P(A_i) - \mathop{\sum\sum}_{1 \le i < j \le n} P(A_i \cap A_j) \\ &\quad + \mathop{\sum\sum\sum}_{1 \le i < j < k \le n} P(A_i \cap A_j \cap A_k) - \cdots + (-1)^{n-1} P(A_1 \cap A_2 \cap \cdots \cap A_n) . \end{aligned} \]

Proof, by mathematical induction. For two events,

\[ P(A_1 \cup A_2) = P(A_1) + P(A_2) - P(A_1 \cap A_2) , \qquad \ldots(1) \]

so the theorem is true for \(n = 2\). Suppose it is true for \(n = r\):

\[ \begin{gathered} \begin{aligned} P\!\left(\bigcup_{i=1}^{r} A_i\right) &= \sum_{i=1}^{r} P(A_i) - \mathop{\sum\sum}_{1 \le i < j \le r} P(A_i \cap A_j) \\ &\quad + \cdots + (-1)^{r-1} P(A_1 \cap A_2 \cap \cdots \cap A_r) . \end{aligned} \qquad \ldots(2) \end{gathered} \]

We have to prove it for \(n = r + 1\). Apply (1) to the two events \(\bigcup_{i=1}^{r} A_i\) and \(A_{r+1}\):

\[ P\!\left(\bigcup_{i=1}^{r+1} A_i\right) = P\!\left[\left(\bigcup_{i=1}^{r} A_i\right) \cup A_{r+1}\right] = P\!\left(\bigcup_{i=1}^{r} A_i\right) + P(A_{r+1}) - P\!\left[\bigcup_{i=1}^{r} (A_i \cap A_{r+1})\right] , \]

where the distributive law gives \(\left(\bigcup_{i=1}^{r} A_i\right) \cap A_{r+1} = \bigcup_{i=1}^{r} (A_i \cap A_{r+1})\). Using (2) for the first union,

\[ \begin{aligned} P\!\left(\bigcup_{i=1}^{r+1} A_i\right) &= \sum_{i=1}^{r+1} P(A_i) - \mathop{\sum\sum}_{1 \le i < j \le r} P(A_i \cap A_j) + \cdots + (-1)^{r-1} P(A_1 \cap \cdots \cap A_r) \\ &\quad - P\!\left[\bigcup_{i=1}^{r} (A_i \cap A_{r+1})\right] , \end{aligned} \]

the term \(P(A_{r+1})\) joining the first sum. The last union is again a union of \(r\) events, \(A_1 \cap A_{r+1}, \ldots, A_r \cap A_{r+1}\), so (2) applies to it too:

\[ \begin{aligned} P\!\left(\bigcup_{i=1}^{r+1} A_i\right) &= \sum_{i=1}^{r+1} P(A_i) - \mathop{\sum\sum}_{1 \le i < j \le r} P(A_i \cap A_j) + \cdots \\ &\quad + (-1)^{r-1} P(A_1 \cap \cdots \cap A_r) \\ &\quad - \bigg[\sum_{i=1}^{r} P(A_i \cap A_{r+1}) - \mathop{\sum\sum}_{1 \le i < j \le r} P[(A_i \cap A_{r+1}) \cap (A_j \cap A_{r+1})] \\ &\qquad + \cdots + (-1)^{r-1} P[(A_1 \cap A_{r+1}) \cap \cdots \cap (A_r \cap A_{r+1})]\bigg] \\ &= \sum_{i=1}^{r+1} P(A_i) - \mathop{\sum\sum}_{1 \le i < j \le r} P(A_i \cap A_j) + \cdots \\ &\quad + (-1)^{r-1} P(A_1 \cap \cdots \cap A_r) \\ &\quad - \bigg[\sum_{i=1}^{r} P(A_i \cap A_{r+1}) - \mathop{\sum\sum}_{1 \le i < j \le r} P(A_i \cap A_j \cap A_{r+1}) \\ &\qquad + \cdots + (-1)^{r-1} P(A_1 \cap A_2 \cap \cdots \cap A_r \cap A_{r+1})\bigg] . \end{aligned} \]

Now collect terms of the same order. The pairs \(P(A_i \cap A_{r+1})\) from the bracket, which enter with a minus sign, are exactly the pairs with \(j = r + 1\) missing from \(\sum\sum_{1 \le i < j \le r}\); together they make the sum over \(1 \le i < j \le r + 1\). In the same way the triples \(P(A_i \cap A_j \cap A_{r+1})\), now with a plus sign, complete the triple sum, and so on; the last term, \(-(-1)^{r-1} = (-1)^{r}\) times \(P(A_1 \cap \cdots \cap A_{r+1})\), stands alone. So

\[ \begin{aligned} P\!\left(\bigcup_{i=1}^{r+1} A_i\right) &= \sum_{i=1}^{r+1} P(A_i) - \mathop{\sum\sum}_{1 \le i < j \le r+1} P(A_i \cap A_j) + \mathop{\sum\sum\sum}_{1 \le i < j < k \le r+1} P(A_i \cap A_j \cap A_k) \\ &\quad - \cdots + (-1)^{r+1-1} P(A_1 \cap A_2 \cap \cdots \cap A_{r+1}) . \end{aligned} \]

Hence the theorem is true for \(n = r + 1\), and by mathematical induction it is true for all \(n\). \(\square\)

6. Multiplication Theorem of Probability

6.1 For Two Events

\[ P(A \cap B) \;=\; P(A)\, P(B \mid A) \;=\; P(B)\, P(A \mid B) \]

If \(A,B\) are independent: \(P(A \cap B) = P(A) P(B)\).

6.2 For \(n\) Events

\[ \begin{aligned} P(A_1 \cap A_2 \cap \cdots \cap A_n) &= P(A_1)\, P(A_2 \mid A_1)\, P(A_3 \mid A_1 \cap A_2) \\ &\quad \cdots P(A_n \mid A_1 \cap \cdots \cap A_{n-1}) \end{aligned} \]

If events are mutually independent: \(P\!\left(\bigcap A_i\right) = \prod P(A_i)\).

EXAMPLE 1

Two cards are drawn one after another without replacement. Probability both are aces.
\(P(A_1) = 4/52,\; P(A_2|A_1) = 3/51\). \(P(A_1 \cap A_2) = (4/52)(3/51) = 1/221\).

EXAMPLE 2

Probability of three independent machines functioning is 0.9, 0.8, 0.7. Probability all three function = 0.9 × 0.8 × 0.7 = 0.504.

Proof of the Multiplication Theorem

PROOF

Let \(n(S)\) be the total number of (equally likely) outcomes in the sample space, \(n(A)\) and \(n(B)\) the numbers favourable to \(A\) and \(B\), and \(n(A \cap B)\) the number favourable to \(A \cap B\). By the definition of probability,

\[ \begin{gathered} P(A) = \frac{n(A)}{n(S)}, \quad P(B) = \frac{n(B)}{n(S)}, \quad P(A \cap B) = \frac{n(A \cap B)}{n(S)}, \\ P(A \mid B) = \frac{n(A \cap B)}{n(B)}, \quad P(B \mid A) = \frac{n(A \cap B)}{n(A)} . \end{gathered} \]

Consider \(P(A \cap B) = n(A \cap B)/n(S)\) and multiply and divide by \(n(B)\):

\[ \begin{gathered} P(A \cap B) = \frac{n(A \cap B)}{n(S)} \cdot \frac{n(B)}{n(B)} = \frac{n(B)}{n(S)} \cdot \frac{n(A \cap B)}{n(B)} = P(B)\,P(A \mid B), \\ P(B) > 0 . \end{gathered} \]

Now multiply and divide by \(n(A)\) instead:

\[ \begin{gathered} P(A \cap B) = \frac{n(A \cap B)}{n(S)} \cdot \frac{n(A)}{n(A)} = \frac{n(A)}{n(S)} \cdot \frac{n(A \cap B)}{n(A)} = P(A)\,P(B \mid A), \\ P(A) > 0 . \;\square \end{gathered} \]

When the outcomes are not equally likely, the theorem follows directly from the definition \(P(B \mid A) = P(A \cap B)/P(A)\), multiplied through by \(P(A)\).

Multiplication Theorem for \(n\) Events, by Induction

PROOF (\(P(A_1 \cap \cdots \cap A_{n-1}) > 0\))

\(n = 2\): \(P(A_1 \cap A_2) = P(A_1)\,P(A_2 \mid A_1)\), the theorem above. …(1)

\(n = 3\): by (1), applied to \(A_1\) and \(A_2 \cap A_3\), and then to \(A_2\) and \(A_3\) given \(A_1\),

\[ \begin{aligned} P(A_1 \cap A_2 \cap A_3) &= P[A_1 \cap (A_2 \cap A_3)] = P(A_1)\,P(A_2 \cap A_3 \mid A_1) \\ &= P(A_1)\,P(A_2 \mid A_1)\,P(A_3 \mid A_1 \cap A_2) . \end{aligned} \]

From \(r\) to \(r + 1\): suppose the theorem is true for \(n = r\) …(2). Treat \(A_1 \cap \cdots \cap A_r\) as one event and apply (1), then (2):

\[ \begin{aligned} P(A_1 \cap \cdots \cap A_r \cap A_{r+1}) &= P(A_1 \cap \cdots \cap A_r)\; P(A_{r+1} \mid A_1 \cap \cdots \cap A_r) \\ &= P(A_1)\, P(A_2 \mid A_1) \cdots P(A_r \mid A_1 \cap \cdots \cap A_{r-1}) \\ &\quad \times P(A_{r+1} \mid A_1 \cap \cdots \cap A_r) . \end{aligned} \]

So the theorem holds for \(r + 1\) events, and by induction for all \(n\). The condition \(P(A_1 \cap \cdots \cap A_{n-1}) > 0\) makes every conditional probability in the product defined. \(\square\)

7. Boole's Inequality

STATEMENT

For any events \(A_1, A_2, \ldots, A_n\) (not necessarily disjoint or independent):

(i)

\[ P\!\left(\bigcap_{i=1}^{n} A_i\right) \;\ge\; \sum_{i=1}^{n} P(A_i) - (n - 1) \]

(ii)

\[ P\!\left(\bigcup_{i=1}^{n} A_i\right) \;\le\; \sum_{i=1}^{n} P(A_i) \]

Since \(P(\bar A_i) = 1 - P(A_i)\), form (i) can also be written \(P\!\left(\bigcap A_i\right) \ge 1 - \sum P(\bar A_i)\) (Bonferroni's form).

EXAMPLE 1

If \(P(A) = 0.4, P(B) = 0.5, P(C) = 0.3\), then \(P(A \cup B \cup C) \le 0.4 + 0.5 + 0.3 = 1.2\) (so at most 1).

EXAMPLE 2

If three events have probabilities 0.05, 0.04, 0.03 (rare failures), the probability that at least one occurs is at most 0.12. This is widely used in reliability engineering.

Both Forms, Proved by Induction

PROOFS

(i) \(P\!\left(\bigcap_{i=1}^{n} A_i\right) \ge \sum_{i=1}^{n} P(A_i) - (n - 1)\). By mathematical induction. For \(n = 2\),

\[ \begin{aligned} &P(A_1 \cup A_2) \le 1 \\ &P(A_1) + P(A_2) - P(A_1 \cap A_2) \le 1 \\ &P(A_1) + P(A_2) - 1 \le P(A_1 \cap A_2) \\ &P(A_1 \cap A_2) \ge P(A_1) + P(A_2) - 1 , \qquad \ldots(1) \end{aligned} \]

so the theorem is true for \(n = 2\). Suppose it is true for \(n = r\): \(P\!\left(\bigcap_{i=1}^{r} A_i\right) \ge \sum_{i=1}^{r} P(A_i) - (r - 1)\) …(2). For \(n = r + 1\),

\[ \begin{aligned} P\!\left(\bigcap_{i=1}^{r+1} A_i\right) &= P\!\left(\bigcap_{i=1}^{r} A_i \cap A_{r+1}\right) \\ &\ge P\!\left(\bigcap_{i=1}^{r} A_i\right) + P(A_{r+1}) - 1 && [\text{from (1)}] \\ &\ge \sum_{i=1}^{r} P(A_i) - (r - 1) + P(A_{r+1}) - 1 && [\text{from (2)}] \\ &= \sum_{i=1}^{r+1} P(A_i) - (r + 1 - 1) . \end{aligned} \]

So the theorem is true for \(n = r + 1\), and by induction for all \(n\).

(ii) \(P\!\left(\bigcup_{i=1}^{n} A_i\right) \le \sum_{i=1}^{n} P(A_i)\). By mathematical induction. For \(n = 2\),

\[ \begin{gathered} P(A_1 \cup A_2) = P(A_1) + P(A_2) - P(A_1 \cap A_2) \le P(A_1) + P(A_2) \\ [P(A_1 \cap A_2) \ge 0] \quad \ldots(1) \end{gathered} \]

Suppose it is true for \(n = r\): \(P\!\left(\bigcup_{i=1}^{r} A_i\right) \le \sum_{i=1}^{r} P(A_i)\) …(2). Then

\[ \begin{aligned} P\!\left(\bigcup_{i=1}^{r+1} A_i\right) = P\!\left(\bigcup_{i=1}^{r} A_i \cup A_{r+1}\right) &\le P\!\left(\bigcup_{i=1}^{r} A_i\right) + P(A_{r+1}) && [\text{from (1)}] \\ &\le \sum_{i=1}^{r} P(A_i) + P(A_{r+1}) && [\text{from (2)}] \\ &= \sum_{i=1}^{r+1} P(A_i) . \end{aligned} \]

So the theorem is true for \(n = r + 1\), and by induction for all \(n\). \(\square\)

8. Bayes' Theorem

SET-UP

Let \(B_1, B_2, \ldots, B_n\) be mutually exclusive and exhaustive events (a partition of \(S\)) with \(P(B_i) > 0\), and let \(A\) be any event with \(P(A) > 0\).

TOTAL PROBABILITY \[ P(A) \;=\; \sum_{i=1}^{n} P(B_i)\, P(A \mid B_i) \]
BAYES' THEOREM \[ P(B_k \mid A) \;=\; \dfrac{P(B_k)\, P(A \mid B_k)}{\displaystyle\sum_{i=1}^{n} P(B_i)\, P(A \mid B_i)} \]

Prior \(P(B_k)\) updated by data \(A\) gives the posterior \(P(B_k|A)\).

DERIVATION — one line from two earlier rules

Bayes' theorem is just conditional probability with its numerator and denominator each rewritten:

\[ P(B_k \mid A) = \frac{P(B_k \cap A)}{P(A)} = \frac{\overbrace{P(B_k)P(A\mid B_k)}^{\text{multiplication rule}}} {\underbrace{\sum_i P(B_i)P(A\mid B_i)}_{\text{total probability}}}. \]

The numerator is the multiplication theorem (Section 6); the denominator is the total-probability law above. Bayes therefore introduces nothing new — it reverses the conditioning from \(P(A\mid B_k)\) (which we can measure) to \(P(B_k\mid A)\) (which we want).

EXAMPLE 1 (Defective items)

Three machines \(M_1,M_2,M_3\) produce 25 %, 35 %, 40 % of items with defective rates 5 %, 4 %, 2 % respectively. A random item is found defective. Find probability it came from \(M_1\).

\[ \begin{aligned} P(D) &= 0.25(0.05) + 0.35(0.04) + 0.40(0.02) = 0.0125 + 0.0140 + 0.0080 \\ &= 0.0345 \end{aligned} \].

\(P(M_1 | D) = 0.0125 / 0.0345 = 0.362\) (≈ 36.2 %).

Item 0.25 0.35 0.40 M₁M₂M₃ 0.050.040.02 0.950.960.98 D: 0.25×0.05 = 0.0125 D: 0.35×0.04 = 0.0140 D: 0.40×0.02 = 0.0080 OKOKOK P(D) = 0.0345 → P(M₁|D) = 0.0125 / 0.0345 = 0.362
Fig 1.2 — Each defective path contributes its prior × defect-rate product; total probability \(P(D)\) sums the three red leaves, and Bayes simply asks what fraction of that total came from \(M_1\). Note \(M_1\) supplies only 25 % of items but 36 % of the defectives, because its defect rate is highest.
EXAMPLE 2 (Medical test)

1 % of population has a disease. Test sensitivity = 0.99 (true positive), false-positive rate = 0.05. Given a positive test, what is the probability the person has the disease?

\(P(D|+) = \dfrac{(0.01)(0.99)}{(0.01)(0.99) + (0.99)(0.05)} = \dfrac{0.0099}{0.0594} \approx 0.167\).

Despite the test being 99 % sensitive, only ~17 % of positives are truly diseased — the rare base rate matters!

Proof of Bayes' Theorem

PROOF

Statement. If \(E_1, E_2, \ldots, E_n\) are \(n\) mutually disjoint events with \(P(E_i) \ne 0\), \(i = 1, 2, \ldots, n\), then for any event \(A\) which is a subset of \(\bigcup_{i=1}^{n} E_i\) and has \(P(A) > 0\),

\[ P(E_i \mid A) = \frac{P(E_i)\,P(A \mid E_i)}{\sum_{j=1}^{n} P(E_j)\,P(A \mid E_j)}, \qquad i = 1, 2, \ldots, n . \]

(A partition of \(S\) satisfies the condition for every \(A\).)

Step 1: split \(A\). Since \(A \subset \bigcup_i E_i\),

\[ A = A \cap \bigcup_{i=1}^{n} E_i = (A \cap E_1) \cup (A \cap E_2) \cup \cdots \cup (A \cap E_n), \]

by the distributive law. The \(E_i\) are disjoint, so the pieces \(A \cap E_i\) are disjoint too.

Step 2: total probability. By additivity, then the multiplication theorem \(P(A \cap E_i) = P(E_i)\,P(A \mid E_i)\),

\[ P(A) = \sum_{i=1}^{n} P(A \cap E_i) = \sum_{i=1}^{n} P(E_i)\,P(A \mid E_i) . \qquad \ldots(1) \]

Step 3. By the definition of conditional probability, the multiplication theorem in the numerator and (1) in the denominator,

\[ P(E_i \mid A) = \frac{P(A \cap E_i)}{P(A)} = \frac{P(E_i)\,P(A \mid E_i)}{\sum_{j=1}^{n} P(E_j)\,P(A \mid E_j)}, \qquad i = 1, \ldots, n . \;\square \]

Worked Problems on Elementary Probability

Twenty-two problems: nine on the classical definition, four on the addition theorem, six on the multiplication theorem and independence, and three on Bayes' theorem, followed by exercises with answers. Each one names its sample space, counts (or multiplies) the favourable cases, and states the answer as a fraction in lowest terms. The counting tools are the ones from algebra: \(^{n}C_r = \binom{n}{r}\) ways to choose \(r\) things from \(n\), and \(n!\) ways to arrange \(n\) different things. Where a sample space is small enough to list, the count has been checked by listing it.

A. The Classical Definition

WORKED PROBLEM 1 — at least two heads in three tosses

Three coins are tossed. Find the probability of at least two heads.

\(S = \{HHH, HHT, HTH, THH, HTT, THT, TTH, TTT\}\), \(n = 8\) equally likely outcomes. Let \(E\) = at least two heads \(= \{HHH, HHT, HTH, THH\}\), \(m = 4\).

\[ P(E) = \frac{4}{8} = \dfrac{1}{2} . \]

By symmetry this had to be \(\tfrac12\): “at least two heads” and “at least two tails” are complements, and swapping H and T maps one onto the other.

WORKED PROBLEM 2 — sum 8 with two dice

Two dice are thrown. Find the probability that the sum is 8.

Each die has 6 faces, so \(n = 6 \times 6 = 36\) ordered pairs. Sum 8: \(E = \{(2,6), (3,5), (4,4), (5,3), (6,2)\}\), \(m = 5\).

\[ P(E) = \frac{5}{36} = \dfrac{5}{36} . \]

Note that \((2,6)\) and \((6,2)\) are different outcomes: the dice are told apart (say, red and blue), which is what makes the 36 outcomes equally likely.

WORKED PROBLEM 3 — one green and one red ball

A bag contains 4 red, 5 green and 6 yellow balls. Two balls are drawn. Find the probability that they are one green and one red.

15 balls; two can be chosen in \(n = \binom{15}{2} = \dfrac{15 \times 14}{2} = 105\) ways. One green from 5 and one red from 4: \(m = \binom{5}{1}\binom{4}{1} = 5 \times 4 = 20\).

\[ P(E) = \frac{20}{105} = \dfrac{4}{21} . \]
WORKED PROBLEM 4 — two cards: two hearts; a jack and a ten

Two cards are drawn from a well-shuffled pack of 52. Find the probability that they are (i) two hearts, (ii) a jack and a ten.

\(n = \binom{52}{2} = \dfrac{52 \times 51}{2} = 1326\).

(i) Two of the 13 hearts: \(m = \binom{13}{2} = 78\), so \(P = \dfrac{78}{1326} = \dfrac{1}{17}\).

(ii) One of 4 jacks and one of 4 tens: \(m = \binom41\binom41 = 16\), so \(P = \dfrac{16}{1326} = \dfrac{8}{663}\).

Check of (i) by the multiplication theorem (§6): \(\dfrac{13}{52} \times \dfrac{12}{51} = \dfrac{1}{17}\).

WORKED PROBLEM 5 — 53 Fridays in a leap year

Find the probability that a leap year has 53 Fridays.

366 days \(= 52\) weeks \(+ 2\) days. The 52 weeks give 52 Fridays whatever happens; a 53rd needs one of the two extra, consecutive days to be a Friday. The pair can be

(Sun, Mon), (Mon, Tue), (Tue, Wed), (Wed, Thu), (Thu, Fri), (Fri, Sat), (Sat, Sun),

\(n = 7\), taken as equally likely. Two contain a Friday: (Thu, Fri) and (Fri, Sat), so \(m = 2\) and

\[ P = \frac{2}{7} . \]

The model takes the year to start on any day of the week with equal chance; any named day gives the same \(\tfrac27\).

WORKED PROBLEM 6 — four-digit numbers ending in 5

Four-digit numbers are formed from the digits 0, 1, 2, 3, 5, 7, no digit repeated. Find the probability that the number ends in 5.

The first digit cannot be 0: 5 choices, then 5, 4 and 3 for the remaining places, so \(n = 5 \times 5 \times 4 \times 3 = 300\).

Fix 5 in the units place. The first digit is now one of 1, 2, 3, 7 (4 choices, still not 0), then 4 and 3 choices for the middle places: \(m = 4 \times 4 \times 3 = 48\).

\[ P = \frac{48}{300} = \dfrac{4}{25} . \]

Note why the answer is not simply \(\tfrac16\): the zero cannot lead, so the six final digits are not equally common. Numbers ending in 0 are over-represented (\(5 \times 4 \times 3 = 60\) of the 300), and each other final digit, 5 included, gets 48, a little under one sixth.

WORKED PROBLEM 7 — keys on the wrong hooks

Five keys are hung at random on five labelled hooks. Find the probability that at least one key is on the wrong hook.

\(n = 5! = 120\) ways to hang the keys. The complement, “every key on its own hook”, happens in exactly \(m = 1\) way.

\[ P(\text{at least one wrong}) = 1 - \frac{1}{120} = \dfrac{119}{120} . \]
WORKED PROBLEM 8 — the four S's of ASSESSMENT together

The letters of ASSESSMENT are arranged at random. Find the probability that the four S's come together.

10 letters: S four times, E twice, and A, M, N, T once each. Arrangements of letters with repeats divide out the orders of the identical letters:

\[ n = \frac{10!}{4!\,2!} = \frac{3628800}{24 \times 2} = 75600 . \]

Glue the four S's into one block. Then there are 7 units (the block, two E's, A, M, N, T):

\[ m = \frac{7!}{2!} = \frac{5040}{2} = 2520, \qquad P = \frac{2520}{75600} = \dfrac{1}{30} . \]
WORKED PROBLEM 9 — the two O's of BIOLOGY apart

The letters of BIOLOGY are arranged at random. Find the probability that the two O's do not come together.

7 letters with O twice: \(n = 7!/2!\). For the complement, glue the two O's together: 6 units, all different, \(6!\) arrangements.

\[ P(\text{together}) = \frac{6!}{7!/2!} = \frac{2}{7}, \qquad P(\text{apart}) = 1 - \frac27 = \frac57 . \]

A quicker view: only the two positions of the O's matter. Of the \(\binom72 = 21\) pairs of positions, 6 are next to each other, and \(6/21 = 2/7\).

B. The Addition Theorem

WORKED PROBLEM 10 — sum 9 or 12 with two dice

Two dice are thrown. Find the probability that the sum is either 9 or 12.

\(n(S) = 36\). \(A\) = sum 9 \(= \{(3,6), (4,5), (5,4), (6,3)\}\), \(n(A) = 4\); \(B\) = sum 12 \(= \{(6,6)\}\), \(n(B) = 1\). No pair has both sums, so \(A \cap B = \varnothing\).

\[ P(A \cup B) = P(A) + P(B) - P(A \cap B) = \frac{4}{36} + \frac{1}{36} - 0 = \dfrac{5}{36} . \]
1,1 1,2 1,3 1,4 1,5 1,6 2,1 2,2 2,3 2,4 2,5 2,6 3,1 3,2 3,3 3,4 3,5 3,6 4,1 4,2 4,3 4,4 4,5 4,6 5,1 5,2 5,3 5,4 5,5 5,6 6,1 6,2 6,3 6,4 6,5 6,6 1 1 2 2 3 3 4 4 5 5 6 6 first die second die sum 9: 4 outcomes sum 12: 1 outcome no cell is both, so P = (4 + 1)/36 = 5/36
Fig 1.3 — Worked Problem 10. The two events share no outcome, so \(P(A \cap B) = 0\) and the addition theorem reduces to adding the counts.
WORKED PROBLEM 11 — a spade or a face card

A card is drawn from a pack of 52. Find the probability that it is a spade or a face card (jack, queen or king).

\(A\) = spade: 13 cards; \(B\) = face card: 12 cards; \(A \cap B\) = face card of spades: 3 cards.

\[ P(A \cup B) = \frac{13}{52} + \frac{12}{52} - \frac{3}{52} = \frac{22}{52} = \dfrac{11}{26} . \]

Without the subtraction the three face cards of spades would be counted twice.

WORKED PROBLEM 12 — tokens divisible by 4 or 6

A token is drawn at random from 30 tokens numbered 1 to 30. Find the probability that its number is divisible by 4 or 6.

\(A = \{4, 8, 12, 16, 20, 24, 28\}\), \(B = \{6, 12, 18, 24, 30\}\), \(A \cap B = \{12, 24\}\) (divisible by both, i.e. by 12, the least common multiple — not by 24).

\[ P(A \cup B) = \frac{7}{30} + \frac{5}{30} - \frac{2}{30} = \frac{10}{30} = \dfrac{1}{3} . \]
WORKED PROBLEM 13 — two balls of one colour

A box contains 7 white and 5 blue balls. Two are drawn at random. Find the probability that they are both white or both blue.

\(n = \binom{12}{2} = 66\). \(A\) = both white: \(\binom{7}{2} = 21\); \(B\) = both blue: \(\binom{5}{2} = 10\). Two balls cannot be both white and both blue, so \(A \cap B = \varnothing\).

\[ P(A \cup B) = \frac{21}{66} + \frac{10}{66} = \frac{31}{66} = \dfrac{31}{66} . \]

C. The Multiplication Theorem and Independence

WORKED PROBLEM 14 — two green balls, with and without replacement

A bag contains 5 green and 7 white balls. Two are drawn in succession. Find the probability that both are green if the first ball is (i) replaced, (ii) not replaced.

Let \(A\) = green at the first draw, \(B\) = green at the second.

(i) Replaced. The bag is the same for both draws, so \(A\) and \(B\) are independent: \(P(A) = P(B) = 5/12\) and

\[ P(A \cap B) = P(A)\,P(B) = \frac{5}{12} \cdot \frac{5}{12} = \dfrac{25}{144} . \]

(ii) Not replaced. After a green ball is taken, 11 balls remain, 4 of them green: \(P(B \mid A) = 4/11\). By the multiplication theorem,

\[ P(A \cap B) = P(A)\,P(B \mid A) = \frac{5}{12} \cdot \frac{4}{11} = \frac{20}{132} = \dfrac{5}{33} . \]
WORKED PROBLEM 15 — three girls in a row

Three students are selected one after another from a class of 14 boys and 6 girls. Find the probability that all three are girls.

\(A\), \(B\), \(C\) = a girl at the first, second, third selection. Each selection leaves one girl and one student fewer:

\[ P(A \cap B \cap C) = P(A)\,P(B \mid A)\,P(C \mid A \cap B) = \frac{6}{20} \cdot \frac{5}{19} \cdot \frac{4}{18} = \frac{120}{6840} = \dfrac{1}{57} . \]

Check by counting: \(\binom{6}{3} \big/ \binom{20}{3} = 20/1140 = \dfrac{1}{57}\).

WORKED PROBLEM 16 — two archers at a target

Two archers shoot at a target in turn, hitting it with probabilities 0.4 and 0.25. The second shoots only if the first misses. Find the probability that (i) the target is hit, (ii) both miss.

\(A\) = first hits, \(B\) = second hits, the two attempts independent.

(i) The target is hit if the first hits, or the first misses and the second hits. These are mutually exclusive, so

\[ P = P(A) + P(\bar A \cap B) = P(A) + P(\bar A)\,P(B) = 0.4 + (0.6)(0.25) = 0.55 . \]

(ii) \(P(\bar A \cap \bar B) = P(\bar A)\,P(\bar B) = (0.6)(0.75) = 0.45\) (Result 8). As a check, (i) and (ii) are complements: \(0.55 + 0.45 = 1\).

WORKED PROBLEM 17 — will the puzzle be solved?

Three friends, working independently, solve a puzzle with probabilities \(\tfrac13\), \(\tfrac25\) and \(\tfrac12\). Find the probability that it is solved.

It is solved if at least one solves it: \(P(A \cup B \cup C)\). By the addition theorem for three events, with independence turning each intersection into a product,

\[ P(A \cup B \cup C) = \frac13 + \frac25 + \frac12 - \frac13\cdot\frac25 - \frac25\cdot\frac12 - \frac13\cdot\frac12 + \frac13\cdot\frac25\cdot\frac12 . \]

Over the common denominator 30,

\[ P(A \cup B \cup C) = \frac{10 + 12 + 15 - 4 - 6 - 5 + 2}{30} = \dfrac{4}{5} . \]

Another way. It is unsolved only if all three fail, and (Result 8) the failures are independent too:

\[ P(\bar A \cap \bar B \cap \bar C) = \frac23 \cdot \frac35 \cdot \frac12 = \dfrac{1}{5}, \qquad P(A \cup B \cup C) = 1 - \dfrac{1}{5} = \dfrac{4}{5} . \]
WORKED PROBLEM 18 — at least one ball of each colour

A box contains 5 red, 3 white and 4 black balls. Four are drawn at random. Find the probability that there is at least one of each colour.

\(n = \binom{12}{4} = 495\). Four balls with all three colours means one colour twice and the others once — three disjoint cases:

\[ P = \frac{90 + 60 + 120}{495} = \frac{270}{495} = \dfrac{6}{11} = 0.5455 . \]
WORKED PROBLEM 19 — bounds from two probabilities

\(P(A) = \tfrac{2}{3}\) and \(P(B) = \tfrac{3}{5}\). Show that (i) \(P(A \cup B) \ge \tfrac{2}{3}\), (ii) \(\tfrac{4}{15} \le P(A \cap B) \le \tfrac{3}{5}\).

(i) \(A \subset A \cup B\), so by monotonicity (§2) \(P(A \cup B) \ge P(A) = \tfrac{2}{3}\).

(ii) \(A \cap B \subset B\), so \(P(A \cap B) \le P(B) = \tfrac{3}{5}\). For the lower bound, \(P(A \cup B) \le 1\) and the addition theorem give

\[ P(A \cap B) \ge P(A) + P(B) - 1 = \tfrac{2}{3} + \tfrac{3}{5} - 1 = \dfrac{4}{15} , \]

which is Boole's inequality in its intersection form (§7) with \(n = 2\). The two probabilities add to more than 1, so the events must overlap by at least the excess, \(\tfrac{4}{15}\).

D. Bayes' Theorem

WORKED PROBLEM 20 — three bags, a white and a red ball

Bag I holds 2 white, 3 black and 1 red balls; bag II 1 white, 2 black and 3 red; bag III 3 white, 4 black and 5 red. A bag is chosen at random and two balls drawn: one white, one red. Find the probability that they came from each bag.

\(E_1, E_2, E_3\) = bag I, II, III chosen, each with prior \(\tfrac13\). \(A\) = one white and one red.

\[ \begin{gathered} P(A \mid E_1) = \frac{\binom{2}1\binom{1}1}{\binom{6}2} = \frac{2}{15} = \dfrac{2}{15}, \quad P(A \mid E_2) = \frac{\binom{1}1\binom{3}1}{\binom{6}2} = \frac{3}{15} = \dfrac{1}{5}, \\ P(A \mid E_3) = \frac{\binom{3}1\binom{5}1}{\binom{12}2} = \frac{15}{66} = \dfrac{5}{22} . \end{gathered} \]

Total probability:

\[ P(A) = \frac13\left(\dfrac{2}{15} + \dfrac{1}{5} + \dfrac{5}{22}\right) = \dfrac{37}{198} . \]

Bayes' theorem divides each path by this total:

\[ P(E_1 \mid A) = \dfrac{44}{185}, \qquad P(E_2 \mid A) = \dfrac{66}{185}, \qquad P(E_3 \mid A) = \dfrac{15}{37} . \]

They add to 1, as they must. Bag III, the most likely source, is the one where a white-red pair is easiest to draw.

WORKED PROBLEM 21 — which line made the faulty switch?

Assembly lines A, B, C make 25%, 35% and 40% of a factory's switches; 5%, 4% and 2% of their output is faulty. A switch drawn at random is faulty. Find the probability that it was made on each line.

Priors \(P(E_1) = 0.25\), \(P(E_2) = 0.35\), \(P(E_3) = 0.40\); likelihoods \(P(A \mid E_i) = 0.05, 0.04, 0.02\).

\[ \begin{aligned} P(A) &= (0.25)(0.05) + (0.35)(0.04) + (0.40)(0.02) = 0.0125 + 0.0140 + 0.0080 \\ &= 0.0345 , \end{aligned} \] \[ \begin{aligned} P(E_1 \mid A) &= \frac{0.0125}{0.0345} = \dfrac{25}{69} = 0.3623, \\ P(E_2 \mid A) &= \frac{0.0140}{0.0345} = \dfrac{28}{69} = 0.4058, \\ P(E_3 \mid A) &= \frac{0.0080}{0.0345} = \dfrac{16}{69} = 0.2319 . \end{aligned} \]

Line C makes the most switches but is the least likely culprit: its fault rate is the lowest. Line B, with a high share and a high rate, leads.

WORKED PROBLEM 22 — six balls from one of three large urns

Urn I holds 40 red, 30 white and 30 black balls (100); urn II 25 red, 45 white and 20 black (90); urn III 35 red, 50 white and 55 black (140). An urn is chosen at random and 6 balls drawn: 4 red and 2 white. Find the probability that they came from urn I, and from urn III.

Priors \(\tfrac13\) each. The likelihoods choose 4 of the reds and 2 of the whites out of all \(\binom{N}{6}\) samples:

\[ \begin{gathered} P(A \mid E_1) = \frac{\binom{40}{4}\binom{30}{2}}{\binom{100}{6}} = 0.0333, \quad P(A \mid E_2) = \frac{\binom{25}{4}\binom{45}{2}}{\binom{90}{6}} = 0.0201, \\ P(A \mid E_3) = \frac{\binom{35}{4}\binom{50}{2}}{\binom{140}{6}} = 0.0068, \end{gathered} \] \[ P(A) = \tfrac13(0.0333 + 0.0201 + 0.0068) = 0.02010 . \]

Carrying full precision rather than the four-place values,

\[ P(E_1 \mid A) = 0.5531, \qquad P(E_2 \mid A) = 0.3336, \qquad P(E_3 \mid A) = 0.1134 , \]

and the probability that the balls came from urn I or urn III is \(0.5531 + 0.1134 = 0.6664\). With likelihoods this small, rounding them to four places before dividing can move the third decimal of the answers, so keep the exact values until the end.

Exercises, with Answers Checked

PRACTICE
  1. Four coins are tossed. Find the probability of exactly two heads. Ans. \(\binom42/16 = \tfrac{3}{8}\).
  2. Six coins are tossed. Find the probability of at least one tail. Ans. \(1 - \tfrac{1}{64} = \tfrac{63}{64}\).
  3. Two dice are thrown. Find the probability that the sum is 5. Ans. \(\tfrac{1}{9}\): \((1,4), (2,3), (3,2), (4,1)\).
  4. Two dice are thrown. Find the probability of an odd number on both faces. Ans. \(\tfrac{3 \times 3}{36} = \tfrac{1}{4}\). (Not \(\tfrac12\), which is the probability of an odd sum.)
  5. Four cards are drawn from a pack. Find the probability that (i) all are clubs, (ii) there is one of each suit. Ans. (i) \(\binom{13}{4}\big/\binom{52}{4} = \tfrac{11}{4165}\), (ii) \(13^4\big/\binom{52}{4} = \tfrac{2197}{20825}\).
  6. Find the probability that a leap year has exactly 52 Wednesdays. Ans. \(\tfrac57\): neither extra day is a Wednesday in 5 of the 7 pairs.
  7. Find the probability that a year of 365 days has 53 Saturdays. Ans. \(\tfrac17\): 365 days are 52 weeks and 1 day, which must be a Saturday.
  8. An urn holds 5 green, 8 black and 6 white balls. One is drawn. Find the probability that it is black or white. Ans. \(\tfrac{8 + 6}{19} = \tfrac{14}{19}\).

Key Take-aways from Unit 1