STATISTICAL COUNTING TECHNIQUES I. Counting Principle The counting principle states that if there are n 1 ways of performing the first experiment, n 2 ways of performing the second experiment, n 3 ways of performing the third experiment, and so on, then the total number of ways of performing the experiments in order is found by multiplying n 1 x n 2 x n 3. Note: Repetition is allowed. Example 1: How many outcomes are possible when rolling a pair of fair dice? There are 6 outcomes from each die: 1, 2, 3, 4, 5, 6. Thus, there are 6 x 6 = 36 possible outcomes. Example 2: A package to be mailed is charged according to volume (length, width, and height), and weight. There are 5 different volume prices and 8 different weight prices. How many different prices are possible? There are two distinct categories: volume and weight. Thus, by the counting principle, there are 5 x 8 = 40 possible prices. Example 3: How many different 5-letter codes (repetition is allowed) are possible? ABSAT is one such code. There are 5 positions, each one with 26 possibilities (26 letters in the alphabet). Thus, there are 26 x 26 x 26 x 26 x 26 = 11,881,376 possible codes. Example 4: Burger World sells hamburgers with or without each of the following: cheese, lettuce, tomatoes, mustard, mayonnaise, and ketchup. Also, you can have it on a white, wheat, or sourdough bun. How many different hamburgers does Burger World sell? You can have with or without cheese (2 ways), with or without lettuce (2 ways), with or without tomatoes (2 ways), with or without mustard (2 ways), with or without mayonnaise (2 ways), with or without ketchup (2 ways), and on white, wheat, or sourdough bun (3 ways). Therefore, by the counting principle, there are 2 x 2 x 2 x 2 x 2 x 2 x 3 =192 different hamburgers. 1
II. Factorial A factorial computes the number of ways to arrange n items in order with repetition not allowed. It is written as n! (read as n factorial ), and is found by multiplying n times (n-1) times (n-2) times times (1). n! = n (n-1) (n-2) (n-3) (2) (1) For example: 9! = 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 362,880 6! = 6 x 5 x 4 x 3 x 2 x 1 = 720 4! = 4 x 3 x 2 x 1 = 24 2! = 2 x 1 = 2 1! = 1 0! = 1 (by definition) Note: To solve (9-3)!, you must work inside parenthesis first and then take the factorial of the result. So, (9-3)! = 6! = 720. To solve 9! -3!, take factorial of each term, and then subtract. So, 9! -3! = 362,880 6 = 362,874. Find 7! Using the TI-83/84 Enter 7, MATH, PRB, 4:!, ENTER ANSWER: 5040 Example 5: How many ways can you arrange 3 different books on a shelf? This is done using factorial. There are 3! = 3 x 2 x 1= 6 ways. To understand this, note that any of the 3 books can be put in the first position on the shelf, then either of the remaining 2 books can be placed in the second position, then there is 1 book left to be put in the last position. Example 6: How many ways can 8 ducks sit on a fence? Using factorial, there are 8! =8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 40,320 ways. Find 8! Using the TI-83/84 Enter 8, MATH, PRB, 4:!, ENTER ANSWER: 40320 2
III. Permutations A permutation is an ordered arrangement of objects where repetition is not allowed. Use the following when order is important: Permutation Formula: n P r = for ordered arrangements of n items taken r at a time. Example 7: How many ways can a president and vice-president be selected from a group of 8 candidates? First, we determine that order of arrangement i& important. For example, the outcome (John, Bill) differs from outcome (Bill, John) since the first outcome has John as the president and Bill as the vice-president, and the second vice-versa. 8 P 2 = = = 56 Find 8 P 2 using the TI-83/84 Enter 8, MATH, PRB, 2: n P r, 2, ENTER ANSWER: 56 Example 8: How many possible 1st, 2nd, and 3rd place finishes can there be in a race of 7 runners? Order is important in a race, so use the permutation formula. 7P 3 = = 210 Find 7 P 3 using the TI-83/84 Enter 7, MATH, PRB, 2: n P r, 3, ENTER ANSWER: 210 3
IV. Combinations A combination is an unordered grouping of objects where repetition is not allowed. Use when order is not important: Combination Formula: n P r = for ordered arrangements of n items taken r at a time. Example 10: How many sundaes can be made using 2 of 5 ice cream flavors? Order of choosing the flavor is not important. For example, the outcome "vanilla, chocolate is the same as chocolate, vanilla. 5C 2 = Find 5 C 2 using the TI-83/84 Enter 5, MATH, PRB, 3: n C r, 2, ENTER ANSWER: 10 Example 11: How many three-member committees can be chosen from a group of 8 people? The order picked is not important since (Mary, John, and Ann) is the same committee as (John, Ann, and Mary). 8C 3 = Find 8 C 3 using the TI-83/84 Enter 8, MATH, PRB, 3: n C r, 3, ENTER ANSWER: 56 4
Example 12: How many 9-p1ayer baseball teams can be made from a group of 25 players? 25C 9 = Find 25 C 9 using the TI-83/84 Enter 25, MATH, PRB, 3: n C r, 9, ENTER ANSWER: 2,042,975 When choosing from different subsets of a group with order not important, use the Combination Formula for each subgroup. The following are examples involving the Counting Principle and the Combinations Formula. Example 13: How many committees of 2 men and 3 women can be chosen from a group of 6 men and 4 women? We need 2 of 6 men and 3 of 4 women: men women 6C 2 4 C 3 = 15 4 = 60 Find 6 C 2 * 4 C 3 using the TI-83/84 Enter 6, MATH, PRB, 3: n C r, 2, ENTER * Enter 4, MATH, PRB, 3: n C r, 3, ENTER ANSWER: 60 Example 14: Suppose there are 11 batteries on a shelf, 4 defective and 7 non-defective. If 3 are chosen at random; how many ways can a) any 3 be chosen, b) no defectives be chosen, c) 1 defective and 2 non-defectives? a) 11 C 3 = 165 b) We need 0 of 4 defectives and 3 of 7 non-defectives def non 4C 0 7C 3 = 1 35 = 35 c) We need 1 of 4 defectives and 2 of 7 non-defectives def non 4C 1 7C 2 = 4 21 = 84 5
V. Probability Involving the Counting Principle Sometimes, the number of total possible outcomes is found using the Counting Principle. Recall that the probability of event E is Example 15: If a balanced coin is tossed 5 times, what is the probability of obtaining a) all heads and b) at least one head? Each of the 5 coins has 2 possibilities, heads or tails, so there are 2*2*2*2*2 = 32 possible outcomes. a) There is one outcome with all heads: {HHHHH} P(all heads) = 1/32 =.031 b) We need all outcomes with at least one head. This means outcomes with 1, 2, 3, 4, or 5 heads. This requires much work, so use the Complementation Rule. P( at least 1 head) = 1 -P(not at least 1 head) = 1 -P(O heads) = 1 -P({TTTTT}) = 1-1/32 = 31/32 =.969 Example 16: If three dice are tossed, what is the probability of obtaining a sum of a) 3, b) 4, c) 5 or more? Since each die has 6 possibilities, the total number of outcomes is 6*6*6 = 216. a) There is one outcome with sum 3: {1,1,1} P (sum =3) = 1/216 =.005 b) 3 outcomes with sum = 4: {(2, 1, 1), (1, 2, 1), (1, 1, 2)} P (sum = 4) = 3/216 =.014 c) Use Complementation Rule: P (sum = 5 or more) = 1-P (sum is not 5 or more) = 1-P (sum is less than 5) = 1-P (sum=3 or 4) = 1-4/216 (from a) and b)) = 212/216 =.981 6
VI. Probability Involving Combinations Example 17: Winning the lottery consists of picking the 6 winning numbers, in any order, from the numbers 1 through 49. What is the probability of winning this lottery? Example 18: What is the probability of picking 3 men and 2 women to sit on a fiveperson committee from a group of 7 men and 8 women? =.326 Example 19: A bin contains 5 faulty and 7 good parts. If 4 parts are picked at random from the bin, what is the probability of picking a) all good parts and b) 2 of each? =.071 =.424 7
VII. Exercises 1. How many outcomes are there when a fair die is rolled 4 times? 2. How many license plates (3 letters followed by 3 digits are possible with a) repetition allowed (so AAB155 is possible) and b) repetition not allowed (so AABl15 is not allowed)? 3. How many ways can 10 people stand in a line? 4. In how many orders can you watch 7 different videos? 5. How many ways can a president, vice-president, and secretary be chosen from a group of 9 people? 6. How many ways can 8 people finish 1st, 2nd, 3rd, and 4th in a race? 7. How many 5-member basketball teams can be made from a group of 15 players? 8. How many ways can 2 positions be filled by a group of 12 applicants? 9. If 4 coins are flipped, what is the probability of observing 4 tails? 10. If a die is tossed 5 times, what is the probability of obtaining a sum of 6? Hint: one possible outcome is (2,1,1,1,1}. 11. If a box contains 20 light bulbs, 14 good and 6 bad. If 5 are picked at random, what is the probability of picking no bad ones? 12. What is the probability of choosing a panel of 4 men and 2 women from a group of 6 men and 5 women? 8
VIII. Solutions 1. Each roll has 6 possible outcomes, so 6 6 6 6 =1296 outcomes. 2. A license plate is letter-ietter-ietter-digit-digit-digit. There are 26 letters and 10 digits (0 through 9). a) 26 26 26 10 10 10 = 17,576,000 b) 26 25 24 10 9 8 = 11,232,000 3. Order is important, so 10! =10 9 8 7 6 5 4 3 2 1 =3,628,800. 4. Order was asked for, so 7! = 7 6 5 4 3 2 1 = 5,040. 5. Order is important, so 9 P 3 = 504. 6. Order is important, so 8 P 4 = 1,680. 7. Order is not important, so 15 C 5 = 3,003. 8. Order is not important, so 12 C 2 = 66. 9. P(4 tails) = (# of outcomes with 4 tails)/(total outcomes) = (1 outcome: {TTTT})/ (2 2 2 2) = 1/16 =.063. 10. 5 outcomes total 6: {2,1,1,1,1}, {1,2,1,1,1}, {1,1,2,1,1}, {1,1,1,2,1}, {1,1,1,1,2} Total outcomes = 6 6 6 6 6 = 7,776 P (sum 6) =5/7776 =.001 11. P(0 bad & 5 good) = 6 C 0 * 14 C 5 / 20 C 5 =1 * 2002/15504 =.129 12. P(4 of 6 men & 2 of 5 women) = = 6 C 4 * 5 C 2 / 11 C 6 = 15 * 10 / 462 =.325 9