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
Probability What are the chances? Definition of Probability Probability is the likelihood of an event occur. This event could be randomly selecting the ace of spades, or randomly selecting a red sock or a thunderstorm. Every possibility for an event is called an outcome. For instance, if the event is randomly drawing a card, there are 52 outcomes. We define probability as # of ways to have success # of possible outcomes This is called the sample space How many ways can I win? All probabilities are between 0 and 1. That means there are always more possible outcomes than successful outcomes. Counting To solve basic probability questions, we will need to find two numbers: This may involve a lot of counting. Tree # of ways to have success diagrams and the FUNdamental Counting Theorem will help. # of possible outcomes Ex1: A university student needs to take a language course, a math course and a science course. There are 2 language courses available (English and French), 3 math courses to choose from (Stats, Calculus and Algebra) and 2 science courses available (Physics and Geology). How many possible schedules are there? In other words, What is the sample space? Let’s draw a First Course: tree diagram to Second Course: show the entire P Third Course: sample space? E S G C P Or F A G P S G P G C There are 12 possible schedules A P P G G Counting Ex 2. A family has 3 children. What is the probability that the 2 youngest will be boys? # of ways to have success # of possible outcomes 1st child B 2nd child B G 3rd child There are 8 possible families G B G B G B G How many have the 2 youngest as boys? B G B G 2: # of ways to have success P(3 kids, 2 youngest are boys) = 2/8 or 1/4 These tree diagrams are great because they show the entire sample space. They can be cumbersome, though. Counting with the FTC We can see that to count the total possible outcomes, we look at the outcomes of each stage: From Ex 1: ____ ____ Course 1 Course 2 ____ = Course 3 This works if we multiply the number of outcomes at each stage. The fundamental counting theorem states: to calculate the sample space of a multi-staged event, multiply the number of outcomes at each stage. Remember, if you’re drawing blanks, draw blanks. Finding the Sample Space Ex 3. What is the sample space for each event? a. b. c. d. e. Rolling a die Flipping 3 coins Drawing a card Drawing 2 cards Drawing 1 card, putting it back, then drawing another. Ex 4. I have 3 shirts, 6 pants and 4 pairs of shoes. How many (random) outfits can I create? 3 x ____ 6 ____ x ____ 4 = 72 a. There are 6 outcomes. b. ___ 2 x ___ 2 x ___ 2 =8 c. There are 52 outcomes. d. ___ 52 x ___ 51 = 2652 e. ___ 52 x ___ 52 = 2704 And or Or In Probability, the words ‘and’ and ‘or’ are of huge importance. ‘And’ means that BOTH events occur. ‘Or’ means that ONE OF the events occur. # of ways to have success Ex. A pair of dice is rolled. What is the probability of rolling # of possible outcomes a. A six on the first a. To win in this situation I must roll 2 AND a five on the second? numbers, therefore there are 2 stages (draw b. A three on the first blanks) ___ ___ AND a three on the second? P(rolling a 6 and a 5) = _____________ c. An even number on the first AND an even on the second? ___ ___ d. A 3 on the first and a 3 on the second OR a 1 on the first and a 1 on the P(rolling a 6 and a 5) = 1/36 second. And or Or In Probability, the words ‘and’ and ‘or’ are of huge importance. ‘And’ means that BOTH events occur. ‘Or’ means that ONE OF the events occur. # of ways to have success Ex. A pair of dice is rolled. What is the probability of rolling # of possible outcomes a. A six on the first b. To win in this situation I must roll 2 AND a five on the second? numbers (2 blanks) b. A three on the first AND a three on the second? P(rolling a 3 AND a 3) _____________ = c. An even number on the first AND an even on the second? d. A 3 on the first and a 3 on the second OR a 1 on the first and a 1 on the P(rolling a 3 AND a 3) = 1/36 second. And or Or In Probability, the words ‘and’ and ‘or’ are of huge importance. ‘And’ means that BOTH events occur. ‘Or’ means that ONE OF the events occur. # of ways to have success Ex. A pair of dice is rolled. What is the probability of rolling # of possible outcomes a. A six on the first c. To win in this situation I must roll 2 AND a five on the second? numbers (2 blanks) b. A three on the first AND a three on the second? P(rolling an even AND an even) = _____________ c. An even number on the first AND an even on the second? d. A 3 on the first and a 3 on the second OR a 1 on the first and a 1 on the P(rolling an even AND an even) = 1/4 second. And or Or In Probability, the words ‘and’ and ‘or’ are of huge importance. ‘And’ means that BOTH events occur. ‘Or’ means that ONE OF the events occur. # of ways to have success Ex. A pair of dice is rolled. What is the # of possible outcomes probability of rolling d. To win in this situation I must roll 2 d. A 3 on the first and a 3 on the second OR a 1 on the first and a 1 on the second. numbers (2 blanks). I win if I roll {a 3 AND a 3} OR if I roll {a 1 AND a 1} P(rolling a pair of 3s OR a pair of 1s) =_______ P(rolling a pair of 3s OR a pair of 1s) = 1/18 _____ And or Or What we have seen is that, FOR A MULTI-STAGED EVENT, ‘and’ means ‘multiply’ and ‘or’ means ‘add’. Ex 4. A die is rolled and a card is randomly drawn from a deck. What is the probability of a. Rolling a 6 and drawing a heart? b. Rolling a 5 and drawing the 7 of clubs? c. Rolling a 6 or drawing a heart? d. Rolling an odd number or drawing a queen? And or Or What we have seen is that, FOR A MULTI-STAGED EVENT, ‘and’ means ‘multiply’ and ‘or’ means ‘add’. Ex 4. A die is rolled and a card is randomly drawn from a deck. What is the probability of # of ways to have success # of possible outcomes a. P(6 AND Heart) = 1 a. Rolling a 6 and drawing a heart? b. Rolling a 5 and drawing the 7 of clubs? c. Rolling a 6 or drawing a heart? d. Rolling an odd number or drawing a queen? 13 6 52 1 1 6 4 1 24 And or Or What we have seen is that, FOR A MULTI-STAGED EVENT, ‘and’ means ‘multiply’ and ‘or’ means ‘add’. Ex 4. A die is rolled and a card is randomly drawn from a deck. What is the probability of a. Rolling a 6 and drawing a heart? b. Rolling a 5 and drawing the 7 of clubs? c. Rolling a 6 or drawing a heart? d. Rolling an odd number or drawing a queen? # of ways to have success # of possible outcomes b. P(5 AND 7 of clubs) 1 1 6 52 1 312 And or Or What we have seen is that, FOR A MULTI-STAGED EVENT, ‘and’ means ‘multiply’ and ‘or’ means ‘add’. Ex 4. A die is rolled and a card is randomly drawn from a deck. What is the probability of a. Rolling a 6 and drawing a heart? b. Rolling a 5 and drawing the 7 of clubs? c. Rolling a 6 or drawing a heart? d. Rolling an odd number or drawing a queen? # of ways to have success # of possible outcomes c. P(6 OR heart) HOWEVER, some of the times that we rolled a six, we would have also drawn a heart. We cannot count these successes twice! 1 13 P(6 and heart ) 6 52 1 13 1 13 6 52 6 52 1 1 1 1 6 4 6 4 3 8 P(A or B)=P(A)+P(B)-P(A and B) Let’s take a closer look. Consider a party where we dropped a piece of buttered toast and threw a dart (with our eyes closed). What is the probability of the toast landed on the buttered side OR throwing a bull's-eye? Trial Landed on Bull’s-eye? So what is P(buttered or bull’s-eye)? butter? N 1 N # of ways to have success # of possible outcomes P(buttered or bullseye ) 9 9 What a party game! I’m guaranteed to win! But wait! I’ve count some of my wins twice! 2 Y 3 N Y 4 N N 5 N Y 6 7 Y 8 Y Y 9 Y N Y N N Y P(A or B)=P(A)+P(B)-P(A and B) Let’s take a closer look. Consider a party where we dropped a piece of buttered toast and threw a dart (with our eyes closed). What is the probability of the toast landed on the buttered side OR throwing a bull's-eye? Trial Landed on Bull’s-eye? So what is P(buttered or bull’s-eye)? butter? N 1 N # of ways to have success # of possible outcomes P(buttered or bullseye ) 9 9 So I must subtract 2 from my wins count. This accounts for the buttered AND bullseye P(buttered or bullseye ) 2 Y 3 N Y 4 N N 5 N Y 6 7 7 9 Y 8 Y Y 9 Y N Y N N Y And or Or What we have seen is that, FOR A MULTI-STAGED EVENT, ‘and’ means ‘multiply’ and ‘or’ means ‘add’. # of ways to have success Ex 4. A die is rolled and a card is randomly drawn from a deck. What is the probability of a. Rolling a 6 and drawing a heart? b. Rolling a 5 and drawing the 7 of clubs? c. Rolling a 6 or drawing a heart? d. Rolling an odd number or drawing a queen? # of possible outcomes d. P(odd or queen) = P(odd) + P(queen) – P(odd and queen) 3 4 3 4 6 52 6 52 1 1 1 1 2 13 2 13 7 13 P(A or B)=P(A)+P(B)-P(A and B) Let’s take a closer look. Consider an experiment where we pulled socks from a drawer. 7 socks are blue, 7 are white and 9 are striped. There are only 19 socks in the drawer, though. How is this possible? 4 of the blue socks are striped! We can use a Venn diagram to show this clearly. blue 3 Since we are pulling only ONCE, we count the successful events. P(blue and striped ) striped 4 a. P(blue and striped)=? 5 7 4 19 P(A or B)=P(A)+P(B)-P(A and B) Let’s take a closer look. Consider an experiment where we pulled socks from a drawer. 7 socks are blue, 7 are white and 9 are striped. There are only 19 socks in the drawer, though. How is this possible? 4 of the blue socks are striped! We can use a Venn diagram to show this clearly. blue 3 striped 4 5 b. P(blue or striped)=? Since we are pulling only ONCE, we count the successful events. P(blue or striped ) P(blue) P( striped ) P(blue and striped ) 7 9 4 P(blue or striped ) 7 19 19 19 12 P(blue or striped ) 19 Perms and Combos What is the probability of winning the lotto 6-49? This type of probability question is one where you’re picking a small group from a big group (ie. A small group of 6 numbers, from a big group of 49 numbers). # of ways to have success # of possible outcomes So, how many possible outcomes are there? When I’m drawing blanks, draw blanks 49 x 48 x 47 x 46 This type of calculation can be simplified using factorials. x 45 x 44 = 1 x 1010 Factorials 6 factorial is 6x5x4x3x2x1 = 720. It is written as 6! 10! = 10x9x8x7x6x5x4x3x2x1 10! = 3628800 What is 12! 5! 12! 12 1110 9 8 7 6 5 4 3 2 1 5! 5 4 3 2 1 12! 12 1110 9 8 7 6 3991680 5! Factorials So what is 14 x 13 x 12 x 11 in factorial notation? Is seems to be 14! But it’s missing 10! 14! 10! Factorials are very useful when we’re picking a small group from a big group. Ex. How many ways are there to randomly select 5 positions out of a group 7 people? Small group (5) from a big group (7) 7 x 6 x 5 This can be written as 7! 2! x 4 x 3 To simplify this even further, we say 7 P5 Perms When selecting a small group from a big group and the order selected is important, permutations are used. Ex2. How many ways can I pick a president, vice-president from a group of 3. Group of 3 = A, B, C Pres VP A B B C n! n Pr (n r )! A C C n = # in the big group r = # in the small group A B 3! 6 3 P2 (3 2)! Perms Ex3. a group of 8 books must be arranged on a shelf. How many possible arrangements are there? The word ‘arranged’ means that order counts. I’m picking a ‘small’ group of 8 out of a ‘big’ group of 8 and order matters. 8! 8! 40320 8 P8 (8 8)! 0! Notice that 0! =1 Combos When selecting a small group from a big group and the order selected is not important, combinations are used. n! n Cr r!(n r )! n = # in the big group r = # in the small group 3! 3 2 1 3 3 C2 2!(3 2)! (2 1)(1) Ex. How many ways can 2 people be picked from a group of 3? Group of 3 = A, B, C A B B C A C C A B But, AB = BA so really there are only these options: AB or CB or AC Combos n! n Cr r!(n r )! Ex. In a certain poker game, a player is dealt 5 cards. How many different possible hands are there? Small group from a big group, when order doesn’t matter: combo Big group: 52 Small group: 5 52! 2598960 52 C5 5!(52 5)! 4 1 P(royal flush) 2598960 649740 So what is the probability of getting a royal flush (A,K,Q,J,10 of 1 suit)? # of ways to have success # of possible outcomes There is one royal flush for every suit so that’s 4 successes. Perms, Combos and Probability Ex. A group consists of 7 women and 8 men. A group of 6 must be chosen for a committee. What is a. P(exactly 6 women are chosen)? Small group of 6 from big group of 15, order doesn’t matter so it’s a combo. # of ways to choose 6 women P(6 women) # of ways to choose 6 people C6 P (6 women) 15 C6 7 7 1 5005 715 Perms, Combos and Probability Ex. A group consists of 7 women and 8 men. A group of 6 must be chosen for a committee. What is b. P(exactly 4 men are chosen)? Remember, 6 people are chosen, so if exactly 4 are men, 2 must be women. Small group of 6 from big group of 15, order doesn’t matter so it’s a combo. P(4 men AND 2 women) # of ways to choose 4 men AND 2 women # of ways to choose 6 people C 4 7 C 2 70 21 1470 42 P(4 men AND 2 women) 5005 5005 143 15 C6 8 Perms, Combos and Probability Ex. A group consists of 7 women and 8 men. A group of 6 must be chosen for a committee. What is Remember, ‘at most’ means it could be 1 c. P(at most 2 men are chosen)? man AND 5 women OR 2 men and 4 women OR no men and 6 women. P(1 man AND 5 women) # of ways to choose 1 man AND 5 women # of ways to choose 6 people C C P(1 man AND 5 women) 8 1 7 5 15 C6 P(2 men AND 4 women) P(2 men AND 4 women) P(0 men AND 6 women) 8 # of ways to choose 2 men AND 4 women # of ways to choose 6 people C 2 7 C 4 15 C6 # of ways to choose 0 men AND 6 women # of ways to choose 6 people C C P(0 men AND 6 women) 8 0 7 6 15 C6 Perms, Combos and Probability Ex. A group consists of 7 women and 8 men. A group of 6 must be chosen for a committee. What is Remember, ‘at least’ means it could be 1 man AND 5 women OR 2 men and 4 women. c. P(at least 2 men are chosen)? P(0 m AND 6 w OR 1m AND 5w OR 2m AND 4w)= 8 C0 7 C6 8 C1 7 C5 8 C2 7 C4 15 C6 15 C6 15 C6 P(0 m AND 6 w OR 1m AND 5w OR 2m AND 4w)= 1155 5005 3 13