Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
PHP 2510 Probability Part 2 Topics to be covered today: • Multiplication principle • Counting permutations and combinations, and associated probability calculations using these • Binomial and multinomial coefficients PHP 2510 – Sept 17, 2009 1 Last lecture, we defined sample space Ω = {ω1 , ω2 , ..., ωn }, and event which is a subset of Ω A ⊆ Ω. Today, we focus on how to compute the probability of event A for a finite sample space Pr(A) =? Specifically, we will learn how to determine Pr(A) by counting. PHP 2510 – Sept 17, 2009 2 One example Suppose that a fair coin is thrown twice and the sequence of heads and tails is recorded. The sample space is Ω = {hh, ht, th, tt}. Let A denote the event that at least one head is thrown. Then, A = {hh, th, ht}. The fact is that all four sequences have equal probability. Therefore by counting, the probability of the event A is Pr(A) = 3/4 = 0.75. PHP 2510 – Sept 17, 2009 3 If the element of Ω all have equal probability and event A can only happen in mutually exclusive ways, then Pr(A) = # of ways A can occur . total # of outcomes • If Ω contains N elements, then each element has probability 1/N . • If A can only happen in n exclusive ways, then Pr(A) = n/N. • Again, the formula holds only if all the outcomes are equally likely. PHP 2510 – Sept 17, 2009 4 Counting Now, the question simplifies to how to calculate the total # of outcomes – e.g. How many different sequences if we throw a fair coin 100 times? – and the # of ways A can occur. Multiplication principle. Consider observing a sequence of q experiments. The first experiment has n1 possible outcomes, the second one has n2 possible outcomes, and so forth, up to nq outcomes for the qth experiment. The total number of possible outcomes is n1 × n2 × · · · × nq PHP 2510 – Sept 17, 2009 5 Example. Toss a coin 10 times. The number of possible sequences is 2 × 2 × · · · × 2 = 210 = 1024. Example. There are 15 teams in the AL and 16 in the NL. Two teams will play in the world series. The number of possible world series matches is 15 × 16 = 240. Example (Driving to work). The number of possible outcomes of going through 3 intersections is 23 = 8. Example (Twin). The number of possible gender combinations is 2 × 2 = 4. PHP 2510 – Sept 17, 2009 6 Probability arises from random sampling. Say, sample r objects from a population of n objects. This can be envisioned as sampling from an urn containing n uniquely labeled balls. There are two ways to do the sampling: With replacement, and without replacement. Using the multiplication principle, we have the following properties of permutation. PHP 2510 – Sept 17, 2009 7 Counting: Permutations Permutations are ordered samples. Property 1. The number of ways to order a sample of n objects is n! = n(n − 1)(n − 2) · · · 1. In other words, there are n! ways to sample n balls from an urn of n labeled balls without replacement. Example. How many ways can 3 individuals be lined up? Example. How many ways can 10 individuals be lined up? 10! = 3, 628, 800. PHP 2510 – Sept 17, 2009 8 Property 2. Consider a set of n objects. Sample r of them without replacement. The number of ways to order them is n(n − 1)(n − 2) · · · (n − r + 1) Example. From 10 children, five are to be chosen and lined up. How many different lines are possible? 10 × 9 × 8 × 7 × 6 = 30, 240. Example. The Powerball game has 55 numbered balls in a drum. Five are selected without replacement. How many unique orderings are there? Ans = 417,451,320 PHP 2510 – Sept 17, 2009 9 Property 3. If the r objects are selected with replacement, then the number of ways to order them is n × n × ... × n = nr . Example. How many unique orderings of the Powerball numbers are there if they are selected with replacement? Ans = 503,284,375 Example. In some states, license plates have 6 characters: 3 letters followed by 3 numbers. How many distinct such plats are possible. Example. What is the probability that the license plate for a new car contains no duplicate letters or numbers? PHP 2510 – Sept 17, 2009 10 Birthday probabilities Our class has 25 people. What is the probability that at least two individuals have the same birthday? (Ignore leap years). Define A as the event that at least two people have same birthday Sometimes easier to work with complement: Ac is the event that no two people have same birthday, or that there are 25 unique birthdays Think of the sample as being drawn from a set of size 365. Each element has an equal probability. In this sample of size 25, the probability of Ac is number of ways to have 25 unique birthdays divided by total number of possible birthdays. So n = 365 and r = 25. PHP 2510 – Sept 17, 2009 11 To count Ac , how many ways to sample 25 birthdays without replacement? 365 × 364 × · · · × (365 − 25 + 1) To count total number of possible birthdays, how many ways to sample 25 birthdays with replacement? 36525 Probability of 25 unique birthdays (no matches): 365 × 364 × · · · × (365 − 25 + 1) ≈ 0.43 25 365 Probability of at least one match is 1 − P (Ac ) 1 − 0.43 = 0.57 PHP 2510 – Sept 17, 2009 12 Counting: Combinations Combinations are unordered samples, usually thought of as being sampled without replacement. In particular, we ask the following question: If r objects are taken from a set of n objects without replacement and disregarding order, how many different samples are possible? PHP 2510 – Sept 17, 2009 13 Property. The number of possible combinations of r objects drawn from a set of n objects is n(n − 1)(n − 2) · · · (n − r + 1) n! = r! r!(n − r)! • The numerator is the number of ways to select r objects in order (number of permutations). • The denominator is the number of ways to order them once they are selected. Notation: µ ¶ n! n = r r!(n − r)! This is called the binomial coefficient PHP 2510 – Sept 17, 2009 14 Example 1: Taste testing. A statistics professor claims that he can distinguish between three varieties of cabernet. Given three unlabeled glasses, what is the probability he can classify them correctly just by guessing? What is the probability if there are four different varieties? Ans: 1/6, 1/24 Suppose he classifies them correctly. How do you judge his claim? PHP 2510 – Sept 17, 2009 15 Example 2: Powerball. Powerball is played in the following way. • First, five white balls are selected without replacement from a drum with 55 balls labeled 1 through 55. • Next, one red ‘powerball’ is selected from a drum with 42 balls labeled 1 through 42 • If you match the five white balls in any order, plus the red one, you win. PHP 2510 – Sept 17, 2009 16 Here are the questions: 1. How many combinations are possible for the five white balls? Ans = 3,478,761 2. The prize for selecting all five white balls correctly is 200K. If I select the numbers 1-2-3-4-5 for the white balls, what is my probability of winning the 200K? Is this different than the probability for any other number? 3. How many combinations are possible for the five white balls plus the powerball? Ans = 146,107,962 4. How many people need to play before we can expect a winner? powerball.com www.durangobill.com/PowerballOdds.html PHP 2510 – Sept 17, 2009 17