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
4.2 Compound Events *Probability of A AND B* What does AND mean? Can you be… A boy AND a girl A Freshman AND a girl A Senior AND a Freshman A grasshopper AND an insect SpongeBob & Papa Smurf Yes No In probability AND means: + 2 events occurring together + The overlap of 2 events + When one thing satisfies BOTH events I. Independent Events Independent Events: Two events are independent if the outcome of one event does not change the probability of the second event. Dependent Events: Event # 1 is a dependent event where the outcome of the first event changes the outcome of the second event Independent Events Have no effect on each other Don’t change each other’s probability Replacement Dependent Events The first event effects the 2nd The probability of the 2nd is different now that the first happened Without Replacement Created By: J & J Productions Event 1 Rolling a 6 on one die Pick winning horse in first race Pick winning horse in first race Draw an Ace (without replacing) Event 2 Rolling a 6 on a second die Pick winning horse in second race Independent Dependent X X Pick second place horse in SAME race X Draw another Ace X II. Probability of Independent Events P (A and B) = P(A) * P(B) …only works if A and B are INDEPENDENT events Example: You roll a pair of dice: a) What is the probability of rolling two 4’s P(4 and 4) = P(4)*P(4) = 1/6 * 1/6 = 1/36 b) What is the probability of rolling an EVEN # on die 1 and an ODD # on die 2? P(Even and Odd) = P(Even)*P(Odd) = ½ * ½ = 1/4 III. Conditional Probability Conditional Probability: you calculate the probability of an event assuming a certain related event has just happened. Ex: Drawing 2 cards. Your first is an Ace, what is the probability that the second will be a King? P(King, given Ace) now there are only 51 cards left = 4/51 Created By: J & J Productions Ex: You have a bag of 50 red and 50 green M&Ms. You pick out a green M&M and eat it. a) What is the probability that the second will be Red? P(Red, given Green) = 50/99 b) What is the probability that the second will be Green? P(Green, given Green) = 49/99 IV. Probability of Dependent Events P(A and B) = P(A) * P(B, given that A has occurred) P(A and B) = P(B) * P(A, given that B has occurred) How can you tell if two events are DEPENDENT? P(A) ≠ P(A, given B) and P(B) ≠ P(B, given A) How can you tell if two events are INDEPENDENT? P(A) = P(A, given B) and P(B) = P(B, given A) Example: You have a bag of six marbles, three blue and three red. You pick a marble from the bag and then, without replacement, you draw a second marble. What is the probability of getting two reds? 1.) What is the P(R)? If you get a Red on the first draw, what is the P(R,given R on first) *red on the second? P(R) = ½ P(R, given R) = 2/5 because there are only 5 marbles left. 2.) Compute the probability using the multiplication rule for these dependent events. P(R,R)= 1 * 2 1 2 5 5 Created By: J & J Productions V. EXAMPLES 1.) At the University of Kentucky, a random selection of 140 people was asked what political party they associated themselves with. The people were grouped into two categories, students or professors. For notation purposes, we will use S(student), P(professor), D(democrat), R(republican), I(independent). Suppose a person was selected at random out of the 140, find the following probabilities: Person Democrat Republican Independent Row Total Type (D) (R) (I) Professor 5 34 9 48 Student 63 21 8 92 Column 68 55 17 140 *Grand Total Total a) Compute P(D) and P(P). 68 48 P(D) = ≈0.486 P(P) = ≈0.343 140 140 b) Compute P(D, given P) P(D, given P) = 5 # Democratic Pr ofessors = ≈ 0.104 48 # Pr ofessors c) Are the events Democrat and Professor independent? Does P(D) = P(D, given P)? 0.486 ?=?0.104 *NO!!! Therefore, the probability of being a Democrat depends on whether or not you are a Professor. d) Compute P(D and P) P(D and P) = P(P) * P(D, given P) 48 5 5 0.036 140 48 140 Created By: J & J Productions