Stat 225 Week 2, 8/27/12-8/31/12, Notes: Independence and Bayes Rule The Fall 2012 Stat 225 T.A.s September 7, 2012 1 Monday, 8/27/12, Notes on Independence In general, a conditional probability will change the original probability. This change may be an increase or a decrease. However, it could stay the same. when the conditional probability is that same as the unconditional probability, the events are said to be independent. Formally, let A and B be events. Let P(A) > 0. B is independent of A if the occurrence of A does not affect the probability that event B occurs, i.e. P (B A) = P (B). The special multiplication rule restates the general multiplication rule, but for independent events. If A is independent of B, then P (A B) = P (A) P (B). Use the general multiplication rule to provide a proof of this statement. Also, the independence of the events A and B implies that the following are independent: A C and B A and B C A C and B C It would be a good exercise to prove these on your own. For pairwise independence let us look at the events A 1, A 2,..., A N. These events are pairwise independent if for every pair of events from the collection, those 2 events are independent of each other. Please note that this does not mean that if 1
you take 3 or more of these events that they are independent. That deals with mutual independence. Again, consider the events A 1, A 2,..., A N. They are said to be mutually independent if for each subcollection of events, the subcollection satisfies the special multiplication rule. That is, for each integer n, where 2 n N, then P (A k1 A k2... A kn ) = P (A k1 ) P (A k2... P (A kn ), where k 1, k 2,..., k n are distinct integers between 1 and N. Mutual independence implies pairwise independence, but not the other way around. Example 2.1 part A: A man and a woman each have a standard deck of 52 cards. Each draws a card at random from his/her deck. Find the probability the man draws the ace of clubs, the woman draws the ace of clubs, and that they both draw the ace of clubs. Are the 2 events independent? Please explain why or why not. Example 2.1 part B: Suppose that 2 people share 1 deck. They each draw from the deck and keep their card. Find the probability the first person gets the king of hearts, the second person gets the king of hearts, and they both get the king of hearts. Are these events independent? If not, what other statistial term represents these two events? Example 2.1 part C: A person randomly draws from a deck of cards. Let A be the event of a heart, B be the event of a face card, C be the event of a 7 or Jack. Are the events A and B indepedent? What about A and C? B and C? A, B, and C? Prove your answers mathematically. Example 2.2: Insurance companies assume that there is a difference between gender and your likelihood of getting into an accident which is why women generally have lower insurance rates than men. We did a study to see the number of accidents that occurred according to gender. We found that 60% of the population was male, 86% of the population was either male or got into an accident, 35% of the population are accident free. Does this study indicate that the likelihood of one to get into an accident depends on gender? Prove your answer. Example 2.3: Chris and his roommates each have a car. Julia s Mercedes SLK works with probability.98, Alex s Mercielago Diablo works with probability.91, and Chris 1987 GMC Jimmy works with 2
probability.24. Assume all cars work independently of on another. What is the probability that at least 1 car works? 2 Wednesday, 8/29/12, Law of Total Probability and Bayes Theorem Law of Total Probability: Suppose A 1, A 2,..., A N form a partition of the sample space. Then for every event B in the sample space, P (B) = P (B A 1 ) +... + P (B A N ). Furthermore, the actual law of total probability states P (B) = N P (A i ) P (B A i ). i=1 A very useful example of this is when you have the simple partition of an event (here we will use E) and its complement. Then, P (B) = P (E) P (B E) + P (E C ) P (B E C ). Refer to Chris car example (#3 above). What is the probability that exactly 1 car works? Example 2.4: Acme Consumer Goods sells three brands of computers: Mac, Dell, and HP. 30% of the machines they sell are Mac, 50% are Dell, and 20% are HP. Based on past experience Acme executives know that the purchasers of Mac machines will need service repairs with probability.2, Dell machines with probability.15, and HP machines with probability.25. Find the probability a customer will need service repairs on the computer they purchased from Acme. Example 2.5: Suppose we are looking at a specific disease. Let us define D as the event that particular person has the disease. Let us define O to be the event that the person tested positive for the disease. Then we have the following: P (O) = P (D) P (O D) + P (D C ) P (O D C ). This might seem a bit odd for the above example because we are not usually interested in P(O). However, I chose this example for a different reason. 3
It will work well with another important theorem in conditional probability called Bayes Rule. Example 2.6, Polya s Urn Scheme: An urn contains b black balls and r red balls. One ball is selected at random, its color is recorded, and then it as well as c balls of the same color are put back in the urn. this process is repeated. find the probability that the first 2 balls selected are black and the third ball chosen is red. Example 2.7, Greek problem: Suppose at a given university the following statements are true. 15% of females are in sororities and 18-20% of males are in fraternities. The campus paper uses this information to claim that 33-35% of campus is greek. Is this correct? If your answer is no, what is wrong with it and how would you fix it? Example 2.8: A grade school boy has 5 blue and 4 white marbles in his left pocket and 4 blue and 5 white marbles in his right pocket. If he transfers one marble at random from his left pocket to his right pocket, what is the probability of his then drawing a blue marble from his right pocket? Bayes Rule is used in order to revise probabilities in accordance with newly acquired information. Bayes Rule: Let A 1, A 2,..., A N form a partition of the sample space. Then for every event B in the sample space, P (A j B) = P (A j) P (B A j ) N i=1 P (A i) P (B A i ). This is useful when you do not [directly] know the probability of event B, but you know the probability of B given the events A 1, A 2,..., A N. Let us revisit our disease example above (#5). Suppose we are interested in what the probability of having the disease was given that the test was positive. We now have the following: P (D O) = P (D) P (O D) P (D) P (O D) + P (D C ) P (O D C ). This is more often what we are concerned with in this problem. We are concerned with the idea of having the disease (or sometimes of being pregnant) given that the test was positive. This formula takes into account the probabilities of testing positive because the disease is present and the probability of a false positive. As an example, let us assume that a specific disease is only present in 5 out of every 1,000 people. Suppose that the test for the disease is accurate 99% of the time a person has the disease and 95% of the 4
time that a person lacks the disease. What is the probability that the person has the disease given that they tested positive? Refer back to Chris car example (#3). Julia s car works, given only 1 car works? What is the probability that Example 2.9: You can study the Monty Hall problem. There was an old television show called Let s Make a Deal, whose original host was named Monty Hall. The set-up is as follows. You are on a game show and you are given the choice of three doors. Behind one door is a car, behind the others are goats. You pick a door, and the host, who knows what is behind the doors, opens another door (not your pick) which has a goat behind it. Then he asks you if you want to change your original pick. The question we ask you is, Is it to your advantage to switch your choice? Example 2.10: Let us roll 2 dice, a hunter green die and a cardinal red die. let A be the event that the hunter green die is odd. Let B be the event that the cardinal red die is odd. Let C be the event that the sum of the dice is odd. Prove that these events are pairwise independent but not mutually independent. Example 2.11: After the first exam, a student will go to the beach (event B) depending on if they pass the exam (event A). The probability a student will pass is.9. If a student passes, they go to the beach with a probability of.8. However, a student who fails the exam will only go to the beach with a probability of.4. What is the probability that a student at the beach passed their test? What is the probability that a student not at the beach failed the test? Example 2.12: Suppose you are in MGMT 614, the class is divided into 2 groups and asked to manage a portfolio through Yahoo! Finance. On any given day, group 1 has an 85% chance of increasing their net worth while group 2 has a 75% chance of increasing their net worth. Assume that they had a decrease if they did not have an increase. Suppose 40% of the class is in group 1. If the teacher picks a student at random to report their portfolio change (from the previous day), what is the probability they report an increase? What is the probability that they are from group 2 knowing that they reported a decrease? 3 Friday, 8/31/12, Example Day See the handout about The Price is Right million dollar giveaway. 5
4 Extra examples Extra 2.1: Suppose there is a sadistic statistic student teacher. The sadistic statistic student teacher prepares a preposterous problem set. Suppose that only sixteen percent of the stressed-out students successfully satisfy the standard the first time. Suppose that the stressed-out students that did not succeed in satisfying the statistics teacher s standards only succeed in satisfying said stipulations sixty percent of the time the second time through. Since the statistics teacher is sadistic he suggests that those stunned students substantiate study groups and strive for success a third time. These tired, tortured pupils are triumphant thirty percent of the time. What percentage of pupils pass the problems posed? Given that a student passed the problems, what is the probability that they did so the second time through?.7648 and.6590 Extra 2.2: Suppose we throw 2 fair dice. Let E denote the event that the sum of the dice is a 7. Let F denote the event that the first die equals a 4. Let G be the event that the second die equals a 3. Calculate the probabilies P(E) and P(E F). Are E and F independent? 1 for each and yes 6 Calculate the probabilities P(F) and P(F E). What can you tell from the results from this part and the previous one? 1 for each and 6 indepence of F and E Calculate the probability P(E F C ) and compare it with P(E). What can you say now? 1 C still and independence of E and F 6 Are E and G independent? What about E and (F G)? yes and no respectively Extra 2.3: There are n types of coupons, and each new one collected is independently of type i with probability p i, where sum n i=1p i = 1. Suppose k coupons are to be collected. If A 1 is the event that there is at least one type 1 coupon among those collected and A 2 is the event that there is at least one type 2 coupon among those collected, find: P(A 1 ) 1 (1 p 1 ) k P(A 1 A 2 ) 1 (1 p 1 p 2 ) k 6
P(A 1 A 2 ) The top is 1 [(1 p 1 ) k + (1 p 2 ) k (1 p 1 p 2 ) k ] The bottom is 1 (1 p 2 ) k Extra 2.4: An insurance company believes that people can be divided into two classes: those who are accident-prone and those who are not. The company s statistics show that an accident-prone person will have an accident at some time within a fixed 1-year period with probability.4. However, this probability decreases to.2 for a person who is not accident-prone. If we assume that 30% of the population is accident prone, what is the probability that a new policyholder will have an accident within a year of purchasing a policy? What is the probability that the next 8 customers will not have an accident in their respective first years of coverage with this company? Moreover, let us examine a new policyholder who has an accidnet within a year of purchasing their policy. What is the probability that (s)he is accident-prone?.26,.0899, and.4615 Extra 2.5: The Beardstown Bearcats baseball team plays 60% of its games at night. It wins 55% of its night games but only 35% of its day games. You read in the paper that the Bearcats won their last game against the Manteno Maulers. What is the probability that it was played at night?.7021 Extra 2.6: Kerry has her secretary, Ray, put her meetings in her calendar. Kerry only misses her meetings if Ray forgets to put them in her calendar. 2% of the time Ray forgets to update the calendar. 90% of the time that Kerry misses a meeting her boss, Matt, makes her stay late. Even if Kerry makes her meeting, Matt still makes her stay late 5% of the time. What is the probability that Kerry misses a meeting and Matt does not make her stay late?.002 What is the probability Matt does not make Kerry stay late?.933 Given Matt made Kerry stay late, what is the probability that Kerry made the meeting?.7313 What are the chances Kerry missed the meeting or Matt made her stay late?.069 7
Extra 2.7: Suppose that Bob can decide to go to work by one of three modes of transportation (car, bus, or train). Because of high traffic, if he decides to go by car, there is a 50% chance he will be late. If he goes by bus, the probability of being late is only 20%. The train is almost never late, with a probability of only 1%, but it is more expensive. Suppose that Bob is late one day and his boss wishes to estimate the probability that he drove to work that day. Since he does not know which mode of transportation Bob usually uses, he gives a prior probability of 1 to each of the three possibilities. What is the boss 3 estimate of the probability that Bob drove to work?.7042 Suppose that a coworker of Bob s knows that he almost always takes the train to work, never takes the bus, but sometimes (10% of the time) takes the car. What is the coworkers probability that Bob drove to work that day, knowing that Bob was late? answers may vary depending on P(train) and P(bus). I used P(train)=.9 and my answer was.8475. 8