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
Math 1324 – Finite Mathematics Sections 8.2 and 8.3 Conditional Probability, Independent Events, and Bayes’ Theorem What is conditional probability? It is where you know some information, but not enough to get a complete answer. You may know information about an event once another event has happened. Ex: A survey is done of people making purchases at a gas station. Most people buy gas or a drink. The results are shown in the table below. buy drink (D) no drink (Dc ) TOTAL buy gas (G) 20 15 35 no gas (Gc ) 10 5 15 TOTAL 30 20 50 (a) What is the probability someone at this gas station buys a drink? (b) What is the probability someone at this gas station does not buy gas? (c) What is the probability that someone who buys a drink also buys gas? In other words, given a person bought a drink, what is the probability he bought gas? We write P(G|D), which we read as the probability of G given D In this case, since we know that the person bought a drink, our sample space is not all 50 people. We have reduced our sample space to just the 30 who bought drinks. The conditional probability of event E given event F is P(E|F) = P(E ∩ F) P(F) Going back to our example, we have P(G|D) = (d) What is the probability that a person who buys gas does not buy a drink? Math 1324 NOTE: P(E|F) = Section 8.2-8.3 Continued P(E ∩ F) so P(E ∩ F) = P(F) 3 1 1 of the upperclassmen Ex: At a party, of the guests are freshmen. of the freshmen drink a coke and 3 4 10 drink a coke. Draw a tree diagram for this situation. NOTE: This situation needs a tree diagram because you only have information about drinks once you know the class of the person, i.e. knowledge about drinks is conditional on knowledge of class. (a) What is the probability that a person chosen at random is drinking a coke? (b) What is the probability that a person chosen at random is an upperclassman and is drinking a coke? (c) What is the probability that a person who is a freshman is not drinking a coke? (or given freshman, what is the probability he does not drink a coke?) 2 Math 1324 Section 8.2-8.3 Continued (d) I am cleaning up after the party and pick up a non-Coke can. What is the probability a freshman drank it? Any time you know the second set of branches and work backwards, you are using Bayes’ Theorem. Think of favorable over total. Write all the paths the given event (on the last set of branches) can occur, starting from the root. This is the total and goes on the bottom. Put the path you want on top. The following is an example of a stochastic process, in which the probabilities at each stage depend on previous outcomes and probabilities. Ex: Draw three cards from a standard deck of 52 cards without replacement. (a) What is the probability the three cards are hearts? (b) Find the probability the third card is a heart. (c) Find the probability the third card is a heart, given the first two are hearts. 3 Math 1324 Section 8.2-8.3 Continued Ex: Choose a marble from a cup or a bowl. You flip a fair coin to decide which to choose from. The cup contains one red and two green marbles. The bowl contains three red and two green marbles. (a) What is the probability the marble is red? (b) What is the probability the marble came from the bowl if it is red? (c) What is the probability the marble is green if it came from the bowl? Ex: A medical test is used to diagnose disease. Among those who have the disease, the probability the disease will be detected is 0.95. The probability the test will erroneously indicate disease in someone who does not have it is 0.004. It is estimated that 4% of the population who take the test have the disease. If the test administered to an individual is positive, what is the probability the person actually has the disease? 4 Math 1324 Section 8.2-8.3 Continued We say two events E and F are of the other. if the outcome of one does not affect the outcome Test for the Independence of two events: Two events E and F are independent if and only if If E1 , E2 , E3 , . . . , En are independent events, then Ex: A medical experiment showed the probability that a new medicine was effective was 0.75, the probability of a certain side effect was 0.4, and the probability of both was 0.3. Are these events independent? Ex: Suppose the probability that your mail will be delivered before 2p.m. on a delivery day is 0.90. What is the probability that your mail will be delivered before 2p.m. for two consecutive days? three consecutive days? Ex: Experiment: Cast a pair of fair six-sided dice. What is the probability that (a) one die is a 2 if the sum is 8? (b) the sum is 5 if one die is a 1? 5 Math 1324 Section 8.2-8.3 Continued Ex: Box A contains 3 red and 4 blue marbles. Box B contains 6 red and 4 blue marbles. Experiment: Draw a marble from Box A and transfer it to Box B. Then draw a marble from Box B. What is the probability that (a) a red marble was drawn from Box B? (b) a blue marble was drawn from Box B if a blue marble was drawn from Box A? (c) a blue marble was drawn from Box A if a red marble was drawn from Box B? Ex: The probability that is ability that Monty Hall Problem 6 is and the probability that . If these events are independent, what is the prob?