Counting Rules

15
1 Counting Rules

description

Counting Rules. The probability of a specific event or outcome is a fraction. In the numerator we have the number of ways the specific event can occur and in the denominator we have the total number of possible outcomes. - PowerPoint PPT Presentation

Transcript of Counting Rules

Page 1: Counting Rules

1

Counting Rules

Page 2: Counting Rules

2

The probability of a specific event or outcome is a fraction. In the numerator we have the number of ways the specific event can occur and in the denominator we have the total number of possible outcomes.

Often we can see the numbers fairly easily in a problem. Sometimes we can’t. Counting rules are useful when we can not easily see the number of ways things can occur.

We will consider 5 counting rules.

Page 3: Counting Rules

3

If any one of k different mutually exclusive and collectively exhaustive events can occur on each of n trials, the number of possible outcomes is equal to

kn (k raised to the nth power). Sometimes this will be written as k^n, where ^ means the next number should be treated as a power.

Example: flip a coin – k = 2 and heads or tails are mutually exclusive (only one can occur on a flip) and collectively exhaustive (either heads or tails must occur). If you flip the coin three times one outcome might be HHT. Another outcome might be THT.

The total possible number of outcomes would be 2^3 = 2 times 2 times 2 = 8.

Rule 1

Page 4: Counting Rules

4

Coin example

All eight outcomes when you flip a coin 3 times (or just flip three coins once) are:

HHH, HHT, HTH, HTT, TTT, TTH, THT, THH.

So, what is the probability you would get 2 heads when you flip a coin 3 times? 2 heads occurs 3 out of the 8 times for a probability of 3/8 = .375.

Page 5: Counting Rules

5

Multiple-Step Experiments

If an experiment can be described as a sequence of n steps or trials with k1 possible outcomes or events on the first step, k2 possible outcomes on the second step, and so on until we get to kn, then the total number of experimental outcomes is the product (k1)(k2)...(kn).

Say a construction project has two stages - design and construction. If the design could be completed in 2, 3, or 4 months and the construction could be done in 6, 7, or 8 months, then there are (3)(3) = 9 different experimental outcomes. I will list the outcomes as ordered pairs of numbers, with the first number the time to complete the design and the second the time to complete the construction: (2, 6), (2, 7), (2, 8), (3, 6), (3, 7), (3, 8), (4, 6), (4, 7), and (4, 8).

Rule 2

Page 6: Counting Rules

6

Example continued

What is the probability the project will be completed in 9 months? 2 of the 9 outcomes would result in completion in 9 months for a probability of 2/9 = .22

Page 7: Counting Rules

7

Rule 3

The number of ways that n items can be arranged in order is

n! = n times (n – 1) times (n – 2) times … (1).

n! is called n factorial and 0! = 1 by definition.

Example: say you have 3 letters, A, B, and C. How many ways can you arrange the letters? 3! = 3 times 2 times 1 = 6. The six ways are ABC, ACB, BCA, BAC, CAB, and CBA.

What is the probability you arrangement will end in A?

2/6 = .33

Page 8: Counting Rules

8

Permutations - Remember having a lock at school? The dial on the lock might have had 40 numbers. To open the lock you spun the dial to the right several times and settled on the first number in the combination, then you went around to the left once past that number and then settled on the second number, then you went right to the third number.

Say you had the combination 7 - 16 - 32. This is 3 numbers from 40. Is the combination 32 - 7 - 16 the same as 7 - 16 -32?

The answer is no. Parker, what is the point? The idea of a combination lock means 7 - 16 - 32 and 32 - 7 - 16 would be different combinations. This is really the idea of permutation! Perhaps a better name for our locks would be permutation locks – order matters.

Rule 4

Page 9: Counting Rules

9

The formula for the number of permutations when arranging X objects selected from n objects is

n!/(n- X)!.

For example 2 from 5 is

5! = (5)(4)(3)(2)(1) = (5)(4) = 20

(5 - 2)! (3)(2)(1)

Let’s do another example. Say we have the letters A, B, and C. Say we want to choose 2 of these. We have the number of permutations 3!/(3-2)! = 3(2)/1 = 6.

The permutations would be

AB, BA, AC, CA, BC, CB.

Page 10: Counting Rules

10

Combinations –

The formula for the number of combinations when taking X objects from n objects, irrespective of order is

n!/[X!(n - X)!]. For example 2 from 5 has combinations

5! = (5)(4)(3)(2)(1) = (5)(4) = 10

2!(5 - 2)! 2!(3)(2)(1) 2Let’s do another example. Say we have the letters A, B, and C. Say we want to choose 2 of these. We have the number of combinations 3!/2!(3-2)! = 3(2)(1)/2(1)(1) = 3.The permutations were AB, BA, AC, CA, BC, CB, but in a combination since order does not matter AB and BA are the same and only counted once (and similarly for AC and BC).

Rule 5

Page 11: Counting Rules

11

Say you have an ordinary deck of playing cards - you know, ace through king in spades, hearts, diamonds, and clubs. So there are 52 cards in the deck. In many games of poker you get 5 cards. How many different combinations of 5 cards are there?

52! = (52)(51)(50)(49)(48) = 2598960

5!(47!) (5)(4)(3)(2)(1)

This means there are 2 million, 598 thousand, 960 different combinations of hands you could be dealt. Most hands you get are not memorable - you know, you get a 7 of hearts, queen of spades, 3 of clubs, 9 of clubs and a 4 of spades. But a royal flush hearts - 10, jack, queen, king, and ace all hearts - is memorable. Each hand mentioned has a 1 divided by 2598960 chance of happening. But the royal flush is a winner!

Page 12: Counting Rules

12

Note on the previous screen I had52! = (52)(51)(50)(49)(48) = 2598960.5!(47!) (5)(4)(3)(2)(1)

Often with a combination or permutation calculation we can cancel out a lot of terms in the numerator and the denominator.

I really should have put52! = (52)(51)(50)(49)(48)(47)(46)(45)…(1) = 25989605!(47!) (5)(4)(3)(2)(1)(47)(46)(45)…(1),But then we cancel52! = (52)(51)(50)(49)(48)(47)(46)(45)…(1) = 25989605!(47!) (5)(4)(3)(2)(1)(47)(46)(45)…(1),

To get52! = (52)(51)(50)(49)(48) = 2598960.5!(47!) (5)(4)(3)(2)(1)

Page 13: Counting Rules

13

Problem 38 page 170Rule 1 applies here: k = 3, n = 10.

3^10 = 59049

Page 14: Counting Rules

14

Problem 39 page 170, 171

This problem is not like the permutation I mentioned before. We still use rule 1 here with k = 30 and n = 3.

a. 30^3 = 27000

b. 1/27000 = .000037 = 3.7037E-05

This E-05 means move the decimal 5 places to the left.

c. This is not like a combination because we are not choosing a subset from a larger set.

Page 15: Counting Rules

15

Problem 44 page 171

There are 5! = 5(4)(3)(2)(1) = 120 different orders of finish here. All orders are not equally likely because each year some of the teams are really bad.

This uses rule 3, by the way.