ENGI 4421 Dr. Reza Shahidi January 30, 2015 February 1, 2015 Problem Set 4 Solutions Conditional Probability, Bayes Theorem 1. One percent of all individuals in a certain population are carriers of a particular disease. A diagnostic test for this disease has a 90% detection rate for carriers and a 5% detection rate for non-carriers. Suppose the test is applied independently to two different blood samples from the same randomly-selected individual. (a) What is the probability that both tests yield the same result? Let D be the event that the randomly-selected individual carries the disease, and let A1 be the event that the first diagnostic test detects the disease in the individual, and let A2 be the event that the second diagnostic test detects the disease in the individual. Then the probability that both tests yield the same result is: P[A1A2]+P[!A 1 A2! ]=P[A1A2D]+P[A1A2!D ]+P[ A1! A2! D]+P[ A1! A2!!D ] =P[D]P[A1 D]P[A2 A1D]+P[!D ]P[A1 D! ]P[A2 A1 D! ]+ P[D]P[!A 1 D]P[ A2! A1! D]+P[ D! ]P[ A1! D! ]P[ A2! A1! D! ] =P[D]P[A1 D]P[A2 D]+P[!D ]P[A1!D ]P[A2!D ]+ P[D]P[!A 1 D]P[ A2! D]+P[!D ]P[ A1!!D ]P[ A2!!D ] (because A1 and A2 are independent) ENGI 4421 PROBLEM SET 4 SOLUTIONS!1
=(0.01)(0.9)(0.9)+(0.99)(0.05)(0.05)+(0.01)(1-0.9)(1-0.9)+(0.99)(1-0.05) (1-0.05)=0.90415 =90.4% (b) If both tests are positive, what is the probability that the selected individual is a carrier? Using the same notation as in part (a), we wish to find P[D A1A2]. By the definition of conditional probability, P[D A1A2]=P[A1A2D]/P[A1A2] P[A1A2]=P[A1A2D]+P[A1A2!D ] by the law of total probability. In part (a) of this problem, we already found P[A1A2D]=(0.01)(0.9)(0.9) =0.0081, and P[A1A2!D ]=(0.99)(0.05)(0.05)=.002475. Therefore the desired probability is.0081/(0.0081+.002475)=76.6% 2. One box contains six red balls and four green balls, and a second box contains seven red balls and three green balls. A ball is randomly chosen from the first box and placed in the second box. Then a ball is randomly selected from the second box and placed in the first box. (a) What is the probability that a red ball is selected from the first box and a red ball is selected from the second box? The two selections are not independent because a ball is selected from the first box and placed in the second, thus changing the probabilities of selection in the 2nd box. Let R1 be the event that a red ball is selected from the first box and R2 be the event that a red ball is selected from the second box. Then we wish to find P[R1 R2]=P[R1]P[R2 R1]=(6/10)x(8/11)=24/55. Note that the first probability in the product was 6/10 because there were 6 red balls and 10 total balls, while the second probability was 8/11 because a red ball had been moved from the first box to the second, meaning that there were 8 red ball and 11 balls in total. ENGI 4421 PROBLEM SET 4 SOLUTIONS!2
(b) At the conclusion of the selection process, what is the probability that the numbers of red and green balls in the first box are identical to the numbers at the beginning? The probability that the numbers of red and green balls in the first box don t change after the selection process is the probability that the same color ball is selected from the first box and the second box. In part (a), we already calculated the probability that a red ball was chosen from both the first and second box. So we need now to only calculate the probability of the event E that a green ball was chosen from both the first and second box. Following the same reasoning as in part (a), and using similar notation, this probability is P[G1 G2]=P[G1]P[G2 G1]=(4/10)x(4/11)=8/55. Therefore, the total probability that the number of red and green balls in the first box remains the same after the selection process is equal to 24/55+8/55=32/55. 3. A factory has the following information about the quality control process on its production line. If an item is defective, there is a 99.9% chance that the quality control process will reject it (the correct decision). If an item is good, there is a 2% chance the quality control process will reject it (incorrect decision). It is known that 0.1% of all items on the production line are defective. Given that the quality control process has just rejected the item, find the probability that the decision is correct. Let D be the event that the item is defective and let A be the event that the quality control process rejects the item. From the problem statement, we are given that: P[A D]=0.999, P[A!!D ]=0.02, P[D]=.001. ENGI 4421 PROBLEM SET 4 SOLUTIONS!3
We are asked to find the probability that the item was actually defective given that it was rejected by the quality control process. This probability is P[D A]. By Bayes Theorem, P[D A]=P[A D]P[D]/P[A]=! P[A D]P[D] P[A D]P[D]+ P[A! D]P[! D] =(0.999)(.001)/((.999)(.001)+(.02)(.999))=.000999/(.000999+.01998)=4.76% 4. 1 2 3 4 Consider the system of components connected as in the picture above. If components work independently of one another, and P[component works]=0.9, calculate P[system works]. ENGI 4421 PROBLEM SET 4 SOLUTIONS!4
Let E be the event that a component works, and L be the event that the subsystem consisting of components 1 and 2 in parallel works. Then P[L]=1-(1-P[E])(1-P[E])=1-(.1)(.1)=0.99. Let M be the event that the subsystem consisting of 3 and 4 in series works. Then P[M]=P[E]P[E]=(.9)(.9) =.81. Then the probability that the system works is the probability of L and M in parallel. This is: P[system works] = 1-P[system does not work] = 1-(1-P[L])(1-P[M])= 1-(.01)(.19)=.9981=99.81%. 5. Alice, Bob and Carol take part in a game where each of them, in turn, rolls a fair die until one of them rolls a six and wins the game. Alice rolls first. If she doesn t roll a six, then Bob rolls next. If he doesn t roll a six then Carol has her first chance to win. If none of them roll a six on the first attempt, then Alice gets a second roll and so on. (a) Find the probability that Carol wins the game in the first round. Let A be the event that Alice rolls a six in a given round, B be the event that Bob rolls a 6 in a given round, and C the event Carol rolls a 6 in a given round. Then the probability that Carol wins the game in the first round is:! P[!A!BC] =P[! A! ]P[! B! ]P[C] (assuming independence) =(1-P[A])(1-P[B])P[C]=(5/6)x(5/6)x(1/6)=25/216 (b) Find the probability that the game lasts for more than two complete rounds. The probability that the game lasts for more than two complete rounds is the probability of the event E that the first six rolls of the die all don t show a 6. The number of possible ways that a die can be rolled 6 times without showing a 6 will ENGI 4421 PROBLEM SET 4 SOLUTIONS!5
be 5x5x5x5x5x5=625x25=15625. The total number of ways that a die can be rolled 6 times is 6x6x6x6x6x6=46656. Therefore, the probability that the game lasts more than 2 complete rounds is n(e)/n(s)=15625/46656 = 33.49%. (c) Find the probability that Alice wins. Let A1 be the probability that Alice wins in the first round, A2 be the event that she wins in the second round, etc. Let A be the probability that Alice wins in any round. Then it is easy to verify that P[A] = P[A1]+P[A2]+ The probability that Alice wins in the first round is the probability that she rolls a six, namely 1/6. The probability that she wins in the second round is the probability that all 3 people did not roll a six in the first round, while she rolled a six in the second round. This probability is (5/6)x(5/6)x(5/6)x(1/6)=125/1296. Similarly the probability that she wins in the third round is the probability that the first 6 rolls were all not 6 while Alice s 3rd roll (the 7th roll in total) was a 6. This probability is!. In general, the probability that Alice wins in the kth round is given by 3(k 1)!. 6 So the total probability that Alice wins is the sum of the probabilities that she wins in any round, i.e.,! P[A] = P[A k ] =. = 1 125 6 21 This is a geometric series. In general! a k = 1. 1 a k=1 k=1 So above, P[A]=1/6x(1/(1-125/216))=1/6x1/(91/216)=216/546=36/91. This is slightly greater than 1/3 because Alice has the first roll. k=0 3(k 1) k=0 k ENGI 4421 PROBLEM SET 4 SOLUTIONS!6
(d) Find the probability that Carol wins, given that Alice doesn t roll a six on her first roll. Let C be the event that Carol wins and A be the event that Alice does not roll a six on her first roll. Then we are asked to find P[C A]. By Bayes Theorem, this is equal to P[A C]P[C]/P[A]. The first conditional probability, P[A C] can easily be shown to equal 1. This is because given that Carol wins, there is no way that Alice could have rolled a 6 on her first roll (otherwise Alice would have won). Therefore, the conditional probability reduces to P[C]/P[A]. Obviously, P[A] = 5/6, since this is the probability that Alice did not roll a 6 on her first roll. So P[C A]=6/5xP[C]=1.2P[C]. Using the same reasoning as in part (c), we can find P[C], the probability that Carol wins. This will be equal to the probability that she wins in the first round, plus the probability that she wins in the second round, etc. The probability she wins in the first round is the probability that both Alice and Bob did not roll a 6, while Carol did. This is (5/6)x(5/6)x(1/6) = 25/216. Similarly, the probability she wins in the second round is the probability the first 5 rolls are all not 6 s while Carol s second roll (the 6th roll in total) is a 6. This will be (5/6) 5 x(1/6). In general, the probability that Carol wins in the kth round is given by the expression! 3k 1 3k 1. Therefore, P[C]= 3k+2 1!. k=1 6 = 1 6 = 25 k=0 216 = 25 125 k=0 216 21 = 25 1 k=0 216 1 125 = 25 91 216 So P[C A]=6/5xP[C]=30/91. 3k k ENGI 4421 PROBLEM SET 4 SOLUTIONS!7