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
STP 421 - Problem Set 2 Solutions (Fall 2016) 1.) A jar contains 50 type 1 coins and 50 type 2 coins. Type 1 coins have probability 9/10 of landing on heads, while type 2 coins have probability 1/10 of landing on heads. If a coin is chosen at random from the jar and tossed 3 times, what is the probability that it lands on heads at least 2 times? Solution: We begin by introducing some notation. Let C1 be the event that we choose a type 1 coin and let C2 be the event that we choose a type 2 coin. Similarly, let H2 be the event that the coin lands on heads exactly two times and let H3 be the event that the coin lands on heads all three times. By conditioning on the type of coin sampled, we have P(H2|C1) = 3 P(H2|C2) = 3 9 10 2 1 10 2 1 10 9 10 9 10 3 1 10 3 P(H3|C1) = P(H3|C2) = . Then, using the law of total probability and the fact that P(C1) = P(C2) = 1/2, we have P(H2 ∪ H3) = P(H2) + P(H3) = P(C1)P(H2|C1) + P(C2)P(H2|C2) + P(C1)P(H3|C1) + P(C2)P(H3|C2) 1 1 = · · (3 · 81 + 27 + 729 + 1) 2 1000 1 = . 2 Note: The answer could also have been found by exploiting the symmetry built into the problem! 2.) Suppose that an HIV-1 test has a false positive rate of 0.1% and a false negative rate of 0.1%. If an individual with no known risk factors from a population with an HIV-1 prevalence of 0.001 is tested twice and receives a positive result both times, what is the probability that they are actually infected? State any additional assumptions that you use to derive your answer. Solution: Let H be the event that the individual is HIV-1 positive and let T 1 and T 2 be the events that the first and second tests are positive, respectively. Here we will assume that T 1 and T 2 are conditionally independent given H or given H c , i.e., conditional on the person’s actual status, the two tests are independent. (This might be false if, for example, the accuracy of the test varies between technicians or labs and the two tests are performed by the same lab worker.) From the problem, we know that P(H) = 0.001 and that P(T 1|H c ) = P(T 2|H c ) = 0.001. P(T 1|H) = P(T 2|H) = 0.999 Furthermore, by the law of total probability, the probability that a randomly chosen person 1 receives two positive test results is P(T 1, T 2) = P(H)P(T 1, T 2|H) + P(H c )P(T 1, T 2|H c ) = P(H)P(T 1|H)P(T 2|H) + P(H c )P(T 1|H c )P(T 2|H c ) = 0.001(0.999)2 + 0.999(0.001)2 = 0.000999. Then, using Bayes’ formula, we find that P(T 1, T 2|H) P(T 1, T 2) 0.998001 = 0.001 × 0.000999 = 0.999. P(H|T 1, T 2) = P(H) In this case the second test removes almost all of the uncertainty that would come with only a single positive test result. 3.) Suppose that a coin is tossed ten times and lands on heads exactly three times. Assuming that the tosses were independent of one another and that each toss had a probability p ∈ (0, 1) of landing on heads, show that the conditional probability that the first toss landed of heads is 0.3, irrespective of p. Solution: Let E be the event that the coin lands on heads exactly three times and let H1 be the event that the first toss lands on heads. Notice that if H1 is true, then E will also be true if and only if we obtain heads exactly two times in the last nine tosses. Noticing that P(H1) = p and 10 3 P(E) = p (1 − p)7 3 9 2 P(E|H1) = p (1 − p)7 , 2 we can then use Bayes’ formula to show that P(H1|E) = P(H1) P(E|H1) 3 = , P(E) 10 irrespective of the value of p. 4.) Suppose that X is uniformly distributed on [0, 1] and let A be the event that X ∈ [0.5, 1.0] and let B be the event that X ∈ [0.25, 0.5] ∪ [0.75, 1.0]. Show that A and B are independent. Solution: Since X is a standard uniform random variable, we know that P(c ≤ X ≤ d) = d − c for any 0 ≤ c ≤ d ≤ 1. In particular, P(A) = P(B) = 0.5 and P(A ∩ B) = P(X ∈ [0.75, 1.0)) = 2 0.25, from which it follows that P(A ∩ B) = P(A)P(B), which then shows that A and B are independent. 5.) Two events A and B are said to be conditionally independent given an event C if P(A ∩ B|C) = P(A|C) × P(B|C). (a) Give an example of three events A, B and C such that A and B are independent, but not conditionally independent given C. (b) Given an example of three events A, B and C such that A and B are conditionally independent given C, but not independent. Solutions: There are many examples of the types requested. Here are two. (a) Suppose that a fair coin is tossed two times and that the two tosses are independent. Let A be the event that the first toss lands on heads, let B be the event that the second toss lands on heads and let C be the event that only one of the tosses lands on heads. Then A and B are independent, but since P(A ∩ B|C) = 0, while P(A|C) = P(B|C) = 1/2, we see that A and B are not conditionally independent given C. (b) Consider problem 1 and let A be the event that the first toss lands on heads and let B be the event that the second toss lands on heads. Then A and B are conditionally independent given C1 (or C2), but they are not independent since P(A) = P(B) = 1/2, while P(A ∩ B) = P(C1)P(A ∩ B|C1) + P(C2)P(A ∩ B|C2) 1 9 2 1 1 2 = + 2 10 2 10 41 = 100 1 1 × . 6= 2 2 3