the university of north carolina at chapel hill chapter 2. foundations of probability section 2.4....

27
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department of Mathematical Science 01/23/2013, Wednesday

Upload: eliza-felt

Post on 31-Mar-2015

225 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Chapter 2. Foundations of Probability

Section 2.4. Counting Rules Useful in Probability

Jiaping Wang

Department of Mathematical Science

01/23/2013, Wednesday

Page 2: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Outline

Fundamental Principle of Counting

Permutations Combinations

Partitions

Page 3: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Part 1. Fundamental Principle of Counting

Page 4: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Examples

A relative frequency definition of probability will work for any experiment that resultsa finite sample space with equally likely outcomes.

So counting becomes a key step in obtaining the probability.

Page 5: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Fundamental Principle of Counting:If the first task of an experiment can result in n1 possible

outcomes and for each such outcome, the second task can result in n2 possible outcomes, then there are n1n2 possible outcomes for the two tasks together.

Theorem 2.2

The principle can extend to more tasks in a sequence.

Page 6: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Example 2.5

In connection with the national retail chain that plans to build two new stores, the eight possible combinations of locations are as shown in the figure. If all eight choices are equally likely (that is, if one of the pairs of cities is selected at random), find the probability that City E is selected.

Solution: As E can appear in the combinationsAE, BE, CE or DE, also there are total 8 possiblecombinations with equal chance to be selected, thus the probability of City E is selected is 1/8*4=1/2.

Page 7: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Example 2.6

Five cans of paint (numbered 1 through 5) were delivered to a professional painter. Unknown to her, some of the cans (1 and 2) are satin finish and the remaining cans (3, 4 and 5) are glossy finish. Suppose she selects two cans at random for a particular job. Let A denote the event that the painter selects the two can of statin-finish paint and let B denote the event that the two cans have different finishes (one of satin and one of glossy). Find P(A) and P(B).

Solution: Total we have 20 possible combinations.For event A, there are two possibilities: {1,2} or {2,1}, so P(A)=2/20;For event B, there are 12 possibilities: {1,3}, {1,4}, {1,5}, {2,3}, {2,4}, {2,5}, {3,1}, {3,2}, {4,1}, {4,2}, {5,1}, {5,2}, so P(B)=12/20.

Page 8: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Part 2. Permutations

Page 9: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

With/Without Replacement

Another Example: select telephone numbers. For example, given the area code (940), then how many possibilities can one choose from 0-9 numbers in the next 7 digits?

Answer: the number of possible first digit is 10, the number of possible 2nd digit is also 10, and so for other digits. So total we have 10x10x10x10x10x10x10=107.

From this example and Example 2.6, we can find two things affect the manner of counting:

First is whether or not the order is important;

Second is whether or not chosen with replacement or without replacement.

Page 10: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Permutations

Theorem 2.3 Permutations. The number of ordered arrangements or permutations Pr

n of r objects selected from n distinct objects (r≤n) is given by

n! = n×(n-1) ×(n-2) ו••×3×2×1, 0!=1, n!=n(n-1)!.

Order Is Important Order Is Not Important

With Replacement nr

Without Replacement

Prn

Page 11: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Example 2.7

A small company has 12 account managers. Three potential customers have been identified and each customer has quite different needs. The company’s director decides to send an account manager to visit each of the potential customers and considers the customer’s needs in making his selection. How many ways are there for him to assign three different account managers to make the contacts?

Solution: P312 = 12!/(12-3)!=12!/9!=12 x 11 x 10 x 9!/9!=1320.

Page 12: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Part 3. Combinations

Page 13: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Another example in counting based on combination is drawing the numbers in lottery.

Order Is Not Important

For example, playing bridge with dealing 13 cards, at this time, the order in which the cards are dealt does not affect the final hand. For this, the order is not important; Also, this selection is without replacement. For this kind of case, it is called combination.

Page 14: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Theorem 2.4 Combinations. The number of distinct subsets or combinations of size r that can be selected from n distinct objects (r ≤ n)is given by

Combinations

Order Is Important Order Is Not Important

With Replacement nr

Without Replacement

Prn Cr

n

Page 15: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Example 2.8

Most states conduct lotteries as a means of raising revenue. In Florida’s lottery, a player select 6 numbers from 1 to 53. For each drawing, balls numbered from 1 to 53 are placed in a hopper. Six balls are drawn from the hopper at random and without replacement. To win the jackpot, all six of the player’s number must match those drawn in any order. How many wining numbers are possible?

Solution: C653 = 53!/[6! (53 -6)!]=53x52x51x50x49x48/(6x5x4x3x2x1)=22957480

So the probability to win is about 1/22957480.

Page 16: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Example 2.9

Twenty six states participate in the Powerball lottery. In this lottery, a player selects five number between 1 and 53 and a Powerball number between 1 and 42. For each drawing, five balls are drawn at random and without replacement from a hopper with 53 white balls numbered 1 to 53. A sixth ball is drawn from a second hopper with 42 red balls numbered 1 to 42. To win the jackpot, the five numbers selected by the player must match those of the five white balls drawn, and the player’s Powerball number must match the number on the red ball drawn from the hopper. How many possible wining numbers are there? Is there a greater probability of wining Florida’s lottery or the Powerball if one buys a single ticket?

Solution: there are two tasks, in the first task, the number is C5

53 = 53x52x51x50x49/(5x4x3x2x1)=2869685;in the second task, there are C1

42 = 42. Based on the Fundamental Principle of Counting, there are total C5

