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
3. Conditional probabilities The probability that an event E occurs given that an event F has occurred is denoted by P(E|F) and called the conditional probability of E given F. This probability is given by P( E | F ) Observing F reduces the set of possible outcomes. The sample space for the event E|F is F. If all outcomes are equally likely, the P(E|F) can be interpreted as the proportion of outcomes in F that are also in E. Example 1: Two fair dice are tossed. What is the probability that the sum of the two dice is an even number given that the first die is four? S={1, 2, 3, 4, 5, …, 36}. E Sum of the two dice is even => F = {(1,1), (1,3), (1,5), (2,2), (2,4), (2,6), (3,1), (3,3), (3,5), (4,2), (4,4), (4,6), (5,1), (5,3), (5,5), (6,2), (6,4), (6,6)} => P(E) = 18/36=1/2. F The first dice is 4 => F = {(4,1), (4,2), (4,3), (4,4), (4,5), (4,6)} => P(F) = 1/6. P(EF) = 3/36 => P( E | F ) P( EF ) . P( F ) P( EF ) 3/ 36 1 . P( F ) 1/ 6 2 When all the outcomes in F are equally likely, then the probability P(E|F) can be obtained as P( E | F ) Number of outcomes in E and F . Number of outcomes in F Example 2: An urn contains 10 black balls and 5 red balls. Each ball regardless of color is equally likely to be drawn. We draw two balls without replacement. What is the probability that we draw two black balls. S = {(b,r), (b,b), (r,b), (r,r)} E second ball is black=> E = {(b,b), (r,b)} F the first ball is black => E = {(b,r), (b,b)} EF both balls are black P(F) = 10/15 P(E|F) = 9/14 P(EF)=90/15 = 90/210 P(E1E2…En)=P(E1)P(E2|E1)P(E3|E1E2)…P(En| E1E2…En-1). 4. Independent events Two events E and F are said to be independent if P(EF)=P(E)P(F). This means that P(E|F)=P(E). If all outcomes are equally likely, then E and F are independent if the fraction of outcomes in F that are also in E is the same as the fraction of outcomes in S that are also in E. Example 2: Two fair dice are tossed. What is the probability that the sum of the two dice is 6 given that the first die is four? S={1, 2, 3, 4, 5, …, 36}. E Sum of the two dice is six => F = {(1,5), (2,4), (3,3), (4,2), (5,1), (2,6)} => P(E) = 6/36=1/6. F The first dice is 4 => F = {(4,1), (4,2), (4,3), (4,4), (4,5), (4,6)} => P(F) = 1/6. P(EF) = 1/36 => P( E | F ) P( EF ) 1/ 36 1 . P( F ) 1/ 6 6 E and F are independent if observing F does not change the probability with which E occurs. If EF = , the P(E|F) = 0. The definition of independent events can be extended to multiple events. The events E1, E2, …, En are said to be independent if for every subset E1, E2, …, Er, where r ≤ n, of these events P(E1E2…Er)= P(E1)P(E2)…P(Er). Example: A ball is drawn from an urn containing four balls numbered 1, 2, 3, and 4. All four outcomes are equally likely. Let E = {1, 2}, F = {1, 3}, G = {1,4}. Then, P(EF) = P(E)P(F) = 1/4 P(EG) = P(E)P(G) = 1/4 P(FG) = P(F)P(G) = 1/4 However, P(EFG) = 1/4 ≠ P(E)P(F)P(G)= 1/8. Events are pair-wise independent are not necessarily jointly independent. Independent trials: Consider a sequence of n experiments, each of which results in either a “success” of a “failure.” Let Ei (i=1, 2, …, n) denote the event that the ith experiment results in a success. If P(E1E2…En)=P(E1)P(E2)…P(En), then the series of experiments is said to consist of independent trials. D choose =18 =30 =12 p=2/3 p=1/3 p=1/9 p=2/9 p=4/9 2=90 1 00, 0, 000 MR P 12 D2=30 =18 000 5. Bayes’formula Let E and F be events, then E EF EF c => P( E) P( EF EF c ) P( EF ) P( EF c ) => P( E ) P( E | F ) P( F ) P( E | F c ) P( F c ) . Example: A quality control test for a micro-processor is 95% accurate in detecting a defect when there is one. However, the test also detects a defect (a false positive) in one percent of the non-defective micro-processors. If only 5% of the micro-processors are actually defective, what is the probability that a micro-processor is defective given that the test indicates a defect? E: test indicates a defect F: micro-processor is defective P(E|F) = 0.95 P(E|Fc) = 0.01 P(F) = 0.05 P( F | E ) P ( E | F ) P( F ) 0.95 0.05 = 0.323. c c P( E | F ) P( F ) P( E | F ) P( F ) 0.95 0.05 0.01 0.95 Let E1, E2, …, En, be n mutually exclusive events such that E1 E2 ... En = S. Then, P( E ) P( E | E1 ) P( E1 ) P( E | E2 ) P( E2 ) ... P( E | En ) P( En ) , and P( Ei | E ) P( E | Ei ) P( Ei ) . P( E | E1 ) P( E1 ) P( E | E2 ) P( E2 ) ... P( E | En ) P( En ) The last equation is known as Bayes’s formula.