Probability Project
Topic: Conditional Probability, Theorem of Total Probability, and Bayes’ Theorem
Introduction
Probability is the branch of mathematics that measures the likelihood of events occurring. It plays a
central role in statistics, data science, machine learning, and everyday decision-making.
In many real-life situations, we have extra information that affects the likelihood of an event. For
example, if we know it is cloudy, the probability of rain increases.
To handle such cases, three important concepts are used:
1. Conditional Probability – The probability of an event given that another event has occurred.
2. Theorem of Total Probability – Finding the probability of an event by considering all possible
causes.
3. Bayes’ Theorem – Updating probabilities when new evidence is introduced.
1. Conditional Probability
Definition
Conditional probability is the probability of an event occurring given that another event has already
occurred.
Formula: P(A|B) = P(A ∩ B) / P(B), where P(B) ≠ 0.
Example 1 – Cards
A card is drawn from a standard 52-card deck. Let A = card is a king, and B = card is red.
P(A ∩ B) = 2/52, P(B) = 26/52, so P(A|B) = (2/52) / (26/52) = 1/13.
Example 2 – Students
In a class of 40 students, 25 like Mathematics, 18 like Physics, and 10 like both. If a student is known to
like Mathematics, the probability they also like Physics is P(Physics|Math) = 10/25 = 0.4.
2. Theorem of Total Probability
Definition
If the sample space is divided into mutually exclusive and exhaustive events B1, B2, ..., Bn, then for any
event A: P(A) = Σ P(Bi) × P(A|Bi).
Example 1 – Factory Production
A factory has three machines: M1 → 20% of output, defect rate 1%; M2 → 50% of output, defect rate
3%; M3 → 30% of output, defect rate 2%. P(D) = 0.2(0.01) + 0.5(0.03) + 0.3(0.02) = 0.023.
Example 2 – Medical Diagnosis
A disease D can be caused by three strains: D1 with P=0.2 and P(S|D1)=0.8, D2 with P=0.5 and
P(S|D2)=0.6, D3 with P=0.3 and P(S|D3)=0.4. P(S) = 0.2(0.8) + 0.5(0.6) + 0.3(0.4) = 0.58.
3. Bayes’ Theorem
Definition
P(A|B) = [P(B|A) × P(A)] / P(B).
Example 1 – Medical Test
1% have disease, test detects with 99% accuracy, false positive rate 1%. P(+) = 0.99(0.01) + 0.01(0.99)
= 0.0198, P(D|+) ≈ 0.5.
4. Summary Table
Concept Purpose Formula
Conditional Probability Find probability given another event P(A|B) = P(A ∩ B) / P(B)
Total Probability Find probability considering all causes P(A) = Σ P(Bi) P(A|Bi)
Bayes’ Theorem Update probability with new evidence P(A|B) = [P(B|A)P(A)] / P(B)
5. Practice Problems
1. A bag contains 4 red and 6 blue balls. Two balls are drawn without replacement. Find the probability
both are red.
2. A company has 3 departments producing 40%, 35%, and 25% of items with defect rates 2%, 3%, and
5% respectively. Find probability a product is defective.
3. 2% of USB drives are defective. A test detects defects with 95% accuracy and has a 1% false
positive rate. Find P(Defective|Test Positive).
Answers
1. P = (4/10) × (3/9) = 2/15.
2. P(D) = (0.4)(0.02) + (0.35)(0.03) + (0.25)(0.05) = 0.0325.
3. P(Defective|+) ≈ 0.66.
Conclusion
Conditional Probability, the Theorem of Total Probability, and Bayes’ Theorem are fundamental tools in
probability theory. They help us reason under uncertainty, combine multiple scenarios, and revise
probabilities when we get new data. From predicting weather to diagnosing diseases and detecting
spam, these concepts have countless real-world applications.