How to Count Things “There are three kinds of people in the world: those who can count and those who cannot.” 11/21/2018
Why is counting important? Recall: the basic definition of the probability of an event, 𝑃 𝐸 = 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑡ℎ𝑎𝑡 𝑓𝑖𝑡 𝐸𝑣𝑒𝑛𝑡 𝐸 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑝𝑎𝑐𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 You need to be able to count how many outcomes fit the event of interest. You need to be able to count how many outcomes are in the sample space. 11/21/2018
Counting can get complicated There are techniques and tricks to counting For instance: probability of drawing five cards and getting a Full House How many different poker hands can be drawn? How many of them are Full House hands? Making a list of the sample space outcomes would take a very, very long time! 11/21/2018
Where we’ve been; Where we’re going Previously: Elementary probability P(A or B), the addition rule P(A and B), the multiplication rules Now: Counting events, just counting, only Using counting in P(E) computations that are more challenging than the ones we’ve been doing 11/21/2018
Three Counting Tricks The Fundamental Counting Rule – how many different license plates can be made? Permutations – ten horses race; how many different win/place/show results are possible? Combinations – how many different juries can be formed from the 100 jurors in today’s pool? 11/21/2018
The Fundamental Counting Principle The setup: A sequence of 𝑛 events There are 𝑘 1 possible outcomes of event #1 There are 𝑘 2 possible outcomes for event #2 Etc., etc., 𝑘 𝑛 possible outcomes for event #𝑛 The conclusion: You Multiply their counts. Overall 𝑘 1 ∙ 𝑘 2 ∙⋯∙ 𝑘 𝑛 possible outcomes 11/21/2018
Classic Example - License Plate Suppose we must have three letters followed by four numbers. How many possible different license plates? Use the Fundamental Counting Principle! letter letter letter number number number number ____ ∙ ____∙ ____∙ ____ ∙ ____ ∙ ____ ∙ ____ = ___________ possible different license plates 11/21/2018
Classic Example – The Menu You get one appetizer out of six choices, And one main course out of ten choices, And one dessert out of eight choices. How many meals before you’ve tried every possible combination? Appetizer and Main Course and Dessert ________ ∙ _________ ∙ _______ = ___________ 11/21/2018
Classic Example – The Meeting Room A, B, C, D, E, F, X, Y, Z attend a meeting The chairman will sit at the head of the table. Only X, Y, and Z are qualified to be chairman. There are four seats along each side of the table. How many possible seating arrangements are there? (Hint: Start with chairman, then fill the rest of the seats.) _____ ∙ _____ ∙ _____ ∙ _____ ∙ _____ ∙ _____ ∙ _____ ∙ _____ ∙ _____ = ______________ possible different seatings 11/21/2018
Factorials Example: 10! It means 10∙9∙8∙7∙6∙5∙4∙3∙2∙1 The result is a large number! TI-84 MATH, PRB, 4:! 11/21/2018
Permutations The situation The notation and the formula You have 𝑛 objects You are going to take 𝑟 of them The order of the 𝑟 items is important The notation and the formula 𝑛 𝑃 𝑟 = 𝑛! (𝑛−𝑟)! 11/21/2018
Permutations Example 𝑛 𝑃 𝑟 = 𝑛! (𝑛−𝑟)! Ten horses run the race. 𝑛=10 𝑛 𝑃 𝑟 = 𝑛! (𝑛−𝑟)! Example Ten horses run the race. 𝑛=10 How many win/place/show possibilities? 𝑟=3 10 𝑃 3 = 10! (10−3)! = 10∙9∙8∙7∙6∙5∙4∙3∙2∙1 7∙6∙5∙4∙3∙2∙1 11/21/2018
Permutations Example Ten horses run the race. 𝑛=10 How many win/place/show possibilities? 𝑟=3 10 𝑃 3 = 10! (10−3)! = 10∙9∙8∙7∙6∙5∙4∙3∙2∙1 7∙6∙5∙4∙3∙2∙1 =10∙9∙8=720 11/21/2018
Permutations Example Ten horses run the race. 𝑛=10 How many win/place/show possibilities? 𝑟=3 11/21/2018
Permutations Example Ten horses run the race. 𝑛=10 How many win/place/show possibilities? 𝑟=3 This happened to be the same as if we used the Fundamental Counting Rule 10 horses could cross the line first and Win 9 remaining horses for the 2nd Place finish 8 remaining horses who could Show 11/21/2018
Example: How many “words” How many four-letter words can be made, if we don’t repeat any letters? Thinking is the only way to do these ! 26 letters Choose 4 of them The order matters So Permutation is the way to do it 11/21/2018
How many four-letter “words” ? ____ P _____ = ______ If we instead used the Fundamental Counting Principle to compute this, _____ ∙ _____ ∙ _____ ∙ _____ = _____ 11/21/2018
How many words? How many 7-letter “words” can be made from the letters in FLORIDA ? There are ____ letters available We are taking ____ of them Order { does or does not? } matter So it’s a ___________ situation. The computation is ___ P ____ The solution is __________. 11/21/2018
How many words? How many “words” can be made from FLORIDA ? This is a multistep problem! How many 2-letter words? ____ P ____ How many 3-letter words? ____ P ____ How many 4-letter words? ____ P ____ How many 5-letter words? ____ P ____ How many 6-letter words? ____ P ____ How many 7-letter words? ____ P ____ How many 8-letter words? ____ P ____ 11/21/2018
“Special” Permutations How many 4-letter words can be made from the letters in the BABY? Complicated by 2 B’s. Don’t double-count. Just doing 4! won’t work. How: “Divide out” the duplicate letters. 4! 2! ABBY, ABYB, AYBB, BABY, BAYB, BBAY, BBYA, BYAB, BYBA, YABB, YBAB, YBBA 11/21/2018
“Special” Permutations How many 11-letter words can be made from the 11 letters in MISSISSIPPI ? Complicated by 4 I’s, 4 S’s, 2 P’s Just doing 11! won’t work. “Divide out” the duplicate letters. 11! 4!4!2! EXTRA PARENS NEEDED ON TI-84 !!! 11/21/2018
Permutations vs. Combinations You have 𝑛 objects You are going to take 𝑟 of them The order of the 𝑟 items is important 𝑛 𝑃 𝑟 = 𝑛! (𝑛−𝑟)! You have 𝑛 objects You are going to take 𝑟 of them The order of the 𝒓 items is NOT important So we divide out the various repetitions of those 𝒓 items. 𝑛 𝐶 𝑟 = 𝑛! 𝑛−𝑟 ! 𝒓! 11/21/2018
Permutations – Classic Example How many different 5-card poker hands? Analysis: 𝑛=52 items 𝑟=5 of them taken at a time Order does not matter. An ace is an ace, whether you drew it first or second or third or fourth or last Compute: 11/21/2018
Poker Hands Combination 𝑛 𝐶 𝑟 = 𝑛! 𝑛−𝑟 ! 𝑟! 52 𝐶 5 = 52! 52−5 !5! = 𝟓𝟐∙𝟓𝟏∙𝟓𝟎∙𝟒𝟗∙𝟒𝟖∙𝟒𝟕! 𝟒𝟕!∙𝟓∙𝟒∙𝟑∙𝟐∙𝟏 Clever set-up: the 47! top cancels with 47! Bottom Or TI-84 MATH, PRB, 3:nCr 11/21/2018
Classic Example - Committees Choosing 5 students for the cafeteria committee out of 20 students available. Analysis Order doesn’t matter So it’s a Combination (not a Permutation) Computation: ___ C ___ = 11/21/2018
Classic Multistep Committee Problem We’re choosing the Scheduling Committee. 10 women and we need 3 of them to serve. 6 men and we need 2 of them to serve. How many possible committees can we have? You’ll need two different tools to compute this. 11/21/2018
Classic Multistep Committee Problem Women and Men on the committee Analysis Fundamental Counting Principle, multiply: How many ways to choose 3 out of 10 women? Times how many ways to choose 2 out of 6 men? The women are one nCr combination calculation. The men are another nCr combination calculation. 11/21/2018
Classic Multistep Committee Problem 3 Women and 2 Men on the committee How many ways to choose a President and a Vice-President, with no restrictions on who may serve? Analysis Order matters here! So it’s a Permutation: ___ P ___ = _____ 11/21/2018
Lottery – How many ways to choose five numbers out of ____ numbers? 5 numbers out of 5? ____ C ____ = ______ 5 numbers out of 6? ____ C ____ = ______ 5 numbers out of 7? ____ C ____ = ______ 5 numbers out of 10? ____ C ____ = ______ 5 numbers out of 20? ____ C ____ = ______ 5 numbers out of 30? ____ C ____ = ______ 5 numbers out of 59? ____ C ____ = ______ 11/21/2018
Powerball Five white numbers from 1 thru 59 One red Powerball number from 1 thru 39 The Fundamental Counting Principle again Combination calculation for 5 white numbers Trivial calculation for the 1 powerball number Multiply those results together 11/21/2018
How many “pairs” in a deck of cards? View it as two events in a single draw The rank The suit Then apply the Fundamental Counting Princ. Any one of the 13 ranks (from 2, 3, …, Q, K, A) Four cards of that rank taken two at a time 13 𝐶 1 ∙ 4 𝐶 2 =78 11/21/2018
How many 5-card flushes? View it in two pieces 1 out of the 4 suits 5 out of the 13 cards in that suit The Fundamental Counting Principle, again 4 𝐶 1 ∙ 13 𝐶 5 =5148 11/21/2018