Lesson Objectives
Terminology:
· Law of Total Probability (Total probability formula)
· Probability tree diagram
· Bayes’ theorem (Bayes’ formula)
Knowledge and Skills:
· Understand and apply the law of total probability to real-world probabilistic scenarios.
· Master and apply Bayes’ theorem to practical situations and decision-making problems.
· Represent multi-stage random experiments and conditional probabilities using probability tree diagrams.
· Apply total probability and Bayes’ formulas to solve complex real-world problems (weather forecasting impact on event ticket sales, genetic inheritance models in pea plants, medical diagnostic testing accuracy and false positives/negatives, spam email filtering).
Law of Total Probability
<Youtube url=“https://www.youtube.com/watch?v=example_cong_thuc_xac_suat_toan_phan”/>
a) Formulating the Law of Total Probability
Theorem (Law of Total Probability for two events): Let and be two events in a random experiment, with and . Then the probability of event can be computed as: Meaning and Application: • The law of total probability allows us to compute the overall probability of an event by partitioning the sample space into mutually exclusive scenarios (an event and its complement ) and weighting the conditional probabilities of under each scenario.
b) Examples and Practice on Total Probability
Ví dụ 1: Mr. An commutes to work every day either by motorcycle or by bus. If he commutes by bus today, the probability that he commutes by motorcycle tomorrow is 0.4. If he commutes by motorcycle today, the probability that he commutes by bus tomorrow is 0.7. Consider a week where Mr. An commutes by bus on Monday. Find the probability that he commutes by motorcycle on Wednesday.
Lời giải Ví dụ 1: • Let be the event: “Mr. An commutes by motorcycle on Tuesday”; let be the event: “Mr. An commutes by motorcycle on Wednesday”. We need to compute . • By the law of total probability: • Computing : Since Mr. An commutes by bus on Monday, the probability that he commutes by motorcycle on Tuesday (the next day) is 0.4. Thus, . • Computing : . • Computing : This is the probability that he commutes by motorcycle on Wednesday given that he commutes by motorcycle on Tuesday. Given that if he uses a motorcycle today, the probability he uses a bus tomorrow is 0.7, hence the probability he uses a motorcycle tomorrow is . Thus, . • Computing : This is the probability that he commutes by motorcycle on Wednesday given that he commutes by bus on Tuesday. Given that if he uses a bus today, the probability he uses a motorcycle tomorrow is 0.4. Thus, . • Substituting the values into the formula: • Thus, the probability that Mr. An commutes by motorcycle on Wednesday is 0.36.
Tree Diagram Representation: Probability tree diagrams provide a visual method for illustrating multi-stage experiments and applying the law of total probability. Each branch represents a conditional probability, and the total probability of an event is the sum of the probabilities of all paths leading to that event.
Bayes’ Theorem
a) Statement and Formula of Bayes’ Theorem
Theorem (Bayes’ Theorem): Let and be two events with and . Then the conditional probability of given is given by: Significance and Interpretation: • Bayes’ theorem updates our prior belief (prior probability) about an event in light of new evidence (calculating the posterior probability ). • It is fundamental in statistical inference, machine learning, medical diagnostics, and probabilistic reasoning.
b) Examples and Practice on Bayes’ Theorem
Ví dụ 2: In a national high school graduation examination, 80% of students in province X choose subject combination A00 (Mathematics, Physics, Chemistry). It is known that if a student chooses A00, the probability of passing university entrance exams is 0.6; if a student does not choose A00, the probability of passing is 0.7. Randomly select a graduated student from province X. Given that this student has passed the university entrance exams, find the probability that they chose combination A00.
Lời giải Ví dụ 2: • Let be the event: “The student chooses combination A00”; let be the event: “The student passes the university entrance exams”. We need to compute . • From the problem statement: - . - (probability of passing given choice A00). - (probability of passing given non-choice A00). • Applying Bayes’ theorem: • Thus, the probability that the student chose combination A00 given that they passed is approximately 0.7742.
Ví dụ 3 (Medical Diagnostic Testing and False Positives): A patient undergoes a medical diagnostic test for a serious disease . If a person has disease , the test yields a positive result with probability 0.95 (true positive rate). If a person does not have disease , the test yields a positive result with probability 0.01 (false positive rate). Suppose the prevalence rate of disease in the population is 0.2% (). If a randomly tested person tests positive, what is the exact probability that they actually have disease ?
Lời giải Ví dụ 3: • Let be the event: “The patient has disease ”; let be the event: “The diagnostic test yields a positive result”. We need to compute . • Given data: - Prior probability of disease: . - True positive probability: . - False positive probability: . • Applying Bayes’ theorem: • Conclusion: Even though the test has a 95% accuracy rate for sick individuals, because the disease is rare in the general population, a positive test result only gives about a 16% true probability of having the disease due to the impact of false positives.
Applications and Exercises
a) Real-World Applications
Application (Spam Email Filtering): A spam filter is used to block spam emails. A spam email is blocked with probability 0.95, while a legitimate (non-spam) email is incorrectly blocked with probability 0.01. Statistical data shows that 3% of all incoming emails are spam. a) Choose a random blocked email. What is the probability that it is actually spam? b) Among blocked emails, what percentage are legitimate emails (false blocks)?
Solution to Application: • Let be the event: “The email is spam”; let be the event: “The email is blocked by the filter”. • Given data: - . - (probability a spam email is blocked). - (probability a legitimate email is incorrectly blocked). • a) We need to compute (probability a blocked email is actually spam): Thus, about 74.61% of blocked emails are indeed spam. • b) The percentage of blocked emails that are legitimate (false positives among blocked emails) is: Thus, roughly 25.39% of filtered emails in the blocked folder are legitimate messages.
b) End-of-Lesson Exercises
Exercise 6.7: In a military tactical simulation, an enemy fighter jet appears at position with probability 0.55. If the jet does not appear at position , it appears at position . Defense missile batteries are positioned at and . If the jet appears at , 2 missiles are fired; if it appears at , 1 missile is fired. Each missile has a hit probability of 0.8, operating independently. The jet is shot down if it is hit by at least 1 missile. Compute the probability of shooting down the enemy fighter jet in this operational strategy.
Solution to Exercise 6.7: • Let be the event: “The jet appears at position ” (); let be the event: “The jet appears at position ” (). • Let be the event: “The jet is successfully shot down”. We use the law of total probability: • Case 1: The jet appears at ( missiles fired). The probability of missing both independent missiles is . The probability of being hit by at least one missile is . • Case 2: The jet appears at ( missile fired). The probability of hitting the target is . • Total probability of shooting down the jet: • Thus, the probability of shooting down the enemy fighter jet is 0.888 (or 88.8%).
Exercise 6.8: There are two rabbit hutches. Hutch I contains 5 black rabbits and 10 white rabbits. Hutch II contains 7 black rabbits and 3 white rabbits. First, 1 rabbit is drawn at random from Hutch II and placed into Hutch I. Then, 1 rabbit is drawn at random from Hutch I. Find the probability that the final rabbit drawn is white.
Solution to Exercise 6.8: • Let be the event: “A white rabbit is transferred from Hutch II to Hutch I”; let be the event: “A black rabbit is transferred from Hutch II to Hutch I”. From Hutch II ( black, white, total ): • Let be the event: “The rabbit drawn from Hutch I is white”. We apply the law of total probability conditioning on the transferred rabbit: • Case 1 ( occurs): Hutch I now contains 5 black rabbits and white rabbits (total rabbits). • Case 2 ( occurs): Hutch I now contains black rabbits and 10 white rabbits (total rabbits). • Total probability of drawing a white rabbit:
Exercise 6.9: At electronics factory X, the proportion of standard-compliant components is 80%. Before factory release, all components undergo quality inspection and receive an OTK quality stamp if passed. Because inspection is not 100% flawless, a compliant component receives the OTK stamp with probability 0.99, whereas a non-compliant component fails inspection and does not receive the OTK stamp with probability 0.95. Choose a random component of factory X on the market. a) Find the probability that the component carries the OTK stamp. b) Use a tree diagram to describe the calculation of the probability that the selected component does not carry the OTK stamp.
Solution to Exercise 6.9: • Let be the event: “The component is standard-compliant” (, ). Let be the event: “The component receives the OTK stamp”. • Given conditional probabilities: - (compliant component gets stamped) . - (non-compliant component does not get stamped) . • a) Probability that a component carries the OTK stamp (): • b) Probability that a component does not carry the OTK stamp ():
Exercise 6.10: Two shooting teams compete. Team I has 5 athletes, Team II has 7 athletes. The probabilities of winning a gold medal for each athlete in Team I and Team II are 0.65 and 0.55, respectively. Choose an athlete at random. a) Find the probability that this athlete wins a gold medal. b) Given that the selected athlete wins a gold medal, find the probability that this athlete belongs to Team I.
Solution to Exercise 6.10: • Total number of athletes: . Probability of choosing an athlete from Team I: . Probability of choosing an athlete from Team II: . • Let be the event: “The athlete wins a gold medal”. - . - . • a) Probability that the chosen athlete wins a gold medal: • b) Given that the athlete wins a gold medal, the probability that they belong to Team I is computed using Bayes’ theorem: