Chapter 3 – Probability 3.1 Probability: Probability is a mathematical measure of the likelihood of an event occurring. Probabilities are always fractions or decimals indicating the portion or percent of the time that the event occurs. Examples: 40% chance of rain Batting Average of .313 The probability of a royal flush is 1:649,740 Interpretations: A 40% chance of rain means that if we look at all days with similar conditions, 40% of those days had rain. A batting average of .313 means that the player got a base hit in 31.3% (.313) of his attempts at bat. On average, a royal flush will be dealt once for every 649,740 hands of poker. Probability Experiments: A probability experiment is any process whose result is determined by chance. Examples: Roll a die. Flip a Coin. Draw a card from a shuffled deck Choose a name from a hat. 1 Outcome – Any possible result of a probability experiment. Sample Space – The collection (set) of all possible outcomes for an experiment. The sample space is often denoted by S. Examples: The sample space of the experiment Flip a Coin has 2 outcomes heads and tails, so we could write: S {_______ ,_______} S “name” of the sample space, the elements in the set are the OUTCOMES in the sample space. The experiment of rolling a die has 6 possible outcomes 1-6, so: S={ } Event – Any collection of outcomes from the sample space. will generally use capital letters to represent events. E S We Examples: Rolling an even number is an event for the experiment of rolling a die. If we E {2, 4, 6} . Note that this event is a subset call this event E, we could write: of all possible outcomes (the sample space). Drawing a king is an event for the experiment of drawing a card from a deck. If we call this event K, then K contains 4 outcomes: king of hearts, king of spades, king of diamonds and king of clubs. An event E for an experiment is said to have occurred if the outcome of the experiment is one of the outcomes of E. Ex: If E is the event described above, and if when the die is cast, a 4 is showing, then we would say that E occurred. If a 1 was rolled, then E did not occur. 2 Calculating the Probability of an Event: The probability of an event E is denoted by P(E) and always represents the fraction (or percentage) of trials of the experiment on which E occurs. Note: For any event E: 0 P( E ) 1 . An event E is called impossible if P( E ) 0 . An event E is called certain if P ( E ) 1. P ( E ) can be calculated in two different ways: using empirical or classical probability. 3 Empirical Probability: Empirical Probability – A probability calculated by collecting data from past trials of the experiment. The probability obtained is then used to predict the future likelihood of the event occurring. To calculate an empirical probability we use the formula: P( E ) number of trials in which E occurs total number of trials Examples: We could calculate the probability of the event of obtaining a sum of 7 when two dice are rolled by rolling 2 dice many times (say 1000) and calculating what percent of the time a 7 was rolled. We can calculate the probability that a basketball player will make a free throw by calculating the percentage of the time that the player has made free throws in the past. Exercises: A player has made 527 free throws in 698 attempts. Calculate the probability that the player makes a free throw on the next attempt. In the first quarter of 2008, there were 20,984 flights departing from Tampa International Airport. Of these, 4,446 were late in departing. Calculate the probability that a flight departing from Tampa will be delayed. (Data Source: U.S. Department of Transportation) http://www.transtats.bts.gov/HomeDrillChart.asp?URL_SelectMonth=4&URL_SelectYear=2008 4 Empirical Probability with Frequency Tables: Given a frequency table for a set of data values, we can calculate the probability that a data value falls into any data class. Ex: Consider the frequency table of exam scores used in our Chapter 2 examples: Class 90-99 80-89 70-79 60-69 50-59 40-49 Frequency ( f ) 4 6 4 3 2 1 If event A is the event that a student scores between 90 and 99 on the exam, then: P( A) number of students scoring 90-99 4 .20 total number of students 20 Notice that P(A) is just the relative frequency of the 90-99 data class. Exercises: Let B be the event that a student scores between 80 and 89 on the exam. Calculate P( B) . Let E be the event that a student passes the exam (with a grade of C or higher). Calculate P ( E ) 5 Classical Probability: Classical Probability (Theoretical Probability) – A probability calculated for an experiment in which each outcome is assumed to be equally likely. The probability of an event in such an experiment can be calculated by determining the fraction (or percentage) of outcomes that are in the event. We use the formula: P( E ) number of outcomes in E number of outcomes in S Examples: When flipping a fair coin, the two possible outcomes heads and tails are equally likely, so: P (heads) P (tails) 1 2 When rolling a fair die each possible outcome from 1 to 6 is equally likely, with probability 1 . 6 Let K be the event of drawing a king when a card is drawn from a shuffled deck. Since all of the 52 possible outcomes is equally likely, and since there are 4 kings in a deck, we have: P( K ) 4 1 52 13 Exercise: (see p 136 for cards) What is the probability of drawing a queen? The probability of drawing the queen of hearts? The probability of drawing a face card (King, Queen, or Jack)? 6 Ex: What is the probability of rolling a 4 on a six sided die? Now lets get the calculator to roll the die for us 100 times. What kind of distribution do we expect? According to the rolls generated, what is the probability of rolling a 4 on a six sided die? Which of the above was empirical and which classical probability? Which is correct? Which is more likely to be used? What are some types of situations for which empirical probability is less likely? 7 Fundamental Counting Principle: Fundamental Counting Principle – The total number of outcomes for any process that occurs in sequential steps is equal to the product of the number of outcomes for each step. Ex/exercises: If two dice are rolled, there are a total of 6 possible outcomes for the first die and 6 for the second die. The total number of different possible outcomes for rolling 2 dice is? If two cards are drawn from a deck without replacement, then there are 52 possible outcomes for the first card and 51 possible outcomes for the second card. The total number of outcomes for the experiment is? Florida uses three letters followed by 2 numbers followed by another letter for its license plate numbers. The total number of different license plate numbers possible is? Exercises: (We will do the first two together.) 1. Consider the experiment of flipping a coin three times. a. Calculate the number of outcomes in S. b. Write out the elements of S. c. Calculate the probability of all tails, exactly one tail, etc. 2. Consider the experiment of rolling two dice. How many outcomes are possible? a. Calculate the probability that the first die is odd. b. Calculate the probability of rolling a: sum of 7; sum of 11; sum of 5. c. Calculate the probability of rolling doubles. 3. Consider the experiment of drawing two cards without replacement. a. Find the probability that both cards are Kings b. Find the probability that both cards are Hearts c. Find the probability that the first card is a King and the second is a Jack. 8 3.1 Complement of an Event: The complement of an event E is denoted by E’, and is the event that contains every outcome for the experiment except for those in E. It is essentially the event that E does not occur. Ex: If E is the event that a 5 is showing when a die is rolled, then E’ is the event that a 5 is not showing, so E’ contains ___outcomes: E ' { } If K is the event of drawing a king from a shuffled deck, then the event K’ is the event that a king is not drawn, and so K’ contains ____ possible outcomes. If X is the event of tossing 3 tails when flipping a coin 3 times, then the event X’ is the event that at least one of the flips is not a tail (at least one is a head), so X’ contains _____ possible outcomes. Note: the complement of “all are” is “at least one is not”, the complement of “at least one is” is ______________. Note: Since every event either occurs or does not occur, the sum of the probabilities of an event and its complement is always 1. P( E ) P( E ') 1 This fact can be used to find the probability of the complement of an event as follows: P( E ') 1 P( E ) 9 Example: If the probability that a flight will be delayed is .21, then the probability that it will not be delayed must be? Exercises: a. When rolling two fair dice, calculate the probability that both are even. b. What is the complement of both being even? c. Find the probability of the complement of rolling two evens. d. Reword “the complement of rolling two evens” without using the word “complement”. 10 3.2 Conditional Probability and the Multiplication Rule: A conditional probability for an event is calculated when some additional information about the outcome of the experiment is known. Suppose A and B are two events for an experiment, and suppose that it is known that event B has occurred. We can recalculate the probability of event A based on this information, and this probability is called the conditional probability of A given B. The conditional probability of A given B is denoted by P( A | B) . Example: Consider the experiment of drawing two cards from a deck without replacement. Let event K1 be the event that the first card is a king, and event K2 be the event that the second card is a king. We can calculate that: P( K1 ) 4 52 P ( K 2 | K1 ) 3 51 P ( K 2 | K1 ') 4 51 P( K 2 ' | K1 ) 48 51 P ( K 2 ' | K1 ') 47 51 Exercise: Titanic Statistics Survived Died Total Men 332 1360 1692 Women 318 104 422 Boys 29 35 64 Girls 27 18 45 Total 706 1517 2223 Suppose a passenger on the Titanic is chosen at random, and let M be the event that they are a man, W the event they are a woman, and S that they survived. (Write answers as a decimal rounded to the nearest ten thousandth.) Calculate: P( M ) P( S ) P(M | S ) P(S | M ) P (W | D ) P( D | W ) P( D | M ') 11 Independence and Dependence: Two events A and B are called independent if P( A | B) P( A) or P( B | A) P( B) If the above equations do not hold, then the two events are called dependent. Examples: Consider the experiment of drawing one card from a deck. The event K of drawing a king and event H of drawing a heart are independent since: P( K ) 4 1 P( K | H ) 52 13 But K and the event F of drawing a face card are dependent since: P ( K | F ) 1/ 3 , not 1/13. The events M and S from the Titanic experiment are _______________. Note: Two events are dependent only if one event’s occurrence affects the likelihood of the other. So events from two different trials (with replacement) of an experiment are always independent. 12 Combining Events Using AND: Given two events A and B we define the event A and B to be the event that events A and B both occur at the same time. We find the probability of the event A and B using the Multiplication Rule. The Multiplication Rule – If A and B are two events for an experiment, then: P( A and B) P( A) P( B | A) The formula is often used when the events occur in sequence so that event A is followed by event B. Example: If two cards are drawn from a deck without replacement then the event that both cards are kings is the event K1 that the first card drawn is a king followed by event K 2 that the second card is a king. The probability of both events occurring is: P( K1 and K 2 ) P ( K1 ) P( K 2 | K1 ) 4 3 12 .0045 52 51 2652 Exercises: (assume cards drawn without replacement) Find the probability that both cards are face cards. Find the probability that the first card is a jack and the second is any face card The multiplication rule can be extended to 3 or more events as well. Find the probability of drawing 3 kings from a deck of cards. 13 Finding AND Probabilities – Independent Events: If A and B are independent events, then P( B | A) P(B) so that the formula for calculating the probability of A and B becomes: P( A and B) P( A) P( B) Example: If two dice are rolled, the probability of rolling double 4 can be found using the above formula. The probability of getting a 4 on each die is 1 and the events of 6 each roll are independent from each other. Thus the probability of a “double 4” is just: P(4 on die #1 and 4 on die #2) 1 1 1 6 6 36 This rule can also be extended to 3 or more events. For example the probability of rolling a 4 on each of 4 rolls would be: P(four fours) 1 1 1 1 1 1 4 6 6 6 6 6 1296 Exercise: The probability of a flight departing from Tampa International Airport being delayed is 0.21. Find the probability that 3 randomly chosen flights are all delayed. Find the probability of drawing two kings if each time a card is drawn it is replaced. One card is drawn: find the probability of it being a king and a heart. Two cards are drawn: find the probability of having a king and a heart (order implied) if replaced. 14 3.3 Combining Events Using OR (The Addition Rule): Given two events A and B we define the event A or B to be the event that at least one of the events A or B occurs. event A or B using the Addition Rule. We can find the probability of the The Addition Rule – If A and B are two events for an experiment, then: P( A or B) P( A) P( B) P( A and B) Two events are called mutually exclusive if both events cannot occur at the same time. In this case P( A and B) 0 , so the Addition Rule simplifies to: P( A or B) P( A) P( B) Examples: If two dice are rolled, then the event A of rolling a sum of 7 and the event B of rolling a sum of 11 are mutually exclusive, so that the probability of rolling a sum of 7 or 11 is: P( A or B) P( A) P( B) 6 2 8 2 36 36 36 9 If a card is drawn from a shuffled deck, then the event K that the card is a king and the event H that the card is a heart are not mutually exclusive, so the probability of drawing a king or a heart is: P( K or H ) P( K ) P( H ) P( K and H ) 4 13 1 16 4 52 52 52 52 13 Exercises: If one die is rolled, find the probability that it is even or a 1. If two dice are rolled, find the probability that the first die is even or the second die is 1. If two flights depart from Tampa, each with a .14 probability of being delayed, find the probability that the first flight is delayed or that the second flight is not. That a randomly selected flight is delayed or on time? In the Titanic example from above, find P ( M or S ) . (notes p 11) 15 Do autism video worksheet. Calculating Probabilities Using the Complement: Often it is easier to calculate the probability of the complement of an event than the probability of the event itself. We can then use the fact that P( E ) 1 P( E ') to find the probability of the original event E. One common example is when we want to find the probability of at least one occurrence of an event in some number of trials. Example: If a die is rolled 4 times, find the probability that at least one of the rolls is a six. If E is the event that at least one roll is a six, then E ' is the event that ____________ of the four rolls is a six. The probability of E ' can be found using the multiplication rule. Since each roll is not a six with probability 5 , and all rolls are independent, 6 the probability of four rolls all being not six is: 4 5 5 5 5 5 625 P( E ') .4823 6 6 6 6 6 1296 And so the probability of at least one six occurring is: P( E ) 1 P( E ') 1 625 671 .5177 1296 1296 Exercise: Using the fact that the probability of a flight from Tampa being delayed is .22, find the probability that at least one out of 3 flights from Tampa will be delayed. 16 3.4 Counting Techniques: Factorials – For any integer n, n factorial is the descending product beginning with n and ending with 1. n factorial is denoted by n!, and can be written as: n! n (n 1) (n 2) ... 2 1 Examples: 3! 3 2 1 6 4! 4 3 2 1 24 5! 5 4 3 2 1 120 10! 10 9 8 7 6 5 4 3 2 1 3,628,800 Note: A special definition is made for the case of 0! namely: 0! 1 Permutations: A permutation of a group of objects is an ordered arrangement of the objects. The number of different permutations of a group of n objects is n! Example: If we want to place a set of 5 names in some order, we have 5 choices for which name to place first, then 4 choices of which to list second, 3 choices for third, 2 choices for fourth, and only one choice for last. By the Fundamental Counting Principle, the number of different ways to put 5 names in order is thus: 5 4 3 2 1 5! The number of ways of dealing the cards of a deck in some order is: 52! 8.066 1067 . Often, we do not want to place an entire set of objects in order, but only want to calculate how many ways a few chosen objects can be ordered. 17 Example: A horse race has 14 horses, how many different possible ways can the top 3 horses finish? There are 14 possibilities for which horse finishes first, 13 for second, and 12 for third, so by the Fundamental Counting Principle, there are 14 1312 2184 different possible finishing orders for the top three horses. Permutations like the one described above are called permutations of n objects taken r at a time. In the example above, each different finishing order is a permutation of 14 horses taken 3 at a time. Notation – The number of permutations of n objects taken r at a time is denoted by: n Pr Example: In the horse race example above we would write: 14 P3 2184 . Formula for n Pr – Using the Fundamental Counting Principle in the same way as in the previous example we have: n Pr n (n 1) (n 2) ... (n r 1) r factors Using factorial notation, we can write this as: n Pr n! (n r )! Ex: Reconstruct how this formula works in the above example. 18 Example: In a qualifying heat for the 100 meter dash, the top 3 finishers out of each group of 8 moves on to the next round. The number of different permutations for first, second, and third place in each heat is: 8 P3 8! 8! 40320 336 (8 3)! 5! 120 Exercises: How many different orders are possible for all 8 runners in each heat? How many different permutations are possible for the runners in the first 5 places? A teacher has 12 pre-schoolers in her class. Marilia has been selected as the line-leader, and Faithe and Alton were fighting, so they will stand last in line (Faithe and then Alton.) How many possible different ways are there for the students to line up on their way to the library? 19 Combinations: When calculating the number of outcomes for experiments involving multiple choices, often we do not care what order the choices are made: Examples: Drawing a 5-card poker hand. Selecting a 3 person committee from a group of 30. A choice of r objects from a group of n objects without regard to order, is called a combination of n objects taken r at a time. Notation – The number of permutations of n objects taken r at a time is denoted by n Cr . Examples (will be calculated below): There are 52 C5 5-card poker hands. There are 30 C3 ways of selecting a 3 person committee from a group of 30. Formula for n Cr – The number of combinations of n objects taken r at a time can be calculated by starting with the number of different permutations for the choice of r objects n Pr . Since each set of the same r objects has r ! different permutations, we have counted each combination r ! times when calculating n Pr and so the number of combinations of n objects taken r at a time is: n! n Pr n Cr r ! r !(n r )! (We are in effect dividing out all of the different arrangements of the r objects since we are not concerned about the different orders: Ann, Bob and Carl = Bob, Ann and Carl, etc.) 20 Examples: The number of different possible 5-card hands of poker is: 52 C5 52! 52 51 50 49 48 2,598,960 5!(47)! 5 4 3 2 1 The number of different ways of choosing a committee of 3 employees from a group of 30 is: 30 C3 30! 30 29 28 4060 3!(27)! 3 2 1 Exercises: A professor wishes to choose three students from a class of 23 students. How many different groups of three students are possible? If the order matters, how many different orders are possible? Florida randomly chooses six balls from a bin containing balls numbered 1 to 53 for its lottery. Find the number of different lottery combinations. In how many ways could you get AT LEAST ONE of the six numbers? In how many ways could you get EXACTLY ONE of the six numbers? 21 Using Several Counting Principles: In some cases, we may need to use more than one combination, permutation or the Fundamental Counting Principle. Example: A 12 person jury is to be selected from a jury pool consisting of 14 men and 16 women. Suppose the 12 jurors are selected randomly, and let E be the event that the jury chosen has exactly 6 women and 6 men. Then we can calculate P ( E ) by using our counting techniques. The total number of possible outcomes when 12 people are drawn from a group of 30 is 30 C12 86, 493, 225 . Choosing a jury of 6 men and 6 women can be thought of as a two step process of choosing 6 men followed by choosing 6 women. The number of ways of choosing the 6 men is 14 C6 3003 , and the number of ways of choosing the 6 women is 16 C6 8008 . By the Fundamental Counting Principle, the total of number of ways to choose a 6 man and 6 woman jury is: 14 C6 16 C6 3003 8008 24,048,024 , and so: P( E ) 14 C6 16 C6 24, 048, 024 .278 C 86, 493, 225 30 12 Exercise: To choose the winning numbers, the Florida Lottery randomly chooses six balls from a bin containing balls numbered 1 to 53. If a player matches at least 3 of the numbers, a prize is won. If all 6 numbers are matched, the player wins the jackpot. Calculate: The probability a player matches all 6 winning numbers The probability a player matches none of the 6 winning numbers The probability a player matches exactly 3 out of the six winning numbers The probability a player matches at least 1 of the 6 numbers 22 Factorials, Permutations & Combinations Using the TI-83: The TI-83 can be used to calculate factorials, permutations, and combinations. All three functions are found by pressing the [MATH] key and then using the arrow keys to highlight the PRB menu. Factorials – to calculate 8!, we would press 8 then [MATH] and highlight PRB and select #4: ! by pressing [ENTER]. On our screen will read: 8! Pressing [ENTER] again we have: 8! 40320 . Permutations – to calculate 10 P3 we would press 10 then [MATH] and highlight PRB and select #2: nPr by pressing [ENTER]. We would then press 3 so that our screen would read: 10 nPr 3. Pressing [ENTER] again we have: 10 P3 720 Combinations – to calculate 23 C5 we would press 23 then [MATH] and highlight PRB and select #3: nCr by pressing [ENTER]. We would then press 5 so that our screen would read: 23 nCr 5. Pressing [ENTER] again we have: 23 C5 33649 FYI: Summary of probability p 144. 23