Last updated on June 18th, 2025
The theorem that helps determine the conditional probability of an event based on previous events is the Bayes theorem. It helps to identify how likely an event is based on another event. In this topic, we will learn more about Bayes' theorem.
Bayes' theorem is a theorem in probability and statistics and is also known as Bayes rule and Bayes. It helps in determining the probability of event A based on the already occurred event B based on the probability of B given A, probability of A, and probability of B.
Bayes’ theorem is used to calculate the conditional probability based on the hypothesis. That is Bayes' theorem is the conditional probability of the event A, given the occurrence of another event B is equal to the product of B given A and the probability of A divided by probability B, that is
P (A|B) = P(B|A) × P(A) / P(B).
Struggling with Math?
Get 1:1 Coaching to Boost Grades Fast !
Throughout the topic, we heard the words conditional probability and Bayes' theorem. Now let’s learn the difference between conditional probability and Bayes' theorem.
Conditional Probability | Bayes' theorem |
The probability of an event happening, given that another event has already taken place. | The probability of an event based on the previous event |
Conditional probability is calculated using the formula, P(AB = P(A∩B)P(B) | Bayes' theorem is calculated using the formula, P(A|B) = P(B|A) × P(A) / P(B) |
It is used to measure the outcome of an event when we have known the dependence of another event is known | It is used in inferential statistics to make decisions based on the new data |
To find the statement for Bayes' theorem, let the sample space be S and the set of events can be E, E, E,..., En. Where all the events have a non-zero probability of occurrence and form a part of S. According to Bayes' theorem,
P(Ei|A) = P(Ei) P(A|Ei) / ΣP(Ek) P(A|Ek), i = 1, 2, 3, … , n
For the events A and B, the formula for Bayes' theorem is
P(A|B) = P(B|A) P(A) / P(B),
where P(A) and P(B) is the probability of events A and B, P(A|B) is the probability of event A when event B happens, and P(B|A) is the probability of event B when A happens.
Based on conditional probability, P(A|B) = P(A ∩ B) / P(B), where, P(B) ≠ 0.
P (A ∩ B) = P (B ∩ A) = P(B|A) P(A), so
P(A|B) = P(B|A) P(A) / P(B)
To update the probability of a hypothesis, condition, or event. Let’s discuss a few real-world applications of Bayes' theorem.
To identify the spam emails in the system, we use Bayes' theorem.
Mistakes are common when students work on Bayes' theorem, now let’s learn a few common mistakes. These are a few common mistakes and ways to avoid them in Bayes' theorem.
Level Up with a Math Certification!
2X Faster Learning (Grades 1-12)
A factory produces 60% of its products from Machine A and 40% from Machine B. Machine A produces 5% defective products, while Machine B produces 10% defective products. If a randomly selected product is defective, what is the probability that it was made by Machine A?
The probability that a defective product manufactured by machine A is 42.86%
Here,
A is the product from machine A
B is the product from machine B
D is the defective product
So, P(A) = 0.6
P(B) = 0.4
P(D|A) = 0.05
P(D|B) = 0.10
Total probability of the defective product is P(D) = P(D|A) P(A) + P(D|B) P(B)
= (0.05 × 0.6 ) + (0.10 × 0.4) = 0.03 + 0.04 = 0.07
Using Bayes' theorem to find P(A|D)
P(A|D) = P(D|A) P(A) / P(D)
= 0.05 × 0.6 / 0.07 = 0.4286
Therefore, the probability of a definitive product is 42.86%
A test for a certain disease is 98% accurate for people who have the disease and 95% accurate for those who don’t. If 0.5% of the population has the disease, what is the probability that a person who tested positive actually has the disease?
The probability that a person who tested positive for the disease is 9%
Here,
D is the person has the disease
D is the person doesn’t have the disease
T is the positive test result
Given,
P(D) = 0.005
P(D) = 0.995
P(positive | D) (P(+|D) = 0.98
The false positive rate, P(+| D) = 0.05
The total probability of testing positive:
P(+) = P(+|D) × P(D) + P(+|D) × P(D)
= (0.98 × 0.005) + (0.05 × 0.995)
= 0.0049 + 0.04975 = 0.055
Using Bayes' theorem to find P(D|+),
P(D|+) = P(+|D) P(D) / P(+)
= 0.98 × 0.005 / 0.05465 = 0.0896
So, the probability that a person who tested positive is 9%
In a school, 30% of the students study mathematics and 70% study biology. 80% of mathematics students pass an exam, while 90% of biology students pass. If a student is randomly selected and is found to have passed, what is the probability that they studied mathematics?
The probability that a student who passed studied mathematics is 27.59%
Here,
M is the student who studies mathematics
B is a student studies biology
P is the student passes the exam
Given,
P(M) = 0.30
P(B) = 0.70
P(P|M) = 0.80
P(P|B) = 0.90
The total probability of passing;
P(P) = P(P|M) P(M) + P(P|B) P(B)
= (0.80 × 0.30) + (0.90 × 0.70
= 0.24 + 0.63 = 0.87
Using Bayes' theorem to find P(M|P),
P(M|P) = P(P|M) P(M) / P(P)
= 0.80 × 0.30 / 0.87 = 0.2759
So, the probability that a student who passed studied mathematics is 27.59%
In a city, 60% of people own a car, and 40% do not. Among car owners, 70% have insurance, while only 30% of non-car owners have insurance. If a randomly chosen person has insurance, what is the probability that they own a car?
The probability that a person with insurance owns a car is 77.78%
Here, C is the person who owns a car
N is the person who doesn't own a car
I is the person who has insurance
Given,
P(C) = 0.60
P(N) = 0.40
P(I|C) = 0.70
P(I|N) = 0.30
Finding the total probability of having insurance
P(I) = P(I|C) P(C) + P(I|N)P(N)
= (0.70 × 0.60) + (0.30 × 0.40) = 0.54
Using Bayes' theorem to find P(C|I)
P(I) = P(I|C) P(C) / P(I)
= 0.70 × 0.60 / 0.54 = 0.778
The probability that a person with insurance owns a car is 77.78%
A company has three suppliers: S1 (50%), S2 (30%), and S3 (20%). They supply 10%, 5%, and 2% defective items, respectively. If an item is defective, what is the probability it came from S1?
The probability that a defective item came from supplier S1 is 72.46%
Let
S1, S2, and S3 be the events that an item is from suppliers 1, 2, 3
D is it defective
Given, P(S1) = 0.50
P(S2) = 0.30
P(S3) = 0.20
P(D|S1) = 0.10
P(D|S2) = 0.05
P(D|S3) = 0.02
The total number of defective product is;
P(D) = P(D|S1)P(S1) + P(D|S2)P(S2) + P(D|S3)P(S3)
= (0.10 × 0.50) + (0.05 × 0.30) +(0.02 × 0.20) = 0.069
Using the Bayes' theorem to find P(S1|D)
P(S1|D) = P(D|S1) P(S1) / P(D) = 0.10 × 0.50 / 0.069 = 0.05 / 0.069 = 0.7246
Turn your child into a math star!
#1 Math Hack Schools Won't Teach!
Struggling with Math?
Get 1:1 Coaching to Boost Grades Fast !