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
Ω 16 Conditional Probability If we have partial information, this effectively shrinks the available sample space and changes the probabilities. We begin with an example. A B Monty Hall show. The setting is a game show in which a prize is hidden behind one of three curtains. Call the curtains X, Y , and Z. You can win the prize by guessing the right curtain. Figure 17: Assuming B, the probability of A is represented by the fraction of the shaded region, B, that is dark shaded, A ∩ B. S TEP 1. You choose a curtain. Since P (A | B) = This leaves two curtains you did not choose, and at least one of them does not hide the prize. Monty Hall opens this one curtain and this way demonstrates there is no prize hidden there. Then he asks whether you would like to reconsider. Would you? P (B) S TEP 2 B . You change to the other available curtain. Perhaps surprisingly, Step 2 B is the better strategy. As shown in Figure 16, it doubles your chance to win the prize. X 1 2B X 1/3 1/3 X 1 Y 1/3 Z 1 1/3 Y Y 1/3 Z Z 1 1 Z Trial processes. In many situations, a probabilistic experiment is repeated, possibly many times. We call this a trial process. It is independent if the i-th trial is not influenced by the outcomes of the preceding i − 1 trials, that is, X X P (Ai | A1 ∩ . . . ∩ Ai−1 ) = Figure 16: Suppose the prize is behind curtain X. The chance of winning improves from 13 in 2 A to 32 in 2 B. = An example is picking a coin from an urn that contains one nickel, two dimes, and two quarters. We have an independent trial process if we always return the coin before the next draw. The choice we get a quarter is therefore 52 each time. The chance to pick the quarter three times in a 8 row is therefore ( 25 )3 = 125 = 0.064. More generally, we have the P (A ∩ B) . P (B) We illustrate this definition in Figure 17. If we know that the outcome of the experiment is in B, the chance that it is also in A is the fraction of B occupied by A ∩ B. We say A and B are independent if knowing B does not change the probability of A, that is, P (A | B) = P (Ai ), for each i. Formalization. We are given a sample space, Ω, and consider two events, A, B ⊆ Ω. The conditional probability of even A given event B is P (A | B) P (B ∩ A) = P (B | A). P (A) P RODUCT P RINCIPLE FOR I NDEPENDENT P ROB. If A and B are independent then P (A ∩ B) = P (A) · P (B). 1/3 1 = P (A), we have We thus see that independence is symmetric. However, it fails to be an equivalence relation because it is neither reflexive not transitive. Combining the definition of conditional probability with the condition of independence, we get a formula for the probability of two events occurring at the same time. S TEP 2 A . You stick to your initial choice. 2A = P (A ∩ B) P (B) I NDEPENDENT T RIAL T HEOREM. In an independent trial process, the probability of a sequence of outcomes, a1 , a2 , . . . , an , is P (a1 ) · P (a2 ) · . . . · P (an ). Trial processes that are not independent are generally more complicated and we need more elaborate tools to P (A). 45 compute the probabilities. A useful such tool is the tree diagram as shown in Figure 18 for the coin picking experiment in which we do not replace the picked coins. 1/2 D 1/30 2/3 Q 2/30 2/3 D 2/30 1/3 Q 1/30 1/3 D 1/30 2/3 Q 2/30 1/3 N 1/30 2/3 Q 2/30 1/3 N 2/30 D 2/30 1/3 Q 2/30 2/3 D 2/30 1/3 Q 1/30 1/3 N 2/30 D 2/30 0.999 D N 1/2 1/3 0.001 y 0.00099 0.01 n 0.00001 0.02 y 0.01998 0.98 n 0.97902 D Figure 19: Tree diagram showing the conditional probabilities in the medical test question. Q 1/5 0.99 D N 1/4 2/5 D 1/4 Summary. Today, we learned about conditional probabilities and what it means for two events to be independent. The Product Principle can be used to compute the probability of the intersection of two events, if they are independent. We also learned about trial processes and tree diagrams to analyze them. D 1/2 Q 2/5 1/3 N 1/4 Q 1/2 D 1/4 1/3 1/3 Q 2/30 1/3 N 1/30 2/3 D 2/30 Q Figure 18: What is the probability of picking the nickel in three trials? Medical test example. Probabilities can be counterintuitive, even in situations in which they are important. Consider a medical test for a disease, D. The test mostly gives the right answer, but not always. Say its false-negative rate is 1% and its false-positive rate is 2%, that is, P (y | D) = 0.99; P (n | D) P (y | ¬D) = 0.01; = 0.02; P (n | ¬D) = 0.98. Assume that the chance you have disease D is only one in a thousand, that is, P (D) = 0.001. Now you take the test and the outcome is positive. What is the chance that you have the disease? In other words, what is P (D | y)? As illustrated in Figure 19, P (D | y) = P (D ∩ y) 0.00099 = = 0.047 . . . . P (y) 0.02097 This is clearly a case in which you want to get a second opinion before starting a treatment. 46