IB Mathematics AA Use of Bayes’ theorem Study Notes
IB Mathematics AA Use of Bayes’ theorem Study Notes
IB Mathematics AA Use of Bayes’ theorem Notes Offer a clear explanation of Use of Bayes’ theorem, its mean and variance, including various formula, rules, exam style questions as example to explain the topics. Worked Out examples and common problem types provided here will be sufficient to cover for topic Use of Bayes’ theorem, its mean and variance.
Bayes’ Theorem
Bayes’ Theorem
Bayes’ Theorem allows us to find the probability of an event given that another related event has occurred, by reversing conditional probabilities.
If events \( A_1, A_2, …, A_n \) form a partition of the sample space (mutually exclusive and exhaustive), and \( B \) is an event such that \( P(B) > 0 \), then:
\( P(A_i \mid B) = \frac{P(A_i) P(B \mid A_i)}{P(A_1) P(B \mid A_1) + P(A_2) P(B \mid A_2) + \cdots + P(A_n) P(B \mid A_n)} \)
For two events:
\( P(A \mid B) = \frac{P(A) P(B \mid A)}{P(A) P(B \mid A) + P(A’) P(B \mid A’)} \)
Interpretation: Bayes’ Theorem updates the probability of a cause (e.g., \( A \)) given evidence (e.g., \( B \)).
Example:
A test for a disease is 98% accurate: \( P(\text{positive} \mid \text{disease}) = 0.98 \), \( P(\text{negative} \mid \text{no disease}) = 0.98 \). 1% of the population has the disease.
What is the probability that a person has the disease given they tested positive?
▶️ Answer/Explanation
\( D \): person has disease, \( D’ \): person has no disease
\( T \): test positive
\( P(D) = 0.01 \), \( P(D’) = 0.99 \)
\( P(T \mid D) = 0.98 \), \( P(T \mid D’) = 1 – 0.98 = 0.02 \)
Apply Bayes’ theorem
\( P(D \mid T) = \frac{0.01 \times 0.98}{0.01 \times 0.98 + 0.99 \times 0.02} \)
\( = \frac{0.0098}{0.0098 + 0.0198} = \frac{0.0098}{0.0296} \approx 0.331 \)
Conclusion: The probability the person has the disease given a positive test is about 33.1%.
Bayes’ Theorem: Use for Maximum of Three Events
Bayes’ Theorem: Use for Maximum of Three Events
Bayes’ theorem can be applied when the sample space is partitioned into up to 3 mutually exclusive, exhaustive events \( A_1, A_2, A_3 \).
If \( B \) is an event with \( P(B) > 0 \):
\( P(A_i \mid B) = \frac{P(A_i) P(B \mid A_i)}{P(A_1) P(B \mid A_1) + P(A_2) P(B \mid A_2) + P(A_3) P(B \mid A_3)} \)
Bayes’ theorem updates the probability of the cause \( A_i \) given that \( B \) (the observed outcome) has occurred.
Example:
A factory has 3 machines producing items:
Machine 1: 30% of items, 2% defective
Machine 2: 50% of items, 3% defective
Machine 3: 20% of items, 5% defective
If an item is defective, what is the probability it came from Machine 3?
▶️ Answer/Explanation
\( A_1 \): Machine 1; \( A_2 \): Machine 2; \( A_3 \): Machine 3
\( D \): defective
\( P(A_1) = 0.3 \), \( P(A_2) = 0.5 \), \( P(A_3) = 0.2 \)
\( P(D \mid A_1) = 0.02 \)
\( P(D \mid A_2) = 0.03 \)
\( P(D \mid A_3) = 0.05 \)
Apply Bayes’ theorem
\( P(A_3 \mid D) = \frac{P(A_3) P(D \mid A_3)}{P(A_1) P(D \mid A_1) + P(A_2) P(D \mid A_2) + P(A_3) P(D \mid A_3)} \)
Numerator: \( 0.2 \times 0.05 = 0.01 \)
Denominator: \( 0.3 \times 0.02 + 0.5 \times 0.03 + 0.2 \times 0.05 \)
= \( 0.006 + 0.015 + 0.01 = 0.031 \)
\( P(A_3 \mid D) = 0.01 / 0.031 \approx 0.322 \)
Conclusion: If an item is defective, the probability it came from Machine 3 is about 32.2%.
Use of Probability Methods in Medical Studies
Use of Probability Methods in Medical Studies
Probability methods are essential in medical studies to:
- Estimate the likelihood that a patient has a disease given certain risk factors (e.g. smoking, obesity).
- Evaluate the accuracy of diagnostic tests (sensitivity, specificity).
- Calculate the chance of disease in different populations or under different conditions.
- Assess associations between risk factors and disease outcomes using conditional probability and Bayes’ theorem.
Typically, these methods involve:
- Conditional probabilities: \( P(\text{Disease} \mid \text{Risk factor}) \)
- Bayes’ theorem to update beliefs based on new evidence (e.g. test results)
- Tree diagrams, tables or Venn diagrams for visualization
Example:
In a study:
5% of a population has Disease X.
20% of those with Disease X are smokers.
10% of those without Disease X are smokers.
If a randomly selected person is a smoker, what is the probability they have Disease X?
▶️ Answer/Explanation
\( D \): has Disease X, \( D’ \): no Disease X
\( S \): smoker
\( P(D) = 0.05 \), \( P(D’) = 0.95 \)
\( P(S \mid D) = 0.20 \)
\( P(S \mid D’) = 0.10 \)
Apply Bayes’ theorem
\( P(D \mid S) = \frac{P(D) P(S \mid D)}{P(D) P(S \mid D) + P(D’) P(S \mid D’)} \)
= \( \frac{0.05 \times 0.20}{0.05 \times 0.20 + 0.95 \times 0.10} \)
= \( \frac{0.01}{0.01 + 0.095} = \frac{0.01}{0.105} \approx 0.095 \)
Conclusion: The probability that a smoker has Disease X is about 9.5%.