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
Chapter 7: Section 7-5 Applications of Counting Principles D. S. Malik Creighton University, Omaha, NE D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 1 / 19 Example An experiment consists of forming license plates consisting of three letters followed by three digits, with repetition allowed. Let S be the sample space of the experiment. Then n (S ) = 26 26 26 10 10 10 = 17, 576, 000. Let E be the event that a license plate begins with the letter A. Let us determine the probability of E . To accomplish this …rst we …nd the number of elements in E . Now the number of license plates that begin with the letter A are 1 26 26 10 10 10 = 676, 000. Thus, n (E ) = 676, 000. Hence, Pr[E ] = 1 26 26 10 10 10 1 n (E ) = = . n (S ) 26 26 26 10 10 10 26 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 2 / 19 Example A bag contains 5 red, 6 blue, and 4 brown marbles. An experiment consists of drawing three marbles at random. The total number of marbles is 5 + 6 + 4 = 15. So the number of ways to select 3 marbles from 15 marbles is C (15, 3) = 15! 15! = = 455. 3! (15 3)! 3! 12! Hence, n (S ) = 455. We …nd the probability that 2 are red and 1 is blue. There are 5 red marbles. The number of ways to select 2 red marbles is C (5, 2). Similarly, the number of ways to select 1 blue marble is C (6, 1). Thus, number of ways to select 2 red and 1 blue marbles is: C (5, 2) C (6, 1) = 10 6 = 60. So the probability of drawing 3 marbles so that 2 are red and 1 is blue is C (5, 2) C (6, 1) 60 12 = = . C (15, 3) 455 91 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 3 / 19 Example Two cards are drawn from a well-shu- ed deck of 52 cards. Note that the number of elements in the sample space is C (52, 2) = 1326. We …nd the probability that exactly one of the cards is a king. There 4 kings and 48 cards are not kings. So we must select 1 card from 4 kings and 1 card from the remaining 48 non-king cards. Thus, the number of ways to select two cards so that one is a king is C (4, 1) C (48, 1) = 4 48 = 192. Hence, the probability that exactly one of the cards is a king is 192 32 C (4, 1) C (48, 1) = = . C (52, 2) 1326 221 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 4 / 19 Probabilities and Tree Diagrams Two cards are drawn at random from a deck of 52 cards. What is the probability that exactly one of the cards is a king? Drawing two cards from a deck of 52 cards can be thought of as drawing two cards in sequence without replacement. So this can be considered a two step experiment. This means that we can draw a tree diagram of this experiment as shown in the following diagram: Step 2 Step 1 Outcome K K K = KK K’ K K’ = KK’ K K’ K = K’K K’ K’ K K’ K’ = K’K’ D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 5 / 19 Note that, in the previous …gure, at the end of each branch we write the outcome of the branch. After step 2, we draw straight lines and at the end of each straight line, we write the outcome of the path. For example, in the top row, the path of the two branches leads to the outcome K \ K , which we sometimes write as KK . That is, the …rst outcome is a king and the second outcome is also a king. At the end of the second straight line (the second row), the outcome is K 0 \ K = K 0 K , i.e., the …rst card is not a king and the second card is a king. Similar conventions apply for the remaining branches. D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 6 / 19 Next in the tree diagram, on each branch we write the probability of that outcome, see the following …gure: Step 2 Step 1 4/52 48/52 Outcome 3/51 K K K = KK 48/51 K’ K K’ = KK’ 4/51 K K’ K = K’K 47/51 K’ K’ K K’ K’ = K’K’ D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 7 / 19 Note that the probability of the second king, if the …rst is also a king, 3 is 51 because after drawing the …rst king, 3 kings are left and a total of 51 cards are left. Finally, to complete the tree diagram, on each straight line, we write the multiplication of all of the probabilities of the branches leading to that straight line. For example, in the very top row, the probabilities of the branches are 3 4 52 and 51 . So on the top straight line, we write 4 3 1 = . 52 51 221 This is the probability that the …rst card is a king and the second card is also a king, i.e., both of the cards are kings. That is, Pr[Both kings] = Pr[KK ] = 1 . 221 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 8 / 19 After writing all of the probabilities on the straight line, we obtain the following tree diagram: Outcome Step 2 Step 1 3/51 4/52 K (4/52)(3/51) = 1/221 K K = KK K K’ = KK’ K 48/52 48/51 K’ (4/52)(48/51) = 16/221 4/51 K 47/51 K’ (48/52)(4/51) = 16/221 K’ K = K’K K’ (48/52)(47/51) = 188/221 K’ D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles K’ = K’K’ 9 / 19 Exercise: At a local university, 80% of the …rst year students live on campus. Of those who live on campus, 75% eat at the student center cafeteria. Of those who do not live on campus, 60% eat at the student center cafeteria. Find the following probabilities of a randomly selected …rst year student at the university. (a) The …rst year student lives on campus and does not eat at the cafeteria. (b) The …rst year student eats at the cafeteria. Solution: Let L be the set of …rst year students who live on cam D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 10 / 19 Solution: Let L be the set of …rst year students who live on campus and E be the set of students who eat at the cafeteria. The tree diagram of this problem is: Outcome Step 2 0.80 0.20 Step 1 0.75 L 0.25 E’ 0.60 E 0.40 E’ E L’ (0.80)(0.75) = 0.60 L E = LE L E ’= LE’ (0.20)(0.60) = 0.12 L’ E = L’E (0.20)(0.40) = 0.08 L’ E’ = L’E’ (0.80)(0.25) = 0.20 (a) The probability that a randomly selected …rst year student lives on campus and does not eat at the cafeteria is Pr[L \ E 0 ] = (0.80)(0.25) = 0.20. D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 11 / 19 (b) The probability that a randomly selected …rst year student eats at the cafeteria is Pr[E ]. From the …gure, Pr[E ] = Pr[fLE , L0 E g] = Pr[LE ] + Pr[L0 E ] = 0.60 + 0.12 = 0.72. Note that Pr[E ] is the probability of students who live on campus and eat at the cafeteria or students who do not live on campus but eat at the cafeteria. D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 12 / 19 Exercise: Find the probability of randomly drawing 5 cards from a well-shu- ed deck of 52 cards so that 3 are diamonds and 2 are hearts. Solution: The number of ways to select 5 cards such that 3 are diamonds and 2 are hearts is C (13, 3) C (13, 2). Also, the number of ways to select 5 cards is C (52, 5). Hence, the probability of randomly drawing 5 cards such that 3 are diamonds and 2 are hearts is C (13, 3) C (13, 2) 286 78 1859 = = . C (52, 5) 2598960 216, 580 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 13 / 19 Exercise: Find the probability of randomly selecting 4 marbles from a bag of 5 red and 3 blue marbles such that all are blue. Solution: Note that we are selecting 4 marbles and the bag has only 3 blue marbles. Thus, the number of ways to select 4 marbles so that all are blue is 0. Hence, the probability of randomly selecting 4 marbles from a bag of 5 red and 3 blue marbles such that all are blue is 0. D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 14 / 19 Exercise: Consider an experiment in which 2 marbles are drawn at random from an urn containing 8 red, 6 blue, 4 green, and 2 white marbles. Determine the probability that both marbles are red. Solution: The total number of marbles is 8 + 6 + 4 + 2 = 20. The number of ways to select 2 marbles from 20 marbles is C (20, 2) = 190. The number of ways to select 2 marbles such that both are red is C (8, 2) = 28. Hence, the probability of selecting two marbles such that both are red is 14 28 = . 190 95 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 15 / 19 Exercise: Two fair dice are rolled. Find the probability such that the sum of the numbers rolled is 9. Solution: Note that the number of elements in the sample space is 36. Let E be the event that the sum of the numbers rolled is 9. Then E = f(3, 6), (4, 5), (5, 4), (6, 3)g. So n (E ) = 4. Hence, the probability that the sum of the numbers rolled is 9 is 1 4 = . 36 9 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 16 / 19 Exercise: If four distinct coins are tossed, …nd the probability of getting exactly three heads. Solution: Because the coin is tossed 4 times, the total number of outcomes is 24 = 16. The outcomes that contains exactly 3 heads is HHHT , HTHH, HHTH, and THHH. Hence, the probability is 1 4 = . 16 4 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 17 / 19 Exercise: Samantha’s piggy bank contains at most $100.00. What is the probability that the piggy bank contains an exact dollar amount, such as $15.00 and $68.00? Solution: Let S be the sample space. Then S can contain any number between 0.00 and 100.00. Hence n (S ) = 10001. (Note that an amount such as 25.68 is an element of S.) Let E be the event that piggy bank contains an exact dollar amount. Then n (E ) = 101. Hence, the probability that the piggy bank contains an exact dollar amount is 101 . 10001 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 18 / 19 Exercise: A bag contains 5 dimes, and 3 nickel. Find the probability of selecting 3 coins so that the total value of the coins is 25 cents. Solution: We are selecting 3 coins and the total value of the coins is 25 cents. So we must select 2 dime from 5 dimes, and 1 nickel from 3 nickels. This can be done in C (5, 2) C (3, 1) = 10 3 = 30 ways. Also the number of ways to select 3 coins from 5 + 3 = 8 coins is C (8, 3) = 56. Hence, the probability of selecting 3 coins so that the total value of the coins is 25 cents is 15 30 = . 56 28 D. S. Malik Creighton University, Omaha, NEChapter () 7: Section 7-5 Applications of Counting Principles 19 / 19