Probability - Problems Based on Bayes
- Objective: To solve probability problems using Bayes’ theorem.
- Prerequisite: Understanding of basic probability concepts and Bayes’ theorem.
Bayes’ Theorem
- Bayes’ theorem is used to calculate conditional probabilities.
- It allows us to update our beliefs or prior probabilities based on new evidence or data.
For two events A and B:
P(A | B) = P(B | A) * P(A) / P(B)
Example 1
- A box contains 3 red balls and 2 green balls.
- Two balls are drawn at random, one after the other, without replacement.
- What is the probability that the second ball is green given that the first ball is red?
Given:
- P(R1) = 3/5 (Probability of drawing a red ball first)
- P(G2 | R1) = ? (Probability of drawing a green ball second given that the first ball is red)
To find P(G2 | R1), we can use Bayes’ theorem.
P(G2 | R1) = P(R1 | G2) * P(G2) / P(R1)
Example 1 (continued)
- P(R1 | G2) = 0 (Probability of drawing a red ball first given that the second ball is green, since it is not possible)
- P(G2) = 2/5 (Probability of drawing a green ball second)
- P(R1) = 3/5 (Probability of drawing a red ball first)
Plugging the values into the formula:
P(G2 | R1) = 0 * (2/5) / (3/5) = 0
Hence, the probability that the second ball is green given that the first ball is red is 0.
Example 2:
- An experiment is conducted to test a new diagnostic test for a particular disease.
- The test has a 10% false positive rate (it wrongly identifies 10% of healthy people as having the disease).
- The test has a 2% false negative rate (it wrongly identifies 2% of people with the disease as not having it).
- 2% of the population has the disease.
Given:
- P(Pos | Disease) = 0.90 (Probability of a positive test result given that a person has the disease)
- P(Pos | Healthy) = 0.10 (Probability of a positive test result given that a person is healthy)
- P(Disease) = 0.02 (Probability that a person has the disease)
To find the probability that a person has the disease given a positive test result, we can use Bayes’ theorem.
P(Disease | Pos) = P(Pos | Disease) * P(Disease) / (P(Pos | Disease) * P(Disease) + P(Pos | Healthy) * P(Healthy))
Example 2 (continued)
- P(Pos | Disease) = 0.90 (Probability of a positive test result given that a person has the disease)
- P(Pos | Healthy) = 0.10 (Probability of a positive test result given that a person is healthy)
- P(Disease) = 0.02 (Probability that a person has the disease)
- P(Healthy) = 1 - P(Disease) = 1 - 0.02 = 0.98 (Probability that a person is healthy)
Plugging the values into the formula:
P(Disease | Pos) = 0.90 * 0.02 / (0.90 * 0.02 + 0.10 * 0.98)
Calculating this expression gives us the probability that a person has the disease given a positive test result.
Example 3:
- An electronics company produces laptops with two different types of chips: Chip A and Chip B.
- 90% of the laptops have Chip A and 10% have Chip B.
- The probability of a laptop having a defect is 5% for Chip A and 2% for Chip B.
Given:
- P(Chip A) = 0.90 (Probability of a laptop having Chip A)
- P(Chip B) = 0.10 (Probability of a laptop having Chip B)
- P(Defect | Chip A) = 0.05 (Probability of a defect given that the laptop has Chip A)
- P(Defect | Chip B) = 0.02 (Probability of a defect given that the laptop has Chip B)
To find the probability that a laptop has Chip A given that it has a defect, we can use Bayes’ theorem.
P(Chip A | Defect) = P(Defect | Chip A) * P(Chip A) / (P(Defect | Chip A) * P(Chip A) + P(Defect | Chip B) * P(Chip B))
Example 3 (continued)
- P(Defect | Chip A) = 0.05 (Probability of a defect given that the laptop has Chip A)
- P(Defect | Chip B) = 0.02 (Probability of a defect given that the laptop has Chip B)
- P(Chip A) = 0.9 (Probability of a laptop having Chip A)
- P(Chip B) = 0.1 (Probability of a laptop having Chip B)
Plugging the values into the formula:
P(Chip A | Defect) = 0.05 * 0.90 / (0.05 * 0.90 + 0.02 * 0.10)
Calculating this expression gives us the probability that a laptop has Chip A given that it has a defect.
This concludes the first 10 slides of the lecture on “Probability - Problems Based on Bayes”.
Example 4
- In a class, there are 30 students who play sports.
- 15 students play cricket and 10 students play football.
- 5 students play both cricket and football.
Given:
- P(Cricket) = ? (Probability that a student plays cricket)
- P(Football) = ? (Probability that a student plays football)
- P(Cricket and Football) = ? (Probability that a student plays both cricket and football)
To find the probabilities, we can use the following formulas:
P(Cricket) = Number of students who play cricket / Total number of students P(Football) = Number of students who play football / Total number of students P(Cricket and Football) = Number of students who play both cricket and football / Total number of students
Example 4 (continued)
Given:
- Number of students who play cricket = 15
- Number of students who play football = 10
- Number of students who play both cricket and football = 5
- Total number of students = 30
Using the formulas:
P(Cricket) = 15 / 30 = 0.5 P(Football) = 10 / 30 = 0.333 P(Cricket and Football) = 5 / 30 = 0.167
Hence, the probabilities are:
- P(Cricket) = 0.5
- P(Football) = 0.333
- P(Cricket and Football) = 0.167
Example 5
- A bag contains 4 red balls and 6 blue balls.
- Two balls are drawn at random, one after the other, without replacement.
- What is the probability that both balls are blue?
Given:
- P(Blue1) = ? (Probability of drawing a blue ball first)
- P(Blue2 | Blue1) = ? (Probability of drawing a blue ball second given that the first ball is blue)
To find the probabilities, we can use the following formulas:
P(Blue1) = Number of blue balls / Total number of balls P(Blue2 | Blue1) = Number of blue balls (after removing one blue ball) / Remaining number of balls
Example 5 (continued)
Given:
- Number of blue balls = 6
- Total number of balls = 4 + 6 = 10
Using the formula:
P(Blue1) = 6 / 10 = 0.6
Now, for the second part:
- After drawing one blue ball, there are 5 blue balls and 9 total balls remaining.
Using the formula:
P(Blue2 | Blue1) = 5 / 9 ≈ 0.556
So, the probability that both balls are blue is approximately 0.556.
Example 6
- A bag contains 5 green balls and 3 red balls.
- Two balls are drawn at random, one after the other, without replacement.
- What is the probability that both balls are green?
Given:
- P(Green1) = ? (Probability of drawing a green ball first)
- P(Green2 | Green1) = ? (Probability of drawing a green ball second given that the first ball is green)
To find the probabilities, we can use the same formulas as in the previous example.
Example 6 (continued)
Given:
- Number of green balls = 5
- Total number of balls = 5 + 3 = 8
Using the formula:
P(Green1) = 5 / 8 ≈ 0.625
Now, for the second part:
- After drawing one green ball, there are 4 green balls and 7 total balls remaining.
Using the formula:
P(Green2 | Green1) = 4 / 7 ≈ 0.571
So, the probability that both balls are green is approximately 0.571.
Example 7
- In a survey, it was observed that out of 500 people surveyed, 400 people use social media and 300 people use video streaming services.
- 200 people use both social media and video streaming services.
Given:
- P(Social Media) = ? (Probability that a person uses social media)
- P(Video Streaming) = ? (Probability that a person uses video streaming services)
- P(Social Media and Video Streaming) = ? (Probability that a person uses both social media and video streaming services)
Using the same formulas as in example 4, we can find the probabilities.
Example 7 (continued)
Given:
- Number of people who use social media = 400
- Number of people who use video streaming services = 300
- Number of people who use both social media and video streaming services = 200
- Total number of people surveyed = 500
Using the formulas:
P(Social Media) = 400 / 500 = 0.8 P(Video Streaming) = 300 / 500 = 0.6 P(Social Media and Video Streaming) = 200 / 500 = 0.4
Hence, the probabilities are:
- P(Social Media) = 0.8
- P(Video Streaming) = 0.6
- P(Social Media and Video Streaming) = 0.4
Summary
- Bayes’ theorem is used to calculate conditional probabilities.
- It allows us to update our beliefs or prior probabilities based on new evidence or data.
- In examples, we used Bayes’ theorem to find the probabilities of various events.
- Example 4: Probabilities of playing cricket, football, and both games.
- Example 5: Probability of drawing two blue balls.
- Example 6: Probability of drawing two green balls.
- Example 7: Probabilities of using social media, video streaming services, and both.
End of Lecture
- Congratulations! You have completed the lecture on “Probability - Problems Based on Bayes”.
- To recap, in this lecture we learned how to solve probability problems using Bayes’ theorem.
- Make sure to practice these concepts and try to solve more problems based on Bayes’ theorem.
If you have any doubts or questions, feel free to reach out. Thank you for attending the lecture!
Example 8
- In a deck of 52 playing cards, there are 26 red cards and 26 black cards.
- Two cards are drawn at random, one after the other, without replacement.
- What is the probability that the first card is red and the second card is black?
Given:
- P(Red1) = ? (Probability of drawing a red card first)
- P(Black2 | Red1) = ? (Probability of drawing a black card second given that the first card is red)
To find the probabilities, we can use the same formulas as in the previous examples.
Example 8 (continued)
Given:
- Number of red cards = 26
- Number of black cards = 26
- Total number of cards = 52
Using the formulas:
P(Red1) = 26 / 52 = 0.5
Now, for the second part:
- After drawing one red card, there are 26 black cards and 51 total cards remaining.
Using the formula:
P(Black2 | Red1) = 26 / 51 ≈ 0.510
So, the probability that the first card is red and the second card is black is approximately 0.510.
Example 9
- In a class, 60% of the students play chess, 40% of the students play cricket, and 30% play both chess and cricket.
- What percentage of the students play at least one of the two games?
Given:
- P(Chess) = 0.60 (Probability that a student plays chess)
- P(Cricket) = 0.40 (Probability that a student plays cricket)
- P(Chess and Cricket) = 0.30 (Probability that a student plays both chess and cricket)
To find the percentage of students who play at least one of the two games, we can use the following formula:
P(Chess or Cricket) = P(Chess) + P(Cricket) - P(Chess and Cricket)
Example 9 (continued)
Given:
- P(Chess) = 0.60 (Probability that a student plays chess)
- P(Cricket) = 0.40 (Probability that a student plays cricket)
- P(Chess and Cricket) = 0.30 (Probability that a student plays both chess and cricket)
Using the formula:
P(Chess or Cricket) = 0.60 + 0.40 - 0.30 = 0.70
Hence, 70% of the students play at least one of the two games.
Example 10
- In a group of people, 40% are women and 60% are men.
- 20% of the women and 15% of the men are engineers.
- What is the probability that a randomly selected engineer is a woman?
Given:
- P(Woman) = 0.40 (Probability that a randomly selected person is a woman)
- P(Engineer | Woman) = 0.20 (Probability of being an engineer given that a person is a woman)
To find the probability that a randomly selected engineer is a woman, we can use Bayes’ theorem.
P(Woman | Engineer) = P(Engineer | Woman) * P(Woman) / P(Engineer)
Example 10 (continued)
Given:
- P(Woman) = 0.40 (Probability that a randomly selected person is a woman)
- P(Engineer | Woman) = 0.20 (Probability of being an engineer given that a person is a woman)
- P(Engineer) = ? (Probability that a randomly selected person is an engineer)
To find P(Engineer), we can use the law of total probability.
P(Engineer) = P(Engineer | Woman) * P(Woman) + P(Engineer | Man) * P(Man)
In this case, P(Engineer | Man) is not given, so we cannot calculate P(Engineer) and, therefore, cannot find P(Woman | Engineer).
Example 10 (continued)
In some cases, we may not have all the information required to calculate a probability using Bayes’ theorem.
In this example, we needed the information about the probability of being an engineer given that a person is a man, but it was not given.
Without this information, we cannot calculate the probability that a randomly selected engineer is a woman.
Summary
- Bayes’ theorem is a powerful tool for calculating conditional probabilities.
- It allows us to update our beliefs or prior probabilities based on new evidence or data.
- In this lecture, we covered various examples where Bayes’ theorem was used to calculate probabilities.
- Remember to use the appropriate formulas and gather all the necessary information before applying Bayes’ theorem.
- Example 8: Probability of drawing a red card first and a black card second.
- Example 9: Percentage of students who play at least one of two games.
- Example 10: Probability that a randomly selected engineer is a woman.
End of Lecture
- Congratulations! You have completed the lecture on “Probability - Problems Based on Bayes”.
- In this lecture, we learned how to solve probability problems using Bayes’ theorem.
- Make sure to practice these concepts and try to solve more problems based on Bayes’ theorem.
If you have any doubts or questions, feel free to reach out. Thank you for attending the lecture!
- Bayes’ Theorem Explained: Link
- Practice Problems: Link
Remember to keep practicing and exploring more examples to strengthen your understanding of probability and Bayes