Figure 4.3: Sample Space Partition, Evidence $B$, and Probability Tree Pathways
1. Partitions of the Sample Space
A set of events $A_1, A_2, \dots, A_k$ forms a partition of the sample space $S$ if and only if they satisfy two conditions:
- Pairwise Disjoint (Mutually Exclusive): $A_i \cap A_j = \emptyset$ for all $i \neq j$. (No two events can occur simultaneously).
- Exhaustive: $\bigcup_{i=1}^k A_i = A_1 \cup A_2 \cup \dots \cup A_k = S$, which implies: $$\sum_{i=1}^k P(A_i) = 1$$
2. The Law of Total Probability
Let $A_1, A_2, \dots, A_k$ be a partition of $S$ with $P(A_i) > 0$. For any arbitrary event $B$ in the same sample space, $B$ can be decomposed into disjoint intersections:
$$B = (B \cap A_1) \cup (B \cap A_2) \cup \dots \cup (B \cap A_k)$$Applying the multiplication rule $P(B \cap A_i) = P(A_i)P(B \mid A_i)$ yields the Law of Total Probability:
$$P(B) = \sum_{i=1}^k P(A_i) P(B \mid A_i) = P(A_1)P(B \mid A_1) + P(A_2)P(B \mid A_2) + \dots + P(A_k)P(B \mid A_k)$$In a tree diagram, $P(B)$ is simply the sum of all branch pathways that terminate in event $B$.
3. Bayes’ Theorem
When an outcome or evidence $B$ is observed, Bayes’ Theorem allows us to invert the condition—calculating the posterior probability that $B$ was generated by a specific source $A_j$:
$$P(A_j \mid B) = \frac{P(A_j \cap B)}{P(B)} = \frac{P(A_j) P(B \mid A_j)}{\sum_{i=1}^k P(A_i) P(B \mid A_i)}$$- Prior Probability $P(A_j)$: The baseline probability of cause $A_j$ before observing evidence $B$.
- Likelihood $P(B \mid A_j)$: The probability that cause $A_j$ produces evidence $B$.
- Total Evidence Probability $P(B)$: The normalizing constant summing all pathways to $B$.
- Posterior Probability $P(A_j \mid B)$: The updated probability of cause $A_j$ given that $B$ has occurred.
4. The Base Rate Fallacy & Medical Testing
In medical diagnostic tests, disease prevalence is often rare (e.g. $1\%$). Even with high sensitivity ($95\%$) and high specificity ($95\%$), the vast majority of positive test results are false positives because healthy individuals outnumber diseased individuals by 99 to 1. Always construct a 10,000-person contingency frequency table to visually verify calculations!
Worked Examples
Worked Example 1: Diagnostic Screening & The False Positive Paradox
A rare medical condition has a prevalence of $1\%$ in a population. A diagnostic blood test has:
• Sensitivity (true positive rate): $P(+ \mid D) = 0.95$
• False positive rate: $P(+ \mid D^c) = 0.05$
A randomly selected person tests positive.
(a) Show that the total probability of a positive test result is $0.059$. [3 marks]
(b) Calculate the probability that the person actually has the condition, given that they tested positive. [3 marks]
(c) Explain why this probability is surprisingly low using a frequency table of $10\,000$ people. [2 marks]
Full Markscheme Solution:
(a) Total Probability of Positive Test $P(+)$:
The population is partitioned into diseased ($D$) and healthy ($D^c$):
$$P(D) = 0.01, \quad P(D^c) = 1 - 0.01 = 0.99$$Apply the Law of Total Probability:
$$P(+) = P(D) P(+ \mid D) + P(D^c) P(+ \mid D^c) \quad [M1]$$ $$= (0.01)(0.95) + (0.99)(0.05) \quad [A1]$$ $$= 0.0095 + 0.0495 = 0.059 \quad [AG]$$(b) Posterior Probability $P(D \mid +)$:
Apply Bayes’ Theorem:
$$P(D \mid +) = \frac{P(D \cap +)}{P(+)} = \frac{P(D) P(+ \mid D)}{P(+)} \quad [M1]$$ $$= \frac{0.0095}{0.059} = \frac{95}{590} = \frac{19}{118} \quad [A1]$$ $$= 0.161016... \approx 0.161 \text{ (or } 16.1\%\text{)} \quad [A1]$$(c) Natural Frequency Justification:
In a representative cohort of $10\,000$ individuals:
- $1\%$ have the disease: $100$ people. Of these, $95\%$ test positive: $95$ true positives.
- $99\%$ are healthy: $9\,900$ people. Of these, $5\%$ test positive: $0.05 \times 9\,900 = 495$ false positives.
Total positive tests $= 95 + 495 = 590$. Of these, only $95$ have the disease: $\frac{95}{590} \approx 16.1\%$. Because the disease is rare, healthy false positives vastly outnumber true positives $[R1][A1]$.
Examiner Commentary: Candidates routinely write $P(D \mid +) = 0.95$, mistaking the test sensitivity $P(+ \mid D)$ for the predictive value $P(D \mid +)$. In IB marking, failing to weight by the prior base rate results in the loss of all method marks.
Worked Example 2: Three-Machine Manufacturing Quality Control
A manufacturing plant produces microchips using three machines: $A, B,$ and $C$.
Machine $A$ produces $50\%$ of all chips, Machine $B$ produces $30\%$, and Machine $C$ produces $20\%$.
The defect rates are $1\%$ for $A$, $2\%$ for $B$, and $5\%$ for $C$.
A randomly chosen chip is inspected.
(a) Find the probability that the chip is defective. [3 marks]
(b) Given that a chip is defective, find the probability that it came from Machine $C$. [3 marks]
(c) Given that a chip is not defective, find the probability that it was produced by Machine $A$. [3 marks]
Full Markscheme Solution:
(a) Total Defect Probability $P(D)$:
Machines $A, B, C$ form a partition with priors $P(A)=0.50, P(B)=0.30, P(C)=0.20$.
$$P(D) = P(A)P(D \mid A) + P(B)P(D \mid B) + P(C)P(D \mid C) \quad [M1]$$ $$= (0.50)(0.01) + (0.30)(0.02) + (0.20)(0.05) \quad [A1]$$ $$= 0.005 + 0.006 + 0.010 = 0.021 \quad [A1]$$(b) Posterior Probability $P(C \mid D)$:
$$P(C \mid D) = \frac{P(C \cap D)}{P(D)} = \frac{P(C)P(D \mid C)}{P(D)} \quad [M1]$$ $$= \frac{0.010}{0.021} = \frac{10}{21} \approx 0.47619... \approx 0.476 \quad [A1]$$(c) Posterior Probability for Non-Defective Chip $P(A \mid D^c)$:
The total probability of a non-defective chip is $P(D^c) = 1 - P(D) = 1 - 0.021 = 0.979$ $[A1]$.
The likelihood that Machine $A$ produces a non-defective chip is $P(D^c \mid A) = 1 - 0.01 = 0.99$.
Apply Bayes’ Theorem:
Examiner Commentary: Notice how the posterior probabilities update from the priors: Machine $C$'s share of defects jumped from a prior of $20\%$ to a posterior of $47.6\%$ because of its high defect rate ($5\%$), whereas Machine $A$'s share dropped from $50\%$ to $\frac{5}{21} \approx 23.8\%$.
Worked Example 3: Unknown Mixture Parameter in Urn Selection
A game show host has two identical-looking bags: Bag 1 and Bag 2.
Bag 1 contains 8 red marbles and 2 blue marbles.
Bag 2 contains 2 red marbles and 8 blue marbles.
A contestant chooses Bag 1 with probability $p$ and Bag 2 with probability $1 - p$. A marble is then drawn at random.
(a) Show that the probability of drawing a red marble is $P(R) = 0.6p + 0.2$. [3 marks]
(b) Given that the overall probability of drawing a red marble is $0.5$, find the value of $p$. [2 marks]
(c) If a red marble was indeed drawn, find the posterior probability that it came from Bag 1. [2 marks]
Full Markscheme Solution:
(a) Expressing $P(R)$ in terms of $p$:
$$P(R \mid B_1) = \frac{8}{10} = 0.8, \quad P(R \mid B_2) = \frac{2}{10} = 0.2$$By the Law of Total Probability:
$$P(R) = P(B_1)P(R \mid B_1) + P(B_2)P(R \mid B_2) \quad [M1]$$ $$= p(0.8) + (1 - p)(0.2) = 0.8p + 0.2 - 0.2p \quad [A1]$$ $$= 0.6p + 0.2 \quad [AG]$$(b) Finding $p$:
$$0.6p + 0.2 = 0.5 \implies 0.6p = 0.3 \implies p = \frac{0.3}{0.6} = 0.5 \quad [M1][A1]$$(c) Posterior Probability $P(B_1 \mid R)$:
$$P(B_1 \mid R) = \frac{P(B_1 \cap R)}{P(R)} = \frac{p \times 0.8}{0.5} = \frac{0.5 \times 0.8}{0.5} = 0.8 \quad [M1][A1]$$Examiner Commentary: In mixture problems, always verify that the solved parameter $p$ satisfies $0 \le p \le 1$. If an algebraic step yields $p < 0$ or $p > 1$, an arithmetic or sign error occurred in the total probability formulation.
Worked Example 4: Sequential Repeated Testing under Conditional Independence
In the medical screening model from Exemplar 1, disease prevalence is $P(D) = 0.01$, sensitivity is $P(+ \mid D) = 0.95$, and false positive rate is $P(+ \mid D^c) = 0.05$.
A patient receives an initial positive result ($+_1$). To confirm, a second independent blood test is administered, which also returns positive ($+_2$).
Assume the two test results are conditionally independent given the patient’s disease status.
(a) State the mathematical meaning of conditional independence for this scenario. [1 mark]
(b) Calculate the probability that both tests return positive, $P(+_1 \cap +_2)$. [3 marks]
(c) Calculate the updated posterior probability that the patient has the disease, $P(D \mid +_1 \cap +_2)$. [3 marks]
Full Markscheme Solution:
(a) Conditional Independence Statement:
$$P(+_1 \cap +_2 \mid D) = P(+_1 \mid D) \times P(+_2 \mid D) = (0.95)^2$$ $$P(+_1 \cap +_2 \mid D^c) = P(+_1 \mid D^c) \times P(+_2 \mid D^c) = (0.05)^2 \quad [R1]$$(b) Total Probability of Two Positive Tests:
$$P(+_1 \cap +_2) = P(D)P(+_1 \cap +_2 \mid D) + P(D^c)P(+_1 \cap +_2 \mid D^c) \quad [M1]$$ $$= (0.01)(0.95)^2 + (0.99)(0.05)^2 \quad [A1]$$ $$= (0.01)(0.9025) + (0.99)(0.0025) = 0.009025 + 0.002475 = 0.0115 \quad [A1]$$(c) Updated Posterior Probability:
$$P(D \mid +_1 \cap +_2) = \frac{P(D \cap +_1 \cap +_2)}{P(+_1 \cap +_2)} = \frac{0.009025}{0.0115} \quad [M1]$$ $$= \frac{9025}{11500} = \frac{361}{460} \approx 0.78478... \approx 0.785 \text{ (or } 78.5\%\text{)} \quad [A1]$$Examiner Commentary: Notice the dramatic leap: a single positive test yielded only $16.1\%$ confidence, but two consecutive positive tests raise the posterior probability to $78.5\%$. This demonstrates the power of sequential Bayesian updating in medical and forensic science.
Worked Example 5: Section B Multi-Part Automated Fraud Detection System
A bank uses an automated algorithm to flag suspicious credit card transactions ($F$).
Transactions fall into three categories:
• Domestic in-store ($C_1$): accounts for $75\%$ of all transactions; fraud rate is $0.1\%$.
• Domestic online ($C_2$): accounts for $20\%$ of all transactions; fraud rate is $1.0\%$.
• International ($C_3$): accounts for $5\%$ of all transactions; fraud rate is $5.0\%$.
When a transaction is fraudulent ($T_F$), the algorithm flags it ($F$) with probability $0.90$.
When a transaction is legitimate ($T_L$), the algorithm mistakenly flags it ($F$) with probability $0.02$.
(a) Calculate the overall probability that a randomly chosen transaction is fraudulent, $P(T_F)$. [3 marks]
(b) Calculate the probability that a transaction is flagged by the algorithm, $P(F)$. [3 marks]
(c) If a transaction is flagged, find the probability that it is genuinely fraudulent. [3 marks]
(d) Given that a flagged transaction is confirmed to be fraudulent, find the probability that it was an international transaction. [3 marks]
Full Markscheme Solution:
(a) Overall Fraud Probability $P(T_F)$:
$$P(T_F) = P(C_1)P(T_F \mid C_1) + P(C_2)P(T_F \mid C_2) + P(C_3)P(T_F \mid C_3) \quad [M1]$$ $$= (0.75)(0.001) + (0.20)(0.01) + (0.05)(0.05) \quad [A1]$$ $$= 0.00075 + 0.00200 + 0.00250 = 0.00525 \quad [A1]$$Thus, $P(T_L) = 1 - 0.00525 = 0.99475$.
(b) Probability of Flag $P(F)$:
Partition by genuine fraud status ($T_F$ vs $T_L$):
$$P(F) = P(T_F)P(F \mid T_F) + P(T_L)P(F \mid T_L) \quad [M1]$$ $$= (0.00525)(0.90) + (0.99475)(0.02) \quad [A1]$$ $$= 0.004725 + 0.019895 = 0.02462 \quad [A1]$$(c) Predictive Accuracy $P(T_F \mid F)$:
$$P(T_F \mid F) = \frac{P(T_F \cap F)}{P(F)} = \frac{0.004725}{0.02462} \approx 0.1919... \approx 0.192 \text{ (or } 19.2\%\text{)} \quad [M1][A1]$$(d) Origin of Confirmed Fraud $P(C_3 \mid T_F)$:
Here the condition is $T_F$ (the transaction is known to be fraudulent):
$$P(C_3 \mid T_F) = \frac{P(C_3 \cap T_F)}{P(T_F)} = \frac{P(C_3)P(T_F \mid C_3)}{P(T_F)} \quad [M1]$$ $$= \frac{(0.05)(0.05)}{0.00525} = \frac{0.00250}{0.00525} = \frac{250}{525} = \frac{10}{21} \approx 0.476 \quad [A1]$$Examiner Commentary: Part (d) requires students to carefully identify the conditioning event ($T_F$, not $F$). Almost half ($47.6\%$) of all fraudulent transactions originate internationally, despite international transactions making up only $5\%$ of overall traffic!
Practice Exercises (10 Tiered Questions)
Try these 10 exam-style questions, from core skills to harder problems. Open each question to view its solution.
Factory $A$ produces $60\%$ of light bulbs with a $2\%$ defect rate. Factory $B$ produces $40\%$ of light bulbs with a $5\%$ defect rate. Find the probability that a randomly selected light bulb is defective.
Show Full Solution
Apply the Law of Total Probability: [M1]
$P(D) = P(A)P(D \mid A) + P(B)P(D \mid B) = (0.60)(0.02) + (0.40)(0.05) = 0.012 + 0.020 = 0.032$. [A1]
Examiner Tip: Always write out the formula with event letters before substituting numbers to secure the method mark [M1].
Using the light bulb data from Exercise 1, given that a bulb is found to be defective, find the probability that it was produced by Factory $A$.
Show Full Solution
Apply Bayes' Theorem: [M1]
$P(A \mid D) = \frac{P(A \cap D)}{P(D)} = \frac{0.012}{0.032} = \frac{12}{32} = \frac{3}{8} = 0.375$. [A1]
Examiner Tip: Even though Factory $A$ produced the majority of bulbs ($60\%$), its lower defect rate means it accounts for only $37.5\%$ of all defective items.
A medical test has sensitivity $P(+ \mid D) = 0.90$ and false positive rate $P(+ \mid D^c) = 0.10$. The disease prevalence is $20\%$. Find $P(D \mid +)$.
Show Full Solution
$P(+) = (0.20)(0.90) + (0.80)(0.10) = 0.18 + 0.08 = 0.26$. [M1]
$P(D \mid +) = \frac{0.18}{0.26} = \frac{18}{26} = \frac{9}{13} \approx 0.692$. [A1]
Examiner Tip: $P(D \mid +) \neq 0.90$. The sensitivity is conditional on having the disease, not on testing positive!
From the three-machine factory in Exemplar 2 ($P(A)=0.5, P(B)=0.3, P(C)=0.2$; defect rates $1\%, 2\%, 5\%$), a microchip is found to be non-defective. Find the probability that it was produced by Machine $C$.
Show Full Solution
Non-defect probability: $P(D^c) = 1 - 0.021 = 0.979$. [A1]
Likelihood for Machine $C$: $P(D^c \mid C) = 1 - 0.05 = 0.95$. [A1]
Bayes: $P(C \mid D^c) = \frac{P(C)P(D^c \mid C)}{P(D^c)} = \frac{0.20 \times 0.95}{0.979} = \frac{0.190}{0.979} = \frac{190}{979} \approx 0.194$. [M1][A1]
Examiner Tip: Machine $C$'s share of non-defective chips ($19.4\%$) is slightly below its prior production share ($20\%$), as expected.
Bag $A$ contains 7 white and 3 black counters. Bag $B$ contains 3 white and 7 black counters. A coin is tossed to select a bag with equal probability, and a counter is drawn. Given that the counter is white, find the probability it came from Bag $A$.
Show Full Solution
Total white probability: $P(W) = \frac{1}{2}\left(\frac{7}{10}\right) + \frac{1}{2}\left(\frac{3}{10}\right) = \frac{7}{20} + \frac{3}{20} = \frac{10}{20} = 0.5$. [M1]
Bayes: $P(A \mid W) = \frac{P(A \cap W)}{P(W)} = \frac{7/20}{10/20} = \frac{7}{10} = 0.70$. [A1]
Examiner Tip: When priors are equal, posterior probabilities are directly proportional to the likelihoods: $\frac{7}{7 + 3} = 0.7$.
Sources $A, B,$ and $C$ have prior probabilities $0.2, 0.3,$ and $0.5$. The likelihood of observing signal $E$ from these sources is $P(E \mid A) = 0.40, P(E \mid B) = 0.20,$ and $P(E \mid C) = 0.10$. Find all three posterior probabilities $P(A \mid E), P(B \mid E),$ and $P(C \mid E)$.
Show Full Solution
Joint probabilities: [M1]
$P(A \cap E) = 0.2(0.4) = 0.08$
$P(B \cap E) = 0.3(0.2) = 0.06$
$P(C \cap E) = 0.5(0.1) = 0.05$
Total evidence: $P(E) = 0.08 + 0.06 + 0.05 = 0.19$. [A1]
Posteriors: [A1]
$P(A \mid E) = \frac{8}{19} \approx 0.421$
$P(B \mid E) = \frac{6}{19} \approx 0.316$
$P(C \mid E) = \frac{5}{19} \approx 0.263$
Check: $\frac{8 + 6 + 5}{19} = 1$.
A box of screws contains regular screws and coated screws in proportions $p$ and $1 - p$. The probability that a regular screw rusts is $0.15$, while for coated screws it is $0.03$. A randomly chosen screw is found to be rusted. If $P(\text{Rusted}) = 0.06$, find the value of $p$ and $P(\text{Regular} \mid \text{Rusted})$.
Show Full Solution
Law of Total Probability: [M1]
$P(R) = 0.15p + 0.03(1 - p) = 0.06 \implies 0.12p + 0.03 = 0.06 \implies 0.12p = 0.03 \implies p = 0.25$. [A1]
Posterior: [M1]
$P(\text{Regular} \mid R) = \frac{0.25(0.15)}{0.06} = \frac{0.0375}{0.06} = \frac{5}{8} = 0.625$. [A1]
Examiner Tip: Even though only $25\%$ of screws are regular, they account for $62.5\%$ of all rusted screws due to their higher corrosion susceptibility.
A polygraph test detects a lie $90\%$ of the time when a subject is lying, but has an $8\%$ false alarm rate when a subject is telling the truth. In an investigation of 100 suspects, only 1 suspect is guilty (lying). If a suspect fails the polygraph, find the probability that they are actually lying.
Show Full Solution
Priors: $P(L) = 0.01, P(T) = 0.99$.
Total probability of failing the polygraph ($F$): [M1]
$P(F) = (0.01)(0.90) + (0.99)(0.08) = 0.0090 + 0.0792 = 0.0882$. [A1]
Bayes: [M1]
$P(L \mid F) = \frac{0.0090}{0.0882} = \frac{90}{882} = \frac{5}{49} \approx 0.102 \text{ (or } 10.2\%\text{)}$. [A1]
Examiner Tip: Nearly $90\%$ of suspects who fail the test are completely innocent! This is a classic legal application of the base rate fallacy.
For the medical test in Exemplar 4 ($P(D)=0.01, P(+|D)=0.95, P(+|D^c)=0.05$), a patient tests positive THREE times in a row. Assuming the three tests are conditionally independent, find the updated posterior probability $P(D \mid +_1 \cap +_2 \cap +_3)$.
Show Full Solution
Joint probabilities for three positives: [M1]
$P(D \cap +++) = (0.01)(0.95)^3 = (0.01)(0.857375) = 0.00857375$. [A1]
$P(D^c \cap +++) = (0.99)(0.05)^3 = (0.99)(0.000125) = 0.00012375$. [A1]
Total probability $P(+++) = 0.00857375 + 0.00012375 = 0.0086975$.
Posterior: [M1]
$P(D \mid +++) = \frac{0.00857375}{0.0086975} = \frac{857375}{869750} = \frac{6859}{6958} \approx 0.98576... \approx 0.986 \text{ (or } 98.6\%\text{)}$. [A1]
Examiner Tip: Notice the Bayesian trajectory: Prior $= 1\% \to$ Test 1 $= 16.1\% \to$ Test 2 $= 78.5\% \to$ Test 3 $= 98.6\%$.
Urn 1 has 4 red and 6 black balls. Urn 2 has 7 red and 3 black balls. An urn is chosen at random ($p = 0.5$). Two balls are drawn without replacement from the selected urn. Both balls turn out to be red. Find the probability that Urn 2 was selected.
Show Full Solution
Likelihood from Urn 1 (without replacement): [M1]
$P(RR \mid U_1) = \frac{4}{10} \times \frac{3}{9} = \frac{12}{90} = \frac{2}{15}$. [A1]
Likelihood from Urn 2 (without replacement):
$P(RR \mid U_2) = \frac{7}{10} \times \frac{6}{9} = \frac{42}{90} = \frac{7}{15}$. [A1]
Total probability of two red balls: [M1]
$P(RR) = \frac{1}{2}\left(\frac{2}{15}\right) + \frac{1}{2}\left(\frac{7}{15}\right) = \frac{9}{30} = \frac{3}{10} = 0.30$.
Bayes: [M1]
$P(U_2 \mid RR) = \frac{\frac{1}{2}\left(\frac{7}{15}\right)}{\frac{3}{10}} = \frac{7/30}{9/30} = \frac{7}{9} \approx 0.778$. [A1]
Examiner Tip: Remember that drawing without replacement changes the denominator from 10 to 9 for the second draw!
Formula Booklet References
Syllabus 4.6 & AHL Probability: Conditional Probability & Bayes’ Theorem
$$P(A \mid B) = \frac{P(A \cap B)}{P(B)}$$ $$P(B) = \sum_{i=1}^k P(A_i) P(B \mid A_i)$$ $$P(A_k \mid B) = \frac{P(A_k) P(B \mid A_k)}{\sum_{i=1}^k P(A_i) P(B \mid A_i)}$$Key Formulas & Identities
1. Definition of a Partition
Events $A_1, A_2, \dots, A_k$ must be mutually exclusive ($A_i \cap A_j = \emptyset$) and exhaustive ($\sum P(A_i) = 1$). If they overlap, Bayes’ theorem in this standard form cannot be applied.
2. Conditional Independence Assumption for Multiple Tests
$$P(E_1 \cap E_2 \mid H) = P(E_1 \mid H) \times P(E_2 \mid H)$$You cannot simply multiply test results unless you assume they are conditionally independent given the state of the hypothesis.
3. 10,000-Person Frequency Table Verification
Whenever solving rare-event screening problems, verify your algebraic fractions using whole integer frequencies in a 2x2 table: True Positives, False Positives, False Negatives, True Negatives.
Common Exam Pitfalls
Transposing the Condition (The Fallacy of the Inverse)
$P(A \mid B)$ is NOT equal to $P(B \mid A)$! A test that is $95\%$ accurate when disease is present ($P(+ \mid D) = 0.95$) does NOT mean there is a $95\%$ chance of disease when a test is positive ($P(D \mid +)$ is often under $20\%$)!
Ignoring Base Rates (Base Rate Neglect)
Always incorporate the prior probability $P(A_i)$. In a sample of $10\,000$ people, even a small false positive rate acting on $9\,900$ healthy people produces far more positive tests than a high true positive rate acting on only $100$ sick people.
Forgetting to Check that Posteriors Sum to 1
If you calculate posterior probabilities across all partition sources $A_1, A_2, \dots, A_k$ given evidence $B$, their sum must strictly equal $1$: $\sum_{i=1}^k P(A_i \mid B) = 1$. This provides an immediate verification during the exam.
Drawing Without Replacement Denominators
In urn problems where items are drawn without replacement, remember to decrease both the count and the total number of items on successive branches (e.g. $\frac{4}{10} \times \frac{3}{9}$, NOT $\frac{4}{10} \times \frac{3}{10}$).
Topic Diagnostic Test
Complete this timed test to check your understanding and exam technique.
Section A: Diagnostic Multiple Choice Questions
In Bayes’ Theorem $P(A_j \mid B) = \frac{P(A_j \cap B)}{P(B)}$, the denominator $P(B)$ represents:
Which statement about $P(A \mid B)$ and $P(B \mid A)$ is true?
Can the source events $A_1, A_2, \dots, A_k$ overlap in the standard Law of Total Probability formula?
What is the conditional probability $P(A \mid B)$ if event $B$ is impossible ($P(B) = 0$)?
Section B: Examination-Style Free Response Questions
An insurance company classifies drivers as low risk ($60\%$), medium risk ($30\%$), or high risk ($10\%$).
The probability that a driver has an accident in a given year is $0.01$ for low risk, $0.05$ for medium risk, and $0.20$ for high risk.
(a) Find the probability that a randomly chosen driver has an accident during the year. [3 marks]
(b) Given that a driver has had an accident, find the probability that they are in the high-risk category. [3 marks]
Show Full Markscheme
(a) Total accident probability: [3 marks]
$P(A) = P(L)P(A \mid L) + P(M)P(A \mid M) + P(H)P(A \mid H)$ [M1]
$= (0.60)(0.01) + (0.30)(0.05) + (0.10)(0.20)$ [A1]
$= 0.006 + 0.015 + 0.020 = 0.041$. [A1]
(b) Posterior probability $P(H \mid A)$: [3 marks]
$P(H \mid A) = \frac{P(H \cap A)}{P(A)} = \frac{P(H)P(A \mid H)}{P(A)}$ [M1]
$= \frac{0.020}{0.041} = \frac{20}{41} \approx 0.488$ (or $48.8\%$). [A1][A1]
In an email spam filter, $80\%$ of all incoming emails are spam ($S$), and $20\%$ are legitimate ($L$).
The word "URGENT" occurs in $40\%$ of spam emails and in $5\%$ of legitimate emails.
(a) Find the probability that an incoming email contains the word "URGENT". [2 marks]
(b) If an email contains the word "URGENT", find the probability that it is spam. [2 marks]
(c) A second suspicious keyword "FREE" appears in $50\%$ of spam emails and $2\%$ of legitimate emails. Assuming the occurrences of "URGENT" and "FREE" are conditionally independent given spam status, find the probability that an email containing both words is legitimate. [3 marks]
Show Full Markscheme
(a) Probability of "URGENT" ($U$): [2 marks]
$P(U) = P(S)P(U \mid S) + P(L)P(U \mid L) = (0.80)(0.40) + (0.20)(0.05) = 0.32 + 0.01 = 0.33$. [M1][A1]
(b) Posterior spam probability: [2 marks]
$P(S \mid U) = \frac{P(S \cap U)}{P(U)} = \frac{0.32}{0.33} = \frac{32}{33} \approx 0.9697 \approx 0.970$. [M1][A1]
(c) Probability of legitimacy given both keywords: [3 marks]
Let $B$ be the event of containing both words.
$P(B \mid S) = (0.40)(0.50) = 0.20$.
$P(B \mid L) = (0.05)(0.02) = 0.0010$. [M1]
Total probability: $P(B) = (0.80)(0.20) + (0.20)(0.0010) = 0.16 + 0.0002 = 0.1602$. [A1]
Bayes for legitimacy:
$P(L \mid B) = \frac{0.0002}{0.1602} = \frac{2}{1602} = \frac{1}{801} \approx 0.00125$ (or $0.125\%$). [A1]