Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Stat 1510: General Rules of Probability Agenda 2 Independence and the Multiplication Rule The General Addition Rule Conditional Probability The General Multiplication Rule Tree Diagrams Bayes’ Rule Probability Rules 3 Rule 1. The probability P(A) of any event A satisfies 0 ≤ P(A) ≤ 1. Rule 2. If S is the sample space in a probability model, then P(S) = 1. Rule 3. If A and B are disjoint, P(A or B) = P(A) + P(B). This is the addition rule for disjoint events. Rule 4. For any event A, P(A does not occur) = 1 – P(A). Venn Diagrams 4 Sometimes it is helpful to draw a picture to display relations among several events. A picture that shows the sample space S as a rectangular area and events as areas within S is called a Venn diagram. Two disjoint events: Two events that are not disjoint, and the event {A and B} consisting of the outcomes they have in common: Venn diagram 5 A&B A&B&C A &C B&C Union and Intersection 6 The union of two events A and B is the event that occurs if either A or B (or Both) occurs on a singer performance of the experiment. We generally denoted this event as A U B The intersection of two events A and B is the event that occurs if both A and B on a single performance of the experiment. We generally denoted this event as A B Example: Consider the experiment of tossing a fair die in which following events are defined A : Toss an even number B: Toss a number less than or equal to 3. Find the events AUB and AB and its probabilities? Multiplication Rule for Independent Events 7 If two events A and B do not influence each other, and if knowledge about one does not change the probability of the other, the events are said to be independent of each other. Multiplication Rule for Independent Events Two events A and B are independent if knowing that one occurs does not change the probability that the other occurs. If A and B are independent: P(A and B) = P(A B)= P(A) P(B) Multiplication Rule for Independent Events Example 8 Suppose that about 20% of incoming male new undergrad students smoke. Suppose these undergrads are randomly assigned in pairs to dorm rooms (assignments are independent). The probability of a match (both smokers or both non-smokers): both are smokers: 0.04 = (0.20)(0.20) 68% neither is a smoker: 0.64 = (0.80)(0.80) only one is a smoker: ? 32% (100% 68%) } What if pairs are self-selected? The General Addition Rule 9 We know if A and B are disjoint events, P(A or B) = P(A U B) = P(A) + P(B) Addition Rule for Any Two Events For any two events A and B: P(A or B) = P(AUB) = P(A) + P(B) – P(A B) For any three events – A,B &C P(A U B U C) = P(A) + P(B) +P© – P(A B) P(A C) – P(B C) + P(A B C) Case Study 10 Student Demographics At a certain university, 80% of the students were inprovince students (event A), 30% of the students were part-time students (event B), and 20% of the students were both in-province and part-time students (event {A and B}). So we have that P(A) = 0.80, P(B) = 0.30, and P(A and B) = 0.20. What is the probability that a student is either an inprovince student or a part-time student? Case Study 11 All Students Other Students Part-time (B) In-province (A) {A and B} 0.30 0.20 0.80 P(A or B) = P(A) + P(B) P(A and B) = 0.80 + 0.30 0.20 = 0.90 Conditional Probability 12 The probability we assign to an event can change if we know that some other event has occurred. This idea is the key to many applications of probability. When we are trying to find the probability that one event will happen under the condition that some other event is already known to have occurred, we are trying to determine a conditional probability. The probability that one event happens given that another event is already known to have happened is called a conditional probability. When P(A) > 0, the probability that event B happens given that event A has happened is found by: P(B | A) = P(A and B) P(A) The General Multiplication Rule 13 The definition of conditional probability reminds us that in principle all probabilities, including conditional probabilities, can be found from the assignment of probabilities to events that describe a random phenomenon. The definition of conditional probability then turns into a rule for finding the probability that both of two events occur. The probability that events A and B both occur can be found using the general multiplication rule P(A and B) = P(A) • P(B | A) where P(B | A) is the conditional probability that event B occurs given that event A has already occurred. Note: Two events A and B that both have positive probability are independent if: P(B|A) = P(B) Case Study 14 Student Demographics At a certain university, 20% of first year students smoke, and 25% of all students are new students. Let A be the event that a student is a first year student, and let B be the event that a student smokes. So we have that P(A) = 0.25, and P(B|A) = 0.20. What is the probability that a student smokes and is a first year student? Case Study 15 Student Demographics P(A) = 0.25 , P(B|A) = 0.20 P(A and B) = P(A) P(B|A) = 0.25 0.20 = 0.05 5% of all students are first year student smokers. Tree Diagrams 16 We learned how to describe the sample space S of a chance process. Another way to model chance behavior that involves a sequence of outcomes is to construct a tree diagram. Consider flipping a coin twice. What is the probability of getting two heads? Sample Space: HH HT TH TT So, P(two heads) = P(HH) = 1/4 Example 17 The Pew Internet and American Life Project finds that 93% of teenagers (ages 12 to 17) use the Internet, and that 55% of online teens have posted a profile on a social-networking site. What percent of teens are online and have posted a profile? P(online) = 0.93 P(profile | online) = 0.55 P(online and have profile) = P(online)× P(profile | online) = (0.93)(0.55) = 0.5115 51.15% of teens are online and have posted a profile. Total Probability 18 The events A1 and A2 are mutually exclusive if no two have any common outcomes The events A1 and A2 are exhaustive if either A1 or A2 must occur so that A1 U A2 = S If A1 and A2 are mutually exclusive and exhaustive, and B is another event, then P(B) = P(B|A1)*P(A1) + P(B|A2)*P(A2) Bayes’ Theorem 19 Let A1 and A2 be mutually exclusive and exhaustive events, and B is any other event with P(B) > 0, then P(A1 and B) P(A1|B) P(B | A1)* P(A1) + P(B | A2)* P(A2) Example 20 NCI estimates that 3.65% of women in their 60’s get breast cancer. A mammogram can typically identify correctly 85% of cancer and 95% of cases without cancer. If a women in her 60’s gets a positive mammogram, what is the probability that she indeed has breast cancer? P( cancer)=0.0365; P( no cancer)=0.9635 P( test +| cancer) = 0.85; P( test - | cancer) = 0.15 P( test + | no cancer) = 0.05; P( test - | no cancer) =0.95 What we want is P( cancer | test +)? Example 21 P(Cancer | test +) = P(test + | Cancer) P(Cancer) P(test + | Cancer) * P(cancer) + P(test + | no cancer) * P(no cancer) 0.85 * 0.0365 0.85 * 0.0365 + 0.05 * 0.9635 0.392