53 x C142 = 2869685 x 42 = 120,536,770, then we can say the probability of

winning the Powerball lottery is 1/ 120,536,770, which is less than the probability of winning Florida’s lottery.

Page 17: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

A department in a company has 12 members: 8 males and 4 females. To gain greater insight into the employees’ view of various benefits, the human resources office plans to form a focus group from members of this department. Five members will be selected at random from the department’s members. What is the probability that the focus group will only have males? What is the probability that the focus group will have two males and three females?

Example 2.10

Solution: It is selection without replacement and order is not important. So the total number of ways is 12!/(5!7!)=792; Q1: The number of ways to select only males is that select 5 males from 8 which is 8!/(5!3!)=56, so the probability is 56/792.Q2: The number of ways to select 2 males is 8!/(2!6!)=28 and the number of ways to select 3 females is 4!/(3!1!)=4, then the probability is 28x4/792.

Page 18: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Part 4. Partitions

Page 19: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Theorem 2.5 Partitions

Consider a case: If we roll a die for 12 times, how many possible ways to have2 1’s, 2 2’s, 3 3’s, 2 4’s, 2 5’s and 1 6’s? Solution: First, choose 2 1’s from 12 which gives 12!/(2!10!), second, since there aretwo positions are filled by 1’s, the next choice appears in the left 10 positions, so there are 10!/(8!2!) ways, and so similar for next other selections which provides the final result is 12!/(2!10!)x10!/(2!8!)x8!/(3!5!)x5!/(2!3!)x3!/(2!1!)x1!/(1!0!)

=12!/(2!x2!x3!x2!x2!x1!)

Theorem 2.5 Partitions. The number of partitioning n distinct objects into k groups containing n1, n2,•••, nk objects, respectively, is

Page 20: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Examples 2.11, 2.12

2.11 Suppose 10 employees are to be divided among three job assignments, with 3 employees going to job I, 4 to job II, 3 to job III. In how many ways can the job assignments be made?

Solution: 10!/(3!4!3!)=4200.

2.12 Suppose that three employees of a certain ethnic group all get assigned to job I. Assumes that they are the only employees among the 10 under consideration who belong to this ethnic group, what is the probability of this happening under a random assignment of employees to jobs?

Solution: As the job I is filled by these three employees with the same ethnic, weonly consider the left employees. At this time, we have total 7 employees with two different groups (job II and job III), so the number of ways is 7!/(4!3!)=35, thenwe can find the probability is 35/4200 = 1/120.

Page 21: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Determining whether or order is importantIs critical to counting

Suppose a fair coin is flipped three times and the number of heads observed.

Unordered TTT HTT HHT HHH

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

Probabilities 1/8 3/8 3/8 1/8

From here, we can find the probabilities are same for ordered or unordered results, but the sample space is changed.

A key to determining whether or not order is important is an understanding of the random process giving rise to the outcomes.

Page 22: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Example 2.13

The birthday problem. Suppose n people are in a room. Assume no one has birthday at 2/29 and there are total 365 days per year.

Q1: What is the probability that no two of them have the same birthday?

Solution: Each person can have 365 possible birthdays, so there are total 365n ways.If for the first person, there are 365 possible birthdays, then the second one has only364 possible birthdays (as the first one filled one of them) and so on for the nextPersons), so total there are 365(364)••(365-n+1) ways such that no two have the sameBirthday. Then we have the probability 365(364)••(365-n+1)/ 365n . If n>365, based on the Pigeon Hole theorem, at least two of them have the same birthday, so the probability that no two of them have the same birthday is 0.

Q2: How many people must be in the room for the probability that at least two of the n people have the same birthday to be greater than 1/2?

Solution: Consider the opposite event: no two of them have the same birthday, so the probability is 365(364)••(365-n+1)/ 365n <1/2, by solving this inequality to obtainThe maximum n=22, so the opposite event should need 23 people.

Page 23: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Example 2.14

A poker hand consist of five cards. If all of them are from the same suit but not in consecutive order, we say that the hand is a flush. For instance, if we have five clubs that are not in consecutive order (say, 2, 4, 5, 6, 10), then we have a flush. What is the probability of a flush but not straight flush?

Solution: There are total 52!/(47!5!) ways to choose 5 from 52 cards. Now to chooseThe flush, first there are 4 different suits, second given a suit, there are 13!/(5!8!) flush including the straight flush. Now we know there are 10 different straight flush from(ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, ace). So the probability would be 4x(13!/(5!8!)-10)/(52!/(47!5!).

Page 24: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Homework #2

Page 45: 2.36, 2.38, 2.40, 2.42, 2.43, Page 46: 2.46, 2.48, 2.50

Due Wed., 03/02/2013

Page 25: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Part 5. More Counting Rules

Page 26: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Theorem 2.6 The number of ways of making r selections from n objects when selection is made with replacement and order is not important is

Order Is Important Order Is Not Important

With Replacement nr Crn+r-1

Without Replacement Prn Cr

n

Order and Replacement

Page 27: The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Chapter 2. Foundations of Probability Section 2.4. Counting Rules Useful in Probability Jiaping Wang Department

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Example 2.16

In a lottery, a player selects 6 numbers between 1 and 44. The same number may be chosen more than once. For each drawing, 6 balls are drawn at random with replacement from a hopper with 44 white balls numbered 1 to 44. Sufficient time is allowed between selections of a ball for the previously selected ball to be mixed with the others. To win the jackpot, all six numbers of the player must match those drawn in any order. How many wining numbers are possible?

Solution: C644+6-1 = 49!/(6!43!)