* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Stat330 - Solution to Homework 2 1 Kolmogorov
Survey
Document related concepts
Transcript
Stat330 - Solution to Homework 2 1 Kolmogorov (a) For any two evens A, B ⊂ Ω, P (A ∩ B̄) = P (A) − P (A ∩ B). Because A = (A ∩ B̄) ∪ (A ∩ B), and (A ∩ B̄) ∩ (A ∩ B) = ∅, axiom iii implies that P (A) = P (A ∩ B̄) + P (A ∩ B). The statement follows from subtraction. (b) For two events A, B ⊂ Ω with B ⊂ A, P (A ∩ B̄) = P (A) − P (B). Because A ⊂ B, A ∩ B = B. The statement now follows from part (a). (c) For any two events A, B ⊂ Ω, P (A ∪ B) = P (A) + P (B) − P (A ∩ B). Since A ∪ B = A ∪ (B ∩ Ā), and A ∩ (B ∩ Ā) = ∅, axiom iii implies P (A ∪ B) = P (A) + P (B ∩ Ā). (1) By part (a), P (B ∩ Ā) = P (B) − P (B ∩ A). The result follows from substituting P (B) − P (B ∩ A) into (??). An alternative proof of (c) is below. ⇐⇒ P (A ∪ B) = P (A) + P (B) − P (A ∩ B) Kolmogorov (iii): A ∪ B = A ∪ (B ∩ Ā) P (A) + P (Ā ∩ B) = P (A) + P (B) − P (A ∩ B) Kolmogorov (iii): B = (A ∩ B) ∪ (B ∩ Ā) ⇐⇒ P (Ā ∩ B) ⇐⇒ 0 = P (A ∩ B) + P (Ā ∩ B) − P (A ∩ B) = 0(true) 1 2 Broken Components Four components are inspected and three events are defined as follows: A : “all four components are found to be defective” B : “exactly two components are found defective” C : “at most three components are found defective” Interpret the following events. Start by defining a suitable sample space Ω:: a) B ∪ C. b) B ∩ C. c) A ∪ C. d) A ∩ C. A suitable choice for the sample space, is to count the number of defective components. Then Ω = {0, 1, 2, 3, 4} and the events A, B, C can be rewritten as A = {4}, B = {2} and C = {0, 1, 2, 3} With that a) B ∪ C = {2} ∪ {0, 1, 2, 3} = C = “at most three components are found defective”. b) B ∩ C = {2} = B = “exactly two components are found defective”. c) A ∪ C = {0, 1, 2, 3, 4} = “any number of components is found to be defective” = Ω. d) A ∩ C = ∅. 3 Events and Notation Suppose that A, B, and C are three events in an experiment. Express each of the following events in set notation and find its probability. (a) At least one of the three events occurs. At least one event occurs = A ∪ B ∪ C (b) None of the three events occurs. None of the three events occur = Ā ∩ B̄ ∩ C̄ = A∪B∪C (c) Exactly one of the three events occurs. Exactly one of the three events occurs = (A ∩ B̄ ∩ C̄) ∪ (Ā ∩ B ∩ C̄) ∪ (Ā ∩ B̄ ∩ C) = (A ∩ B ∩ C̄) ∪ (A ∩ B ∩ C) ∪ (Ā ∩ B ∩ C) (d) Exactly two of the three events occurs. Exactly two of the three events occurs Note that the event in (d) is the complement of the union of the events in (a), (b), and (c). 2 4 Counting For all of the following problems find the sample space first. Determine the size of the sample space, then deal with the specified event. (a) A lottery has 53 numbers from which seven are selected without replacement. You play the lottery by selecting seven numbers from the same 53 numbers without replacement. What is the probability that your seven numbers are the same as the lottery’s? The sample space Ω is the set consisting of all sets of seven numbers drawn without replacement, i.e. |Ω| = 53 7 All elements in this sample space have the same probability. We only have one chance to pick all seven numbers correctly, which results in a probability of winning the lottery of 53 1/ ≈ 6.5 · 10−9 . 7 (b) Find the probability of being dealt three kings in a five-card hand in a 52-card standard deck (no jokers) when the cards are drawn without replacement? What if the cards are drawn with replacement (and re-shuffling between each draw)? First, suppose the cards are drawn, as usual, without replacement. The sample space Ω is the set consisting of all sets of five card hands drawn without replacement, i.e. |Ω| = 53 All elements 5 in this sample space have the same probability. All hands we are interested in consist of 3 kings (out of 4 possible king cards) and 2 other cards (out of 48 non-king cards). We can think of the process of drawing such a hand as a series of two actions: draw kings first, then draw other cards. This means, that we can apply the multiplication principle to these sub-actions. We have 43 ways of choosing three kings out of four and 48 ways of choosing two additional 2 non-king cards. This gives overall 43 · 48 possibilities and leads to a probability of 2 4 3 · 48 2 53 ≈ 0.001736. 5 Now, suppose the selected card is replaced after each draw. The sample space Ω is now the set of all ordered 5-tuples of cards, where the same card may appear in a 5-tuple twice. Using the multiplication principle, |Ω| = 525 . The number of ways to select three kings can be divided into the three sub-actions. The first sub-action is choosing which three of the five draws are the kings (i.e., the first, second and third draws, the first, third, and fifth draws, the second, fourth and fifth draws, etc.). There are 53 ways to do this first sub-action. The second sub-action is picking the three kings. There are 43 ways to pick three kings with replacement from a standard deck, so there are 43 ways to complete the second sub-action. The third sub-action is picking the other two cards. There are 48 cards in the deck that are not kings, so there are 482 ways to pick the other two cards. Applying the multiplication principle to the three sub-actions gives 53 43 482 ways to draw the three kings. Since all outcomes in Ω are equally likely, the probability of choosing three kings when sampling is with replacement is 5 3 2 3 4 48 = .0038 525 3 (c) How many different passwords of length 6 can be generated from the set of letters ’a’-’z’, ’A’-’Z’ and digits ’0’, ’1’-’9’ using at least two digits each? Symbols can be used more than once. Here, we can start with the number of different letter/digit combinations that are at all possible using 10 digits and 52 letters - that is an ordered sample of size six drawn with replacement, i.e. we have 626 many. Not all of these combinations are valid passwords, though. If we subtract the invalid combinations, we will end up with the number of valid passwords: Non-valid combinations are the ones using only letters, there we have 526 many. The other source of invalid combinations are the ones that only use one digit. We have 6 · 525 · 10 possibilities for that (explanation: assume at first that the digit is at the last place, i.e. we get passwords of the form e.g. ’heike3’ for that we have 525 · 10 choices. Since the digit can be at any one of the positions, we multiply that expression by 6. Overall the number of valid passwords is 626 − 526 − 6 · 525 · 10 = 14, 217, 384, 000 (d) How many ways are there to re-arrange the letters M I S S I S S I P P I to different ”words” of length 11? Why is it not just 11! ? Even though MISSISSIPPI has length 11, we do not have 11! ways of re-ordering letters for different “words” because of all the duplicate letters, i.e. we can’t distinguish between ‘MISSISSIPPI’ and ‘MISSISSIPPI’, if we exchange the first and the second S. We therefore need to think of a different strategy - there are different approaches, but I’ll try to explain just the one that I find easiest: think of the word as 11 positions. We have 1 M, 4 Is, 4 Ss and 2 Ps to distribute. We can think of doing sequentially, i.e. we are dealing with four sub-actions, which means we are going to multiply the number of possibilities. • The first action is to choose a spot for the M - there are 11 possibilities for that. • Now we want to distribute 4 Is. Since one spot is taken, there are only 10 left, from which we can pick 4. Order does not matter, since we cannot distinguish between the Is, therefore there are 10 4 choices to pick 4 spots among 10. • We can deal with the Ss in the same way - 5 spots are gone, i.e. we are left with 6 spots, from which we pick another 4, which leaves us with 64 possibilities to do so. • Finally the Ps - since we have only two spots left, there is real choice anymore, i.e. 1 way is left. Overall, we have 10! 6! 2! 11! 10 6 11 10 6 2 11! · · · = = 34650 11 · · ·1 = · · · = 1 · 10! 4! · 6! 4! · 2! 2! · 0! 4!4!2! 4 4 1 4 4 2 Please note that these are Dr. Hofmann’s solutions. I (Emily) think that her explanation is great and agree with her that this is the easiest way to approach this problem. 5 Deriving Probabiltities (a) Restaurant A certain restaurant has two cooks—the chief cook and his assistant. On any given day, the probability that the chief cook will show up for work is 0.97, the probability that the assistant cook will show up for work is 0.96, and the probability that at least one of the two cooks will show up for work is 0.98. Find the probabilities that on any given day the restaurant will have 4 a) both cooks, b) neither of the two cooks, c) only the chief cook, d) only the assistant cook, e) only one of the two cooks. The easiest way to solve a problem like this is to draw a Venn diagram first and try to figure out, which parts of it we already know and which parts are asked for in the questions: Let’s use C to describe the event that the chief cook is in and A that his assistant is in. We already know, that P (C) = 0.97 and P (A) = 0.96. The event ”at least one of them is in” is the same as ”the chief is in or the assistant is in (or both)”, which translates to the event A ∪ C. Therefore, P (A ∪ C) = 0.98. From a) to e) the above events can be drawn in Venn diagrams: b) a) C C C A A C A C A d) C c) A A e) C C A C A A The probability for a) is (remember the addition rule!) P (A ∩ C) = P (A) + P (C) − P (A ∪ C) = 0.97 + 0.96 − 0.98 = 0.95. b) P (Ā ∩ C̄) = 1 − 0.98 = 0.02 c) P (Ā ∩ C) = P (C) − P (A ∩ C) = 0.02 d) P (A ∩ C̄) = P (A) − P (A ∩ C) = 0.01 e) P (A ∩ C̄) + P (Ā ∩ C) = 0.03 (b) Best-By There are five containers of milk on a shelf; unknown to you, two of them have passed their use-by date. You grab two at random. What’s the probability that neither have passed their use-by date? Suppose someone else has got in just ahead of you, taking one container, after examining the dates. What’s the probability that the two you take after that are ahead of their use-by dates? There are five containers of milk on the shelf - you pick 2. The numbers of possibilities to do this is given as 52 = 10. All of those possibilities are equally likely. Now, we want to know the number of possibilities to pick two containers from the good ones. There are in total three containers with 5 fresh milk - so, in the same way as before, there are 32 = 3 possibilities to pick two of the good containers. In total that gives us a probability of 3/10 = 0.3 to pick two good containers. Now, someone else has taken a container of milk and presumably, he/she will have taken one of the fresh containers. So, there are 4 containers left - we have 42 = 6 possibilities to take two of them. There’s only 1 possibility left to take the two fresh containers, which gives a probability of 1/6. 6