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
ECEEN 3810 Homework #1 Solutions Professor David G. Meyer 1. A certain experiment has a sample space S. Suppose A, B, C, and D are events and that we know: • P [A] = 1/8; P [B] = 1/3; P [C] = 1/2, and A ∪ D = C, • A and B are independent, and • B and C are mutually exclusive. (a) Generally, P [A ∪ D] = P [A] + P [D] − P [A ∩ D] So, if you are told A and D are mutually exclusive (meaning A ∩ D = ∅) then P [C] = P [A ∪ D] = P [A] + P [D] or 1/2 = 1/8 + P [D] ⇒ P [D] = 3/8 If you do not know that A and D are mutually exclusive, then P [C] = P [A ∪ D] = P [A]+P [D]−P [A ∩ D] or 1/2 = 1/8+P [D]−P [A ∩ D] ⇒ P [D] ≥ 3/8 Also A ∪ D = C ⇒ D ⊆ C and so P [D]] ≤ P [C] so generally, all you can say if you don’t know A and D are mutually exclusive is 3/8 ≤ P [D] ≤ 1/2 (b) A and B are independent so P [A ∩ B] = P [A] P [B] = (1/8)(1/3) = 1/24 . (c) B and C are mutually exclusive so C ⊆ B c hence P [B c ∩ C] = P [C] = 1/2 . (d) B ∪ C cannot be all of S . Since they are mutually exclusive, P [B ∪ C] = P [B] + P [C] = 1/3 + 1/2 = 5/6. If the union were all of S, the probability of the union would be equal to one exactly. 2. An urn contains 6 red balls, and 10 white. Four balls are drawn from the urn without replacement. The draws are completely random – in other words, all balls left in the urn are equally likely to be grabbed on a given draw. (a) Neglecting order, and recording ONLY the color of the ball drawn, how many unique draws are possible? The is counting indistinguishable items. Here we are simply recording the number of whites drawn and the number of reds drawn, so the sample space is S = (Nr , Nw ) Nr and Nw are non-negative integers and Nr + Nw = 4 By brute force S = {(0, 4), (4, 0), (1, 3), (3, 1), (2, 2)} ⇒ # (S) = 5 1 (b) What is the probability of drawing exactly two red balls? Here the sample space S can be taken to be unordered strings of length 4 from the “alphabet” (R1, R2, · · · , R6, W 1, W 2, · · · , W 10), so this is counting distinguishable items, without replacement, without order. The cardinality of S is # (S) = 16 4 = 16! = 1820 12!4! The cardinality of the event E = “draw exactly two red balls” can be counted by 6! 10! 6 10 = = (15)(45) = 675 2 2 4!2! 8!2! so P [E] = 675 = .37087 1820 (c) What is the probability of drawing at least two red balls? This is the same taxonomy as the problem above, so S is unchanged and # (S) = 1820 as before. The event E =“draw at least two red balls is best split up as a mutually exclusive union: E = draw exactly 2 red balls ∪ draw exactly 3 red balls ∪ draw exactly 4 red balls so cardinality of E can be ascertained by a sum of three counts 10 6 6 + = 675 + (20)(10) + 15 = 890 # (E) = 675 + 3 1 4 so here P [E] = 890 = .48901 1820 (d) What is the probability of drawing a white ball on the third draw? Here we must take the draws to be ordered. So S can be taken to be ordered strings of length 4 from the “alphabet” (R1, R2, · · · , R6, W 1, W 2, · · · , W 10), so this is counting distinguishable items, without replacement, with order. The cardinality of S is # (S) = (16)4 = 16! = 43680 12! The tricky part about determining the cardinality of the event E =“draw a white ball on the third draw” by slot counting is that without a-priori information, we don’t know how many white balls will be left in the urn by the time we make the third draw (thus we don’t know how many choices we have for the third slot). It is thus propitious to again split E into a union of mutually exclusive events, where in each event we will KNOW how many whites are available for the third draw E = draw no whites in first two draws and white on 3rd ∪ draw white on first draw, but not on second, and white on 3rd ∪ draw white on second draw, but not on first, and white on 3rd ∪ draw white on first three draws 2 And now we can count cardinality of E as the sum of four cardinalities, each counted simply by slot counting # (E) = (6)(5)(10)(13) + (10)(6)(9)(13) + (6)(10)(9)(13) + (10)(9)(8)(13) = (300 + 540 + 540 + 720) (13) = (2100)(13) = 27300 and so P [E] = 27300 = .625 43680 The sneaky and cunning among us will note that the answer is 5/8 = 10/16, which is obviously the probability of drawing a white on the first draw! I will leave you to ponder why this is so..... (e) What is the probability of drawing exactly two red balls given that a red ball was the first draw? This is a conditional probability problem. The sample space S is the same as the problem above as we must retain the order of the draws to answer questions regarding first draw, second draw, etc. Let E1 = the event “draw exactly two reds” and E2 = the event “draw red on first draw”. We seek P [E1|E2] We know P (E1|E2) = P [E1 ∩ E2] P [E2] Clearly1 P [E2] = 6/16 = 3/8 . But what is P [E1 ∩ E2]? Unfortunately, the events E1 and E2 are obviously not independent, so we cannot simply say P [E1 ∩ E2 ] = P [E1 ] P [E2]. However, we can describe the event E1 ∩ E2 as “draw red on the first draw AND draw exactly two reds”, and can count the cardinality of that event as follows 3 = (6)(3)(5)(90) = 8100 6 5 (10)2 |{z} |{z} | {z } 1 choose second choose which |{z} choose two whites red on 1st draw red in order choose which draw of last three other red occurs Hence P [E1 ∩ E2 ] = 8100 8100 P [E1 ∩ E2] 64800 and so P (E1|E2) = = 43680 = = .494505 43680 P [E2] 3/8 131040 3. Suppose we take a coin and flip it 5 times, recording the ordered sequence of heads and tails that comes up. The cardinality of the sample space is then clearly 25 = 32. If the coin is ‘fair’ (i.e. equally likely to land heads or tails on any flip), then this experiment generates an equally-likely outcome sample space.2 1 We could certainly count the cardinality of E and then divide by 43680 – the cardinality of S – and get this answer as well. I encourage you to try this and show it works! 2 A fact we will prove rigorously when we study the theory of independent trials. If the coin is not fair, then this experiment does not generate an equally-likely outcome sample space, but we shall show the theory of independent trials will still allow us nicely to compute probabilities for it. 3 (a) For a fair coin, what is the probability of exactly four heads coming up in the 5 flips? The probability of four heads coming up is obviously the same as the probability of exactly one tail coming up. We can do this problem by counting, letting E =the event “flip exactly one tail”. Then 5 # (E) = =5 1 |{z} choose which flip of the 5 contains tails and so 5 32 Notice that to get the right answer we were forced to count the sample space as ordered even though the question asked didn’t seem to really require an ordered counting. The reason is because the symbols filling in the strings, “H” and “T”, cannot be made distinguishable. On the other hand, this problem can be attacked by repeated trial theory. In general, if you have a problem that is obviously treatable by repeated trials, you are usually better off treating it that way rather than trying to treat it as a sampling with replacement problem. For repeated trials, we again let E =the event “flip exactly one tail” and we calculate the probability of any single outcome in E. So let e ∈ E and note P [E] = P [e] = (1/2)4 | {z } (1/2) = 1/32 | {z } product of probabili- tails flip ties of 4 heads flips and then 5 1 P [E] = # (E) P [e] = = 1 32 5 32 same as before. (b) For a fair coin, what is the probability of exactly four heads coming up in the 5 flips given that the first two flips are heads? Let E = the event of flipping exactly four heads, and F = the event that the first two flips are heads. We know P [E] = 5/32 already, but we want P E F Well by definition P [E ∩ F ] P E F = P [F ] By repeated trials P [F ] = (1/2)2 = 1/4 Now E ∩ F = the event of flipping exactly four heads AND the first two flips are heads. We can compute that probability by repeated trials as well 3 [E ∩ F ] = (1/2)2 (1/2)2(1/2) = 3/32 2 Hence P [E ∩ F ] 3/32 P E F = = = 3/8 P [F ] 1/4 4. An urn contains 12 Type A coins and 6 Type B coins. Type A coins are fair. Type B coins, however, come up heads with an increased probability of 3/4. 4 (a) A coin is drawn at random from the urn and then flipped. What is the probability the flip comes up heads? Let A = the event the an A-type coin is drawn from the urn and let B = the event that a B-type coin is drawn. Let E = the event that a head is flipped. The events A and B clearly form an event space (partition) since the are mutually exclusive and the cover all the possibilities. So, by Baye’s formula P [E] = P E A P [A] + P E B P [B] 1 12 3 6 = + 2 18 4 18 = 1 1 7 + = = .5833 3 4 12 (b) Suppose two coins are drawn without replacement and each is flipped. What is the probability that both flips come up heads? Let FAA = the event we draw two A-type coins from the urn, FBA = the event we first draw a B-type coin, then an A-type coin, FAB = the event first draw an A-type, then a B-type, and FBB = the even we draw two B-types. Let E = the event flip two heads. Cleary FAA , FBA, FAB , and FBB form an event partition, so P [E] = P E FAA P [FAA ]+P E FAB P [FAB ]+P E FBA P [FBA ]+P E FBB P [FBB ] Now, we must compute the probability of the four events FXX by counting. X∈{A,B} This is couting without replacement and with order. The cardinality of that sample space is clearly (18)2 = 18 ∗ 17 = 306. Further 132 306 72 # (FAB ) = (12)(6) = 72 ⇒ P [FAB ] = 306 72 # (FBA ) = (6)(12) = 72 ⇒ P [FBA ] = 306 30 # (FBB ) = (6)(5) = 30 ⇒ P [FBB ] = 306 # (FAA ) = (12)(11) = 132 ⇒ P [FAA ] = OK. To compute P E FXX we must again appeal to repeated trials by making the assumption that the flips of each coin are independent (parse this carefully – we are simply saying that the probability of the second coin coming up heads depends only on the type of coin drawn and NOT on how the flip of the first coin came up). Hence 1 1 P E FAA = = 1/4 2 2 1 3 P E FAB = = 3/8 2 4 3 1 P E FBA = = 3/8 4 2 3 3 P E FBB = = 9/16 4 4 5 and so P [E] = P E FAA P [FAA ] + P E FAB P [FAB ] + P E FBA P [FBA ] + P E FBB P [FBB ] 1 132 3 72 3 72 9 30 = + + + 4 306 8 306 8 306 16 306 = 1 306 (33 + 27 + 27 + 135/8) = 6 831 2448 = .3394