Unformatted text preview: Homework 3 36325/725 due Friday Sept 14 (1) Chapter 2.1 Problem # 6. A box contains three cards. One card is red on both sides, one card is green on both sides, and one card is red on one side and green on the other. Select a card at random and observe the color on one side. If this side is green, what is the probability that the other side is green? Hint: List the sample space carefully. (2) Chapter 2.1 Problems # 11 and 12 The probability that a child has blue eyes is 1/4. Assume independence between children. Consider family with 5 children. (a) If it is known that at least one child has blue eyes, what is the probability that at least three children have blue eyes? (b) If it is known that the youngest child has blue eyes, what is the probability that at least three children have blue eyes? (3) Chapter 2.2 Problem # 4 Suppose events form a partition of the sample space , i.e. they are disjoint and . Assume that . Prove that if then for some . (4) Chapter 2.2 Problem # 8 In a certain city, 30 percent of the people are conservatives, 50 percent of the people are liberals, and 20 percent of the people are independents. Suppose that 65 percent of the conservatives voted, 82 percent of the liberals voted, and 50 percent of the independents voted. We select a person at random and learn that she did not vote. What is the probability that she is a liberal? 1 %$(" ' % & 57775 3 9'8'64 2 # ! $" %10 ) % ! & (5) Chapter 2.2 Problems # 10 and 11. A box contains 5 coins and each has a different probability of showing heads. Let denote the probability of heads on each coin. Suppose that (6) Here we will get some experience simulating conditional probabilities. (a) Consider tossing a fair die. Let and . Then, , and . Since , the events and are independent. Let's verify this numerically. n < 10000 p < rep(1/6,6) tosses < sample(1:6,size=n,replace=T,prob=p) help(sample) par(mfrow=c(2,2)) plot(1:6,p,type='h',lwd=3,ylim=c(0,1)) z < tabulate(tosses,nbins=6) z < z/n plot(1:6,z,type='h',lwd=3,ylim=c(0,1)) A < tosses[ (tosses == 2)  (tosses == 4)  (tosses == 6) ] ### the vertical bar means `or' pA < length(A)/n B < tosses[ (tosses == 1)  (tosses == 2)  (tosses == 3)  (tosses == 4) ] pB < length(B)/n AB < tosses[ (tosses == 2)  (tosses == 4) ] 2 % XHF UI % 5 P5 3x 6R6Qy P5 X5 35Fx 6R6e 2 i57775F pA'''eh 2 u 2 V w s tf i57775F p98''eG 2 3 H F XH3 Ue q% eI % V & g pv ) q% f & E f & g rf q% f Let denote "heads is obtained" and let denote the event that coin is selected. (a) Select a coin at random and toss it. Suppose a head is obtained. What is the posterior probability that coin was selected ( )? In other words, find for . (b) Toss the coin again. What is the probability of another head? In other words find where "heads on toss ." Now suppose that the experiment was carried out as follows. We select a coin at random and toss it until a head is obtained. (c) Find where "first head is obtained on toss 4." g 7F B d cb PHX V 5 3HF S 5 PHF E eT [email protected] WU1a`Y [email protected] 6UIT [email protected] RQIG [email protected] 5 # D @ B 57775 [email protected] 88''A @ pAB < length(AB)/n pA pB pAB pA*pB pA.given.B < pAB/pB pA.given.B Now create two events that are not independent. Compute and . Compare the calculated values to their theoretical values. Report your results. Now repeat using n = 10. Report your results. Interpret. (7) Simulate question 5a. Plot the simulated values for , . Do this for and . Compare to the theoretical values. Here is some code to get you started: p < c(0, 1/4, 1/2, 3/4, 1) ### Here is a single experiment ### select a coin at random: coin < sample(1:5,size=1,replace=T,prob=rep(1/5,5)) ### toss the coin: A < rbinom(1,1,p[coin]) print( c(coin,A) ) ### to repeat this n times: coin < sample(1:5,size=n,replace=T,prob=rep(1/5,5)) A < rbinom(n,1,p[coin]) ### to make sure you understand this first use n = 10 ### and print out coin and p[coin] 3 % 5 q% 5 % & g i57775F p98''eG 2 rf ) ## F ee# 5 # # F ...
View
Full Document
 Fall '01
 LarryWasserman
 Conditional Probability, Coin flipping

Click to edit the document details