Slide set 4 Stat 330 (Spring 2015) Last update: January 13, 2015 Stat 330 (Spring 2015): slide set 4 Ordered Samples Without Replacement Experiment: A box has n items numbered 1, . . . , n. Select k(≤ n) items without replacement. (An item is drawn at most once). Keep track of the sequence of selections. Sample Space: Ω = {(x1, . . . , xk ) : xi ∈ {1, . . . , n}, xi 6= xj } What is |Ω|? Break the complex action into a series k single draws. (i.e.,xi is outcome on draw i). n possibilities for x1, n − 1 possibilities for x2, . . ., n − (k − 1) possibilities for xk . Multiplication principle implies |Ω| = n(n − 1)(n − 2) · · · (n − (k − 1)) = n! (n−k)! 1 Stat 330 (Spring 2015): slide set 4 Permutations |Ω| in the previous example has a name . . . Permutation - An ordering of k distinct objects chosen from n distinct objects. Permutation Number: P (n, k) - The number of permutations of k objects taken from n. Theorem: P (n, k) = n! (n − k)! Example 1: You only remember that a friend’s (4 digit) telephone number consists of the numbers 3, 4, 8 and 9. How many different phone numbers are possible? That’s the situation, where we take 4 objects out of a set of 4 and order them - that is P (4, 4)!. P (4, 4) = 4! (4−4)! = 4! 0! = 24 1 = 24. 2 Stat 330 (Spring 2015): slide set 4 Permutations: Examples Example 2: Pizza Toppings A survey question lists seven pizza toppings and asks you to rank your favorite 3. 1. How many possible answers to the survey question are there? 2. One of the choices is “olives”. If all possible rankings are equally likely, what is the probability that a randomly selected survey has “olives” in the top 3? 3 Stat 330 (Spring 2015): slide set 4 Unordered Samples Without Replacement Experiment: A box has n items numbered 1, . . . , n. Select k ≤ n items without replacement. (A number is drawn at most once). Keep track of the set of numbers selected. (Order does not matter). Sample Space: Ω = {{x1, . . . , xk } : xi ∈ {1, . . . , n}, xi 6= xj } What is |Ω|? |Ω| = # of ways to select k distinct objects from n objects. It is important to note that the complex action of obtaining an ordering of k distinct objects from n distinct objects can be broken down to two simple components: • Select a subset of k objects from n. • Order the k objects. 4 Stat 330 (Spring 2015): slide set 4 Continued... Hence by multiplication principle, # of ways to order k objects chosen from n = (# of ways to select k distinct objects from n objects) × (# of ways that k distinct objects can be ordered) The left hand side, # of ways to order k objects chosen from n, is P (n, k) Thus, P (n, k) = (# of ways to select k objects from n)×(# ways to order the k) = |Ω|P (k, k). Thus |Ω| = n! P (n, k) = P (k, k) (n − k)!k! 5 Stat 330 (Spring 2015): slide set 4 Combinations |Ω| in the previous example has a name . . . Combination - A subset of n distinct objects which has k distinct objects. Number of Combinations: The number of combinations of k objects chosen from n is C(n, k) Theorem: n n! C(n, k) = = (n − k)!k! k 6 Stat 330 (Spring 2015): slide set 4 Combinations: Examples Example 1: Lottery (pick-five) The lottery picks 5 numbers from {1, . . . , 49} without replacement. The order in which the numbers are picked is irrelevant. You win if you pick at least three of the same numbers that the lottery picks. • What is the probability that all 5 match? • What is the probability that you win? Example 2: Coin Toss Toss a coin 23 times. • How many ways are there to get 17 heads? • If the coin is fair, what is the probability of getting 17 heads? 7 Stat 330 (Spring 2015): slide set 4 Solution to the “Full House” problem Example: We use the multiplication rule to compute the number of ways a full house hand may be chosen. First, break down to two steps: select the first three cards, then select the next two cards. Now, break down the selection of the first three cards into the following two steps: • Select the rank • Then select the 3 cards of this rank out of 4 suits. The number of ways to do this is (using the multiplication rule) = 13 1 · 4 3 8 Stat 330 (Spring 2015): slide set 4 Solution to the “Full House” problem (continued)... Now, break down the selection of the other two cards likewise. The number of ways to do this is: (since we have already used one rank for the first 3) = 12 1 · 4 2 Therefore the number of ways to select a full house hand 12 4 13 4 (using the multiplication rule) is: = 1 3 · 1 2 Thus |“Full House”| P (“Full House”) = = |Ω| 13 1 4 3 · 52 5 12 1 4 2 ≈ .0014 9 Stat 330 (Spring 2015): slide set 4 Counting Summary Method Number of Possible Outcomes Ordered Sample With Replacement nk Ordered Sample Without Replacement P (n, k) = Unordered Sample Without Replacement C(n, k) = n! (n−k)! n k = n! (n−k)!k! 10