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
Section 6.4 – Using Counting Techniques in Probability In this section, we will be working with large sample spaces, where it is not realistic to list out all of the elements of the sample space. We will therefore use counting techniques such as combinations to compute the probability of an event. Each problem in this section involves a uniform sample space, where each outcome is equally likely. We will still be using the theoretical probability formula which was covered in Section 6.2: P(E) = n(E) The number of ways event E can occur = The number of outcomes in the sample space n ( S ) We will look at several different types of problems: coin problems, card problems and general 2(or more) category problems. Coin Problems Suppose that we toss a coin three times. There are 2 ⋅ 2 ⋅ 2 = 23 = 8 outcomes. In previous sections, we have drawn a tree diagram for this situation and we have established the following sample space: S = { HHH , HHT , HTH , HTT , THH , THT , TTH , TTT } Suppose that we instead toss a coin 15 times. There are 215 = 32, 768 outcomes, and it would clearly not be reasonable to list them all. In general, if we toss a coin n times, there are 2n total outcomes in the sample space. This n(E) represents n ( S ) in the formula P ( E ) = . n(S ) Let us again look at the problem where a coin is tossed three times. Let E represent the event where exactly 2 tails are obtained. We can inspect the sample space and see that E = {HTT , THT , TTH } . Therefore, the probability of obtaining exactly 2 tails is P(E) = n(E) 3 = . n(S ) 8 Notice that the above probability could also be obtained using combinations. The order of the 3! tails does not matter, so the number of ways of obtaining tails is C ( 3, 2 ) = = 3 . We 2!( 3 − 2 ) ! could find the probability of obtaining two tails without ever writing the sample space, by performing the following computation: Math 1313 Page 1 of 14 Section 6.4 P(E) = C ( 3, 2 ) 3 = 23 8 Combinations are particularly useful when the sample space is large. A general formula for this type of coin problem is found below. Probability Involving Coin Tosses If a coin is tossed n times, and E is the event of observing r heads (or tails), then P(E) = Recall that C ( n, r ) = C ( n, r ) 2n n! . r !( n − r ) ! Example 1: If a fair coin is tossed 10 times, find the probability of each of the following events: A. The coin lands on heads exactly 8 times. B. The coin lands on tails at least 8 times. C. The coin lands on tails at most 3 times. Solution: Since the coin is tossed 10 times, n ( S ) = 210 = 1024 for all of the events listed. A. Define E as the event that the coin lands on heads exactly 8 times. This can occur in C (10, 2 ) = 10! 10! 10 ⋅ 9 ⋅ 8! = = = 45 ways. 8!(10 − 8 ) ! 8! 2! 8! ⋅ 2 ⋅1 Therefore, P ( E ) = C (10, 8 ) 45 = = 0.0439 . 10 2 1024 Note: The event “the coin lands on heads exactly 8 times” is equivalent to saying that “the coin lands on tails exactly 2 times”. If F represents the event where exactly 2 tails are obtained, the computation yields the same result. C (10, 2 ) = 10! 10! 10 ⋅ 9 ⋅ 8! = = = 45 2!(10 − 2 ) ! 2!8! 2 ⋅1 ⋅ 8! Therefore, P ( F ) = Math 1313 n (10, 2 ) 45 = = 0.0439 . 10 2 1024 Page 2 of 14 Section 6.4 B. Define G as the event that the coin lands on tails at least 8 times. This means that the coin can land on tails 8 times, 9 times or 10 times. Let us define those events as T8 , T9 , and T10 , respectively. We compute the probability of each of these events and then add them together, as shown below. P (T8 ) = C (10, 8 ) 45 = 10 2 1024 P (T9 ) = C (10, 9 ) 10 = 10 2 1024 P (T10 ) = C (10, 10 ) 1 = 10 2 1024 Therefore, P ( G ) = P ( H 8 or H 9 or H10 ) = C. 45 10 1 56 + + = ≈ 0.0547 . 1024 1024 1024 1024 Define J as the event that the coin lands on tails at most 3 times. This means that the coin lands on tails 0 times, 1 time, 2 times, or 3 times. Let us define those events as T0 , T1 , T2 and T3 , respectively. We compute the probability of each of these events and then add them together, as shown below. P (T0 ) = P (T1 ) = P (T2 ) = P (T3 ) = C (10, 0 ) 10 2 C (10, 1) 10 2 C (10, 2 ) 10 2 C (10, 3) 10 2 = = 1 1024 10 1024 = 45 1024 = 120 1024 Therefore P ( J ) = P ( T0 or T1 or T2 or T3 ) = 1 10 45 120 176 + + + = ≈ 0.1719 . 1024 1024 1024 1024 1024 *** Math 1313 Page 3 of 14 Section 6.4 Card Problems When choosing a card from a deck of playing cards, each card is equally likely to be drawn. n(E) When computing probability with card problems, we use the formula P ( E ) = . n(S ) We will typically choose a given number, r, of cards from the deck of 52 cards. In this case, n ( S ) = C ( 52, r ) . The method of finding n ( E ) varies, depending on what we are asked to find. Example 2: Three cards are selected in succession and without replacement from a well-shuffled deck of 52 playing cards. Find the probability of each event: A. The event that 2 of the cards are red cards and 1 is not. B. The event that all 3 of the cards are face cards. C. The event that 2 of the cards are spades and 1 is a diamond. Solution: Since we are selecting 3 cards from a deck of 52 cards, and the order is not important, the number of elements in the sample space for all parts of this example is n ( S ) = C ( 52, 3) = 22,100 . In each of these events, we will use a table to analyze the information needed for the problem. A. In the event, “2 of the cards are red cards and 1 is not”, we are only concerned with the color of the cards. A standard deck of playing cards contains only two colors: red and black. We therefore define event E as the event of drawing 2 red cards and 1 black card. We draw a table to organize the information, as shown below. The first step is to determine how many cards of each color are contained in the entire deck. We draw one row representing the red cards, one row representing the black cards, and one row representing the total number of cards. There are 26 cards of each color, for a total of 52 cards. Red 26 Black 26 Total 52 Next, we add a column on the right side of the table to show how many cards of each color are actually being chosen for this event. We are finding the probability of choosing 2 red cards and 1 black card, for a total of 3 cards. Math 1313 Page 4 of 14 Section 6.4 Choose Red 26 2 Black 26 1 Total 52 3 We can now use combinations to find the number of ways our event can occur. The “Red” row in the table indicates that from the 26 red cards in the deck, we need to choose 2. Since the order is not important, there are C ( 26, 2 ) = 325 ways for this to occur. The “Black” row in the table indicates that from the 26 black cards in the deck, we need to choose 1. Since the order is not important, there are C ( 26, 1) = 26 ways for this to occur. As we have already mentioned, we are drawing 3 cards from a total of 52 cards in the deck, so the total number of events in our sample space is n ( S ) = C ( 52, 3) = 22,100 . Notice the word and in our desired event: The event is that “2 of the cards are red cards and 1 is not.” In counting techniques and in probability, the word “and” means that we should multiply. Therefore, P(E) = = = = n(E) n(S ) n ( 2 red cards and 1 black card ) n ( choose 3 of 52 cards ) C ( 26, 2 ) ⋅ C ( 26, 1) C ( 52, 3) 325 ⋅ 26 8450 = ≈ 0.3824 22,100 22,100 Notice how we used the table in our computation of P ( E ) = Math 1313 Page 5 of 14 n(E) n(S ) : Section 6.4 Choose B. Red 26 2 ← C ( 26, 2 ) was used in the numerator as part of n ( E ) . Black 26 1 ← C ( 26, 1) was used in the numerator as part of n ( E ) . Total 52 3 ← C ( 52, 3) = n ( S ) , the denominator in the formula. Define F as the event that all 3 cards are face cards. When a card is looked at for this problem, we only want to know if it is a face card (a Jack, Queen, or King) or if it is not a face card. We therefore label our two table rows as “Face” for the face cards, and “Not a Face Card” for everything else, and then add a row for the totals. There are 12 face cards (a Jack, Queen, and King in each of the 4 suits: Hearts, Spades, Diamonds and Clubs). Since there are 52 cards in the deck, this means that there are 52 − 12 = 40 cards which are not face cards. Face Card 12 Not a Face Card 40 Total 52 Next, we add a column to the table to indicate how many cards will be chosen from each category. Since the event is that “all 3 cards are face cards”, we want 3 face cards and 0 that are not face cards. Choose Face Card 12 3 Not a Face Card 40 0 Total 52 3 We can now compute the indicated probability: Math 1313 Page 6 of 14 Section 6.4 P(F ) = = = = n(F ) n(S ) n ( 3 face cards and 0 non-face cards ) n ( choose 3 of 52 cards ) C (12, 3) ⋅ C ( 40, 0 ) C ( 52, 3) 220 ⋅1 ≈ 0.0100 22,100 Notice that C ( 40, 0 ) = 1 , which does not have an effect on the product above. (For any nonzero integer n, C ( n, 0 ) = 1 .) Since all of the chosen cards are face cards, we could have left the “0 non-face cards” part out of the computation altogether. C. Define G as the event that 2 cards are spades and 1 card is a diamond. In this case, we need the following rows in our table: one row for spades, one row for diamonds, one row for everything else (hearts and clubs), and one row for the totals. There are 13 spades in a card deck, of which we are choosing 2. There are 13 diamonds in the card deck, of which we are choosing 1. There are 26 other cards in the deck (13 hearts and 13 clubs), of which we are choosing 0. Choose Spades 13 2 Diamonds 13 1 Other 26 0 Total 52 3 We can now compute the indicated probability: Math 1313 Page 7 of 14 Section 6.4 P (G ) = = = = = n (G ) n(S ) n ( 2 spades and 1 diamond ) n ( choose 3 of 52 cards ) n ( 2 spades and 1 diamond and 0 cards of other suits ) n ( choose 3 of 52 cards ) C (13, 2 ) ⋅ C (13, 1) ⋅ C ( 26, 0 ) *See note below. C ( 52, 3) 78 ⋅13 ⋅1 1014 = ≈ 0.0459 22,100 22,100 *Note that C ( 26, 0 ) = 1 and can be omitted from the computation. However, it can be useful to include it in the detailed work, to show that all 52 cards have been considered and accounted for. *** The rest of the examples in this section require strategies similar to those described in the coin problems and/or the card problems. General Problems Involving Two or More Categories Example 3: An experiment consists of choosing 5 marbles from an urn that contains 10 white marbles and 12 black marbles. Find the probability of each event: A. The event that exactly 2 of the marbles are white. B. The event that at least 3 of the marbles are black. C. The event that more black marbles are chosen than white marbles. Solution: We can organize the information in a table for each part of the problem. Every table will have the following general format: Choose White 10 Black 12 Total 22 5 In every subpart of this problem, we are selecting 5 of the 22 marbles, so n ( S ) = C ( 22, 5 ) . Math 1313 Page 8 of 14 Section 6.4 A. Define E as the event that exactly 2 of the marbles are white. If 2 of the 5 marbles chosen are white, then the other 3 must be black. This is shown in the chart below. Choose White 10 2 Black 12 3 Total 22 5 We can now compute the indicated probability: P(E) = n ( 2 white and 3 black ) n ( choose 5 of 22 marbles ) C (10, 2 ) ⋅ C (12, 3) 9900 = = ≈ 0.3759 C ( 22, 5 ) 26, 334 B. . Define F as the event that at least 3 of the marbles are black. This means that 3 or 4 or 5 of the marbles are black. Let B3 , B4 , and B5 represent the events where 3, 4, and 5 black marbles are chosen, respectively. The table below shows the number of white marbles and black marbles for each of these situations. B3 : Choose B4 : Choose B5 : Choose White 10 2 1 0 Black 12 3 4 5 Total 22 5 5 5 We want to find P ( B3 or B4 or B5 ) . In counting and in probability, the word or means that we should add, and there are no overlapping events to subtract since the three events are mutually exclusive. We will compute the probability of each of these events separately and then add them together to find P ( F ) . P ( B3 ) = Math 1313 n ( 2 white and 3 black ) n ( choose 5 of 22 marbles ) = C (10, 2 ) ⋅ C (12, 3) C ( 22, 5 ) Page 9 of 14 = 9900 26, 334 Section 6.4 P ( B4 ) = P ( B5 ) = n (1 white and 4 black ) n ( choose 5 of 22 marbles ) n ( 0 white and 5 black ) n ( choose 5 of 22 marbles ) = = C (10, 1) ⋅ C (12, 4 ) C ( 22, 5 ) C (10, 0 ) ⋅ C (12, 5 ) C ( 22, 5 ) = 4950 26,334 = 792 26, 334 We can now find P ( F ) : P ( F ) = P ( B3 or B4 or B5 ) = P ( B3 ) + P ( B4 ) + P ( B5 ) = C. . 9900 4950 792 15, 642 + + = ≈ 0.5940 26,334 26,334 26, 334 26,334 Define G as the event that more black marbles are chosen than white marbles. This can happen in several ways. The table of values below shows all possible ways that 5 marbles can be selected: White Black 5 0 4 1 3 2 2 3 1 4 0 5 Event G includes the last 3 possibilities shown in the table, that is, where there are 3, 4 or 5 black marbles. This is exactly what we computed in part B, so 15, 642 P (G ) = ≈ 0.5940 . 26,334 *** Sometimes, computation is simplified if we use the complement of an event. Recall the formula P ( E ) + P ( E c ) = 1 . We can find P ( E c ) , the probability of the complement, and then subtract that value from 1 to find P ( E ) . Math 1313 Page 10 of 14 Section 6.4 Example 4: Six nominees for an award will be selected from a group of 8 men and 7 women. Assuming that each person is equally likely to be nominated, find the probability that at least one woman will be selected. Solution: If at least one woman is selected, this means that one or more women are selected. We could work this problem directly by finding the probability that 1 woman is selected, the probability that 2 women are selected, the probability that 3 women are selected, and so on until we compute the probability that all 6 women are selected. We would then have to add all six of those values together. This method is time-consuming, and we can fortunately work this problem using a more efficient method. Define E as the event that at least one woman is selected. Then E c is the event that no women are selected. We use the fact that P ( E ) + P ( E c ) = 1 , which means that P ( E ) = 1 − P ( E c ) . To find P ( E ) , we want to first find P ( E c ) , the probability that no women are selected, and then subtract that value from 1. A table is shown below, to represent the situation where no women are selected. Remember that there are 8 men and 7 women, and that six nominees will be selected for the award. Choose P(E c n(E c ) ) = n(S ) = Men 8 6 Women 7 0 Total 15 6 n ( choose 6 men and 0 women ) n ( choose 6 of 15 people ) = C ( 8, 6 ) ⋅ C ( 7, 0 ) C (15, 6 ) = 28 ⋅1 28 = ≈ 0.0056 . 5005 5005 We can now find the indicated probability, P ( E ) : P ( E ) = 1− P ( E c ) = 1− 28 ≈ 1 − 0.0056 ≈ 0.9944 . 5005 The probability that at least one woman will be nominated, to the nearest ten-thousandth, is 0.9944. *** Math 1313 Page 11 of 14 Section 6.4 Example 5: Shakira buys a bag of 50 gumballs, 4 of which are pink. If Shakira takes 5 gumballs from the bag, find the probability that at most 3 of the gumballs are pink. Solution: If at most 3 of the gumballs are pink, this means that either 0, 1, 2, or 3 of the items are pink. We could compute the probabilities of each of these events and add them together, but we can instead use the complement of our event to streamline computation. Define event E as the event that at most 3 of the 5 gumballs are pink. Then E c is the event that either 4 or 5 of the gumballs are pink. Note, however, that P ( 5 pink gumballs ) = 0 , since there are only 4 pink gumballs in the bag. Therefore, P ( E c ) = P ( 4 pink gumballs ) + P ( 5 pink gumballs ) = P ( 4 pink gumballs ) + 0 . = P ( 4 pink gumballs ) A chart is shown below to help compute the probability of taking 4 pink gumballs from the bag. Choose P ( E c ) = P ( 4 pink gumballs ) = Pink 4 4 Not Pink 46 1 Total 50 5 C ( 4, 4 ) ⋅ C ( 46, 1) Therefore, P ( E ) = 1 − P ( E c ) = 1 − C ( 50, 5 ) = 1 ⋅ 46 46 = ≈ 0.0000217 2,118, 760 2,118, 760 46 ≈ 1 − 0.0000217 ≈ 0.9999783 . 2,118, 760 *** Example 6: Suppose that a fair coin is tossed 10 times and “heads” or “tails” is noted, based on the surface that lands facing up. Find the probability that the coin lands on heads at least twice. Solution: Since the coin is tossed 10 times, n ( S ) = 210 = 1024 . Define E as the event the coin lands on heads at least twice. Then the coin can land on heads 2 times, 3 times, 4 times, 5 times, 6 times, 7 times, 8 times, 9 times or 10 times. We can work this Math 1313 Page 12 of 14 Section 6.4 problem directly by finding the probability of each of these outcomes and then adding them together. Or we can use the complement of event E to streamline the computation. The event F = E c is the event the coin lands on heads 0 times or 1 time. We will find the probability of each of these, add them together and then subtract the sum from 1 to find the final answer. Let H 0 represent the event where 0 heads are obtained, and let H1 represent the event where 1 head is obtained. P ( H0 ) = C (10, 0 ) 10 2 = 1 1024 P ( E c ) = P ( H 0 ) + P ( H1 ) = P ( E ) = 1− P ( E c ) = 1− P ( H1 ) = C (10, 1) 10 2 = 10 1024 1 10 11 + = 1024 1024 1024 11 ≈ 0.9893 1024 *** Example 7: An experiment consists of choosing 5 marbles from an urn that contains 10 white marbles and 12 black marbles. Find the probability that at most 4 of the marbles are white. Solution: Define event E as the event that at most 4 of the marbles are white; this means that there can be 0, 1, 2, 3, or 4 white marbles. We can streamline the computation by using E c , the event that all 5 marbles are white. The information for E c is organized in the table below. Choose Then P ( E c ) = White 10 5 Black 12 0 Total 22 5 n ( 5 white and 0 black ) C (10, 5 ) ⋅ C (12, 0 ) n ( choose 5 of 22 marbles ) C ( 22, 5 ) = 252 ⋅1 252 = ≈ 0.0096 . 26, 334 26,334 Now we can find P ( E ) : Math 1313 Page 13 of 14 Section 6.4 P ( E ) = 1− P ( E c ) = 1− 252 ≈ 0.9904 26,334 *** Example 8: A company will only ship a batch of products if quality control testing shows no defective products in that batch. The quality control department randomly tests 3 items in each batch of 40 items. If a particular batch contains exactly 5 defective items (unknown to the quality control workers), what is the probability that the company will ship the items? Solution: Define E as the event that none of the tested items are defective. This means that all 3 tested items are not defective. The information for this event is organized in the table below. Choose P(E) = Defective 5 0 Good (Not Defective) 35 3 Total 40 3 n ( 0 defective and 3 good ) n ( select 3 of 40 items ) = C ( 5, 0 ) ⋅ C ( 35, 3) C ( 40, 3) = 1 ⋅ 6545 6545 = ≈ 0.6624 9880 9880 The probability that the batch gets shipped is 0.6624. *** Math 1313 Page 14 of 14 Section 6.4