#### Transcript Chapter 6 - Algebra I PAP

Chapter 6 Probability Section 6.1 Chance Experiments and Events Chance Experiment A chance experiment is any activity or situation in which there is uncertainty about which of two or more possible outcomes will result. Examples of Chance Experiments Suppose two six-sided dice are rolled and they both land on sixes. Or a coin is flipped and it lands on heads. Or record the color of the next 20 cars to pass an intersection. Sample Space The collection of all possible outcomes of a chance experiment is the sample space for the experiment. Example of Sample Space An experiment is to be performed to study student preferences in the food line in the cafeteria. Specifically, the staff wants to analyze the effect of the student’s gender on the preferred food line (burger, salad or main entrée). Sample Space Example - continued The sample space consists of the following six possible outcomes. 1. A male choosing the burger line. 2. A female choosing the burger line. 3. A male choosing the salad line. 4. A female choosing the salad line. 5. A male choosing the main entrée line. 6. A female choosing the main entrée line. Example - continued The sample space could be represented by using set notation and ordered pairs. sample space = {(male, burger), (female, burger), (male, salad), (female, salad), (male, main entree), (female, main entree)} If we use M to stand for male, F for female, B for burger, S for salad and E for main entrée the notation could be simplified to sample space = {MB, FB, MS, FS, ME, FE} Example - continued Yet another way of illustrating the sample space would be using a picture called a “tree” diagram. Burger Outcome (Male, Salad) Salad Main Entree Male Outcome (Female, Burger) Burger Salad Female Main Entree This “tree” has two sets of “branches” corresponding to the two bits of information gathered. To identify any particular outcome of the sample space, you traverse the tree by first selecting a branch corresponding to gender and then a branch corresponding to the choice of food line. Suppose a six-sided die is rolled. The possible outcomes are that the die could land with 1 dot up or 2, 3, 4, 5, or 6 dots up. S = {1, 2, 3, 4, 5, 6} The sum of the probabilities thethe “S” stands for sample space. We use set notation tooflist This would be an example a outcomes sample space. the sample outcomes of the of sample space. in space equals ONE. Suppose two coins are flipped. The sample space would be: S = {HH, HT, TH, TT} Where H = heads and T = tails We can also use a tree diagram to represent a sample space. H H T H T T We follow the HT branches out to show an outcome. Events An event is any collection of outcomes from the sample space of a chance experiment. A simple event is an event consisting of exactly one outcome. If we look at the lunch line example and use the following sample space description {MB, FB, MS, FS, ME, FE} The event that the student selected is male is given by male = {MB, MS, ME} The event that the preferred food line is the burger line is given by burger = {MB, FB} The event that the person selected is a female that prefers the salad line is {FS}. This is an example of a simple event. Suppose a six-sided die is rolled. The outcome that the die would land on an even number would be E = {2, 4, 6} This would be an example of an event. We typically use capital letters to denote an event. Venn Diagrams A Venn Diagram is an informal picture that is used to identify relationships. The collection of all possible outcomes of a chance experiment are represented as the interior of a rectangle. The rectangle represents the sample space and the shaded area represents the event A. Forming New Events Let A and B denote two events. The event not A consists of all experimental outcomes that are not in event A. Not A is sometimes called the complement of A and is usually denoted by AC or A’. The shaded area represents the event not A. Complementary Event Example Suppose a six-sided die is rolled. The event that the die would land on an even number would be E = {2, 4, 6} The superscript “C” What would the event stands for complement be of the landing on an even number? EC = {1, 3, 5} The sum of the probabilities of complementary die NOT events equals ONE. These complementary events can be shown on a Venn Diagram. C = {1, 3, 5} E = {2, 4, 6}Let and E the circle represent event E. Let the rectangle represent the sample space. Let the shaded area represent event not E. The union of A or B - consists of all outcomes that are in at least one of the two events, that is, in A or in B or in both. A or B = A ∪ B Consider a The bride takes all the union marriage or union This is similar to her stuff of two people – B. of&Athe and groom allof B are put when people All of two Atakes and all hismarry, stuff & theydo put what together! together! theyit do with their possessions ? This symbol means And live happily “union” ever after! Suppose a six-sided die is rolled. The event that the die would land on an even number would be E = {2, 4, 6} The event that the die would land on a prime number would be P = {2, 3, 5} What would be the event E or P happening? E or P = {2, 3, 4, 5, 6} This is an example of the union of two events. A or B = A ∪ B Let A and B denote two events. The shaded area represents the event A U B. Let’s revisit rolling a die and getting an even or a prime number . . . E or P = {2, 3, 4, 5, 6} E or P would be any number Another way to represent in either circle. this is with a Venn Diagram. Even number Why is the number 1 outside the circles? Prime number 3 4 2 6 1 5 A and B = A ∩ B Let A and B denote two events. This symbol means “intersection” The intersection of A and B - consists of all outcomes that are in both of the events Suppose a six-sided die is rolled. The event that the die would land on an even number would be E = {2, 4, 6} The event that the die would land on a prime number would be P = {2, 3, 5} What would be the event E and P happening? E and P = {2} This is an example of the intersection of two events. Let’s revisit rolling a die and getting an even or a prime number . . . E and P would be ONLY the E and P = {2} middle part that the circles To represent with a Venn Diagram: havethis in common 3 4 2 6 1 5 Mutually Exclusive/Disjoint Two events that have no common outcomes are said to be disjoint or mutually exclusive. A and B are mutually exclusive events Suppose a six-sided die is rolled. Consider the following 2 events: A = {2} B = {6} On a single die roll, is it possible for A and B to happen at the same time? These events are mutually exclusive. Mutually exclusive (or disjoint) events -two events have no outcomes in common; two events that NEVER happen simultaneously A Venn Diagram for the roll of a six-sided die and the following two events: A = {2} B = {6} A and B are mutuallyThe exclusive intersection of A and B is (disjoint) since they have no empty! outcomes in common 3 4 6 2 1 5 Mutually Exclusive for more than 2 events Let A1, A2, …, Ak denote k events 1. The event A1 or A2 or … or Ak consists of all outcomes in at least one of the individual events A1, A2, …, Ak. ( i. e. A1 U A2 U … U Ak) 2. The event A1 and A2 and … and Ak consists of all outcomes that are simultaneously in every one of the individual events A1, A2, …, Ak. ( i. e. A1 ∩ A2 ∩ … ∩ Ak) These k events are mutually exclusive if no two of them have any common outcomes. Practice with Venn Diagrams On the following four slides you will find Venn Diagrams representing the students at your school. Some students are enrolled in Statistics, some in Calculus, and some in Computer Science. For the next four slides, indicate what relationships the shaded regions represent. (Use complement, intersection, and union) Statistics Calculus Computer Science Calculus or Computer Science Statistics Calculus Computer Science (Statistics or Computer Science) and not Calculus Statistics Calculus Com Sci Computer Science Statistics and Computer Science and not Calculus Statistics Calculus Computer Science Statistics and not (Computer Science or Calculus) Section 6.2 Definition of Probability What is Probability? Three different approaches to probability Probability – Classical Approach If a chance experiment has k outcomes, all equally likely, then each individual outcome has the probability 1/k and the probability of an event E is number of outcomes favorable to E P(E) number of outcomes in the sample space On some football teams, the honor of calling the toss at the beginning of the football game is determined by random selection. Suppose this week a member of the 11-player offensive team will be selected to call the toss. There are five interior linemen on the offensive team. If event L is defined as the event that an interior linemen is selected to call the toss, what is the probability of L? P(L) = 5 11 Probability - Example Consider the experiment consisting of rolling two fair dice and observing the sum of the up faces. A sample space description is given by {(1, 1), (1, 2), … , (6, 6)} where the pair (1, 2) means 1 is the up face of the 1st die and 2 is the up face of the 2nd die. This sample space consists of 36 equally likely outcomes. Let E stand for the event that the sum is 6. Event E is given by E={(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)}. The event consists of 5 outcomes, so 5 P(E) 0.1389 36 Consider an archer shooting arrows at a target. The probability of getting a bulls’ eye should be the ratio of the area of the inner circle to the area of the entire target. What if a very experienced archer were shooting the arrows? Would the probability of a bull’s eye still be the same? The classical approach doesn’t work for every situation. 2) Subjective Approach The problem with a subjective approach is that different people canprobabilities be interpreted a personal could Probability assign different to the as same outcome based measure on of their the strength belief that a particular subjectiveor viewpoints. outcome will occur. Example: An airline passenger may report that her probability of being placed on standby (denied a seat) due to overbooking is 0.1. She arrived at this through personal experience and observation of events. 3) Relative Frequency Approach The probability of event E, denoted by P(E), is defined to be the value approached by the relative frequency of occurrence of E in a very long series of trials of a chance experiment. Thus, if the number of trials is quite large, number of times E occurs P(E) number of trials Consider flipping a coin and recording the relative frequency of heads. When the number of coin flips is small, there is a lot of variability in the relative frequency of “heads” (as shown in this graph). What do you notice in the graph at the right? Consider flipping a coin and recording the relative frequency of heads. The graph at the right shows the relative frequency when the coin is flipped a large number of times. What do you notice in this graph at the right? Relative Frequency Approach In many “real-life” processes and chance the probability a certain Orexperiments, in other words, after a of large number outcome or event is unknown, but never the trials, the relative frequency less this probability can be estimated approaches the true probability. reasonably well from observation. The justification is the Law of Large Numbers. of Law of Large Numbers: As the number of repetitions of a chance experiment increases, the chance that the relative frequency of occurrence for an event will differ from the true probability of the event by more than any very small number approaches zero. Relative Frequency Approach Consider the chance experiment of rolling a “fair” die. We would like to investigate the probability of getting a “1” for the up face of the die. The die was rolled and after each roll the up face was recorded and then the proportion of times that a 1 turned up was calculated and plotted. Repeated Rolls of a Fair Die Proportion of 1's 0.200 0.180 1/6 Relative Frequency 0.160 0.140 0.120 0.100 0.080 0.060 0.040 0.020 0.000 0 200 400 600 800 1000 # of Rolls 1200 1400 1600 1800 2000 Classical Approach The process was simulated again and this time the results were similar. Notice that the proportion of 1’s seems to stabilize and in the long run gets closer to the “theoretical” value of 1/6. Repeated Rolls of a Fair Die Proportion of 1's 0.350 Relative Frequency 0.300 0.250 0.200 1/6 0.150 0.100 0.050 0.000 0 200 400 600 800 1000 # of Rolls 1200 1400 1600 1800 2000 Methods for Determining Probability 1. The classical approach: Appropriate for experiments that can be described with equally likely outcomes. 2. The subjective approach: Probabilities represent an individual’s judgment based on facts combined with personal evaluation of other information. 3. The relative frequency approach: An estimate is based on an accumulation of experimental results. This estimate, usually derived empirically, presumes a replicable chance experiment. Section 6-3 Basic Properties of Probability Fundamental Properties of Probability Property 1. Legitimate Values For any event E, 0 < P(E) < 1 Property 2. Sample space If S is the sample space, P(S) = 1 Fundamental Properties of Probability Property 3. Addition If two events E and F are disjoint, P(E or F) = P(E) + P(F) Property 4. Complement For any event E, P(E) + P(not E) = 1 Equally Likely Outcomes Consider an experiment that can result in any one of N possible outcomes. Denote the corresponding simple events by O1, O2,… On. If these simple events are equally likely to occur, then 1 1 1 1. P(O1 ) ,P(O2 ) , ,P(ON ) N N N 2. For any event E, number of outcomes in E P(E) N Die Example Suppose you roll a six-sided die once. Let E be the event that you roll an even number. P(E) = P(2 or 4 or 6) = 3/6 Number of outcomes in E Over N Card Example Consider the experiment consisting of randomly picking a card from an ordinary deck of playing cards (52 card deck). Let A stand for the event that the card chosen is a King. The sample space is given by The sample space is given by S = S = {A, K,,2, A , K , , 2, A,, 2, A,…, 2} and consists of 52 equally likely outcomes. and consists of 52 equally likely outcomes. The eventby is given by The event is given A={K, K, K, K} and consists of 4 outcomes, so and consists of 4 outcomes, so 4 1 P(A) 0.0769 52 13 Dice Example Consider the experiment consisting of rolling two fair dice and observing the sum of the up faces. Let E stand for the event that the sum is 7. The sample space is given by S={(1 ,1), (1, 2), … , (6, 6)} and consists of 36 equally likely outcomes. The event E is given by E={(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)} and consists of 6 outcomes, so 6 P(E) 36 Another Dice Example Consider the experiment consisting of rolling two fair dice and observing the sum of the up faces. Let F stand for the event that the sum is 11. The sample space is given by S={(1 ,1), (1, 2), … , (6, 6)} and consists of 36 equally likely outcomes. The event F is given by F={(5, 6), (6, 5)} 2 1 and consists of 2 outcomes, so P(F) = 36 = 18 ≈ 0.0556 Addition Rule for Mutually Exclusive Events If events E1, E2, . . ., Ek are disjoint (mutually exclusive) events, then P(E1 or E2 or . . . or Ek) = P(E1) + P(E2) + . . . + P(Ek) In words, the probability that any of these k disjoint events occurs is the sum of the probabilities of the individual events. A large auto center sells cars made by many different manufacturers. Three of these are Honda, Nissan, and Toyota. Consider a chance experiment that consist of observing the make of the next car sold. Suppose that P(H) = 0.25, P(N) = 0.18, P(T) = 0.14. Are these disjoint events? P(H or N or T) = yes .25 + .18+ .14 = .57 P(not (H or N or T)) = 1 - .57 = .43 Dice Example Consider the experiment consisting of rolling two fair dice and observing the sum of the up faces. Let E stand for the event that the sum is 7 and F stand for the event that the sum is 11. 6 2 P(E) & P(F) 36 36 Since E and F are disjoint events 6 2 8 2 P(E F) P(E) P(F) = ≈ 0.2222 9 36 36 36 Section 6-4 Conditional Probability Motion Sickness Example A study was performed to look at the relationship between motion sickness and seat position in a bus. The following table summarizes the data. Seat Position in Bus Front Middle Back Nausea 58 166 193 No Nausea 870 1163 806 Motion Sickness Example Let’s use the symbols N, NC, F, M, B to stand for the events Nausea, No Nausea, Front, Middle and Back respectively. Seat Position in Bus Front Middle Back Nausea 58 166 193 No Nausea 870 1163 806 Total 928 1329 999 Total 417 2839 3256 Motion Sickness Example Computing the probability that an individual in the study gets nausea we have P(N) = 417 3256 = 0.1281 Seat Position in Bus Front Middle Back Nausea 58 166 193 No Nausea 870 1163 806 Total 928 1329 999 Total 417 2839 3256 Motion Sickness Example Other probabilities are easily calculated by dividing the numbers in the cells by 3256 to get P(N) P(N and F) Front 0.0178 0.2672 0.2850 Nausea No Nausea Total P(F) Seat Position in Bus Middle 0.0510 0.3572 0.4082 Back 0.0593 0.2475 0.3068 P(M and NC) Total 0.1281 0.8719 1.0000 Conditional Probability Let E and F be two events with P(F) > 0. The conditional probability of the event E given that the event F has occurred, denoted by P(E|F), is P(E F) P(E | F) P(F) Conditional Probability If we want to see if nausea is related to seat position we might want to calculate the probability that “a person got nausea given he/she sat in the front seat.” We usually indicate such a conditional probability with the notation P(N | F). P(N | F) stands for the “probability of N given F. Motion Sickness Example The event “a person got nausea given he/she sat in the front seat” is an example of what is called a conditional probability. Of the 928 people who sat in the front, 58 got nausea so the probability that “a person got nausea given he/she sat in the front seat is 58 0.0625 928 Job Satisfaction Example A survey of job satisfaction of teachers was taken, giving the following results L E V E L Job Satisfaction Satisfied Unsatisfied Total College 74 43 117 High School 224 171 395 Elementary 126 140 266 Total 424 354 778 Job Satisfaction Example If all the cells are divided by the total number surveyed, 778, the resulting table is a table of empirically derived probabilities. College High School Elementary Total Job Satisfaction Satisfied Unsatisfied 0.0951 0.0553 0.2879 0.2198 0.1620 0.1799 0.5450 0.4550 Total 0.1504 0.5077 0.3419 1.0000 College High School Elementary Total Job Satisfaction Satisfied Unsatisfied 0.0951 0.0553 0.2879 0.2198 0.1620 0.1799 0.5450 0.4550 Total 0.1504 0.5077 0.3419 1.0000 For convenience, let C stand for the event that the teacher teaches college, S stand for the teacher being satisfied and so on. Let’s look at some probabilities and what they mean. P(C) = 0.1504 is the proportion of teachers who are college teachers P(C ∩ 𝑆) = 0.0951 is the proportion of teachers who are college teachers and who are satisfied with their job P(S) = 0.5450 is the proportion of teachers who are satisfied with their job College High School Elementary Total Job Satisfaction Satisfied Unsatisfied 0.0951 0.0553 0.2879 0.2198 0.1620 0.1799 0.5450 0.4550 Total 0.1504 0.5077 0.3419 1.0000 The proportion of teachers who are college teachers given they are satisfied is P (C ∩ S) P(C l S) = P(𝑆) 0.0951 = 0.5450 = 0.1745 Restated: This is the proportion of satisfied that are college teachers. College High School Elementary Total Job Satisfaction Satisfied Unsatisfied 0.0951 0.0553 0.2879 0.2198 0.1620 0.1799 0.5450 0.4550 Total 0.1504 0.5077 0.3419 1.0000 The proportion of teachers who are satisfied given they are college teachers is P(S l C) = P(S ∩ C) = P(C ∩ S) P(C) P(C) = 0.0951 0.1504 = 0.6323 Restated: This is the proportion of college teachers that are satisfied. Section 6-5 Independence Independence •Two events E and F are said to be independent if P(E|F) = P(E). •If E and F are not independent, they are said to be dependent events. •If P(E|F) = P(E), it is also true that P(F|E) = P(F). Sometimes the knowledge that one event has occurred does NOT change our assessment of the likelihood that another event occurs. Consider the genetic trait, hitch hiker’s thumb, which is the ability to bend the last joint of the thumb back at an angle of 60° or more. Whether or not an offspring has hitch hiker’s thumb is determined by two random events: which gene is contributed by the father and which gene is contributed by the mother. Which gene is contributed by the father does NOT affect which gene is contributed by the mother These are independent events. Let’s consider a bank that offers different types of loans: The bank offers both adjustable-rate and fixed-rate loans on single-family dwellings, condominiums and multifamily dwellings. The following table, called a joint-probability table, displays probabilities based upon the bank’s long-run loaning practices. Single Family Condo Multifamily Total Adjustable .40 .21 .09 .70 Fixed Total .10 .50 .09 .30 .11 .20 .30 P(Adjustable loan) = 0.70 Bank Loans Continued Single Family Condo Multifamily Total Adjustable .40 .21 .09 .70 Fixed Total .10 .50 .09 .30 .11 .20 .30 P(Adjustable loan) = 0.70 P(Adjustable loan | Condo) = 0.21/0.30 = 0.70 Knowing that the loan is for a condominium does not change the probability that it is an adjustable-rate loan. Therefore, the event that a randomly selected loan is adjustable and the event that a randomly selected loan is for a condo are independent. Job Satisfaction Revisited College High School Elementary Total Job Satisfaction Satisfied Unsatisfied 0.0951 0.0553 0.2879 0.2198 0.1620 0.1799 0.5450 0.4550 Total 0.1504 0.5077 0.3419 1.0000 Are C and S independent or dependent events? P(C S) 0.095 P(C) 0.150 and P(C | S) 0.175 P(S) 0.545 P(C|S) P(C) so C and S are dependent events. Multiplication Rule for Two Independent Events Two events E and F are independent, if and only if, P(E F) P(E) P(F) Hitch Hiker’s Thumb Revisited Suppose that there is a 0.10 probability that a parent will pass along the hitch hiker’s thumb gene to their offspring. are independent events, WhatSince is thethese probability that a child willwe have a hitch multiply the probabilities together. hiker’sjust thumb? Thismom wouldAND happen the mother P(H+ from H+iffrom dad) =contributes a hitch hiker’s gene (H+) AND if the father 0.1contributes × 0.1 = 0.01 a hitch hiker’s gene (H+). TV/VCR Example Consider the person who purchases from two different manufacturers a TV and a VCR. Suppose we define the events A and B by A = event the TV doesn’t work properly B = event the VCR doesn’t work properly Suppose P(A) = 0.01 and P(B) = 0.02. What is the probability that the TV and VCR do not work properly? If we assume that the events A and B are independent, then P (A and B) = P(A ∩ B) = P(A) ● P(B) = (0.01)(0.02) = 0.0002 Job Satisfaction Revisited Consider the teacher satisfaction survey College High School Elementary Total Job Satisfaction Satisfied Unsatisfied 0.0951 0.0553 0.2879 0.2198 0.1620 0.1799 0.5450 0.4550 Total 0.1504 0.5077 0.3419 1.0000 P(C) = 0.1504, P(S) = 0.5450 and P(C ∩ S) = 0.0951 Since P(C)P(S) = (0.1504)(0.5450) = 0.081968 P(C ∩ S) = 0.0951 which shows P(C ∩ S) ≠ P(C)P(S) This shows that C and S are dependent events. Multiplication Rule for k Independent Events Events E1, E2, . . ., Ek are independent if knowledge that some number of the events have occurred does not change the probabilities that any particular one or more of the other events occurred. P (E1 E2 ... Ek ) P (E1 ) P (E2 ) ... P (Ek ) This relationship remains valid if one or more of the events are replaced by their complement (not E). Suppose that a desktop computer system consist of a monitor, a mouse, a keyboard, the computer processor itself, and storage devices such as a disk drive. Most computer system problems due to manufacturer defects occur soon in the system’s lifetime. Purchasers of new computer systems are advised to turn their computers on as soon as they are purchased and then to let the computer run for a few hours to see if any problems occur. Let E1 = event that a newly purchased monitor is not defective E2 = event that a newly purchased mouse is not defective E3 = event that a newly purchased disk drive is not defective E4 = event that a newly purchased processor is not defective Suppose the four events are independent with P(E1) = P(E2) = .98 P(E3) = .94 P(E4) = .99 Let E1 = event that a newly purchased monitor is not defective E2 = event that a newly purchased mouse is not defective E3 = event that a newly purchased disk drive is not defective E4 = event that a newly purchased processor is not defective Suppose the four events are independent with In the long run, 89% of such P(E1) = P(E2) = .98 P(E3) = .94 P(E4) = .99 systems will run properly when tested shortly after purchase. What is the probability that none of these components are defective? P (E1 E2 E 3 E 4 ) (.98)(.98)(.94)(.99) = .8937 Let E1 = event that a newly purchased monitor is not defective E2 = event that a newly purchased mouse is not defective E3 = event that a newly purchased disk drive is not defective E4 = event that a newly purchased processor is not defective Suppose the four events are independent with P(E1) = P(E2) = .98 P(E3) = .94 P(E4) = .99 What is the probability that all these components will run properly except the monitor? C P (E1 E2 E3 E 4 ) (.02)(.98)(.94)(.99) = .018 Sampling Schemes •Sampling is with replacement if, once selected, an individual or object is put back into the population before the next selection. •Sampling is without replacement if, once selected, an individual or object is not returned to the population prior to subsequent selections. Card Example Suppose we are going to select three cards from an ordinary deck of cards. Consider the events: E1 = event that the first card is a king E2 = event that the second card is a king E3 = event that the third card is a king. Card Example – With Replacement If we select the first card and then place it back in the deck before we select the second, and so on, the sampling will be with replacement. 4 P(E1 ) P(E2 ) P(E3 ) 52 P(E1 E2 E3 ) P(E1 )P(E2 )P(E3 ) 4 4 4 0.000455 52 52 52 Card Example – Without Replacement If we select the cards in the usual manner without replacing them in the deck, the sampling will be without replacement. 4 3 2 P(E1 ) , P(E2 ) , P(E3 ) 52 51 50 P(E1 E2 E3 ) P(E1 )P(E2 )P(E3 ) 4 3 2 0.000181 52 51 50 Suppose I will pick two cards from a standard deck. This can be done two ways: Sampling without replacement – thethe events typically 1)Pick a card at random, replace card,arethen pick a dependent events. second card 2) Pick a card at random, do NOT replace, then pick a Sampling with replacement – the events are typically second card. independent events. If I pick two cards from a standard deck without replacement, what isofthe probability thata Ispade select Probability a spade given I drew ontwo the spades? first card. Are the events E1 = first card is a spade and E2 = second card is a spade independent? NO P(E1 and E2) = P(E1) × P(E2|E1) = 1 12 1 4 51 17 Jury Selection Suppose a jury pool in a city contains 12000 potential jurors and 3000 of them are African American women. Consider the events E1 = event that the first juror selected is an African American woman E2 = event that the second juror selected is an African American woman E3 = event that the third juror selected is an African American woman E4 = event that the fourth juror selected is an African American woman Jury Selection Continued Clearly the sampling will be without replacement so 3000 2999 P(E1 ) , P(E2 ) , 12000 11999 2998 2997 P(E3 ) ,P(E 4 ) 11998 11997 So P(E1 E2 E3 E4 ) 3000 2999 2998 2997 0.003900 12000 11999 11998 11997 Jury Selection Continued If we “treat” the Events E1, E2, E3 and E4 as being with replacement (independent) we would get 3000 P(E1 ) P(E 2 ) P(E3 ) 0.25 12000 So P(E1 E2 E3 E4 ) (0.25)(0.25)(0.25)(0.25) 0.003906 Jury Selection Summary •Notice the result calculated by sampling without replacement is 0.003900 and the result calculated by sampling with replacement is 0.003906. These results are substantially the same. •Clearly when the number of items is large and the number in the sample is small, the two methods give essentially the same result. Important Observation • If a random sample of size n is taken from a population of size N, the theoretical probabilities of successive selections calculated on the basis of sampling with replacement and on the basis of sample without replacement differ by insignificant amounts under suitable circumstances. •Typically independence is assumed for the purposes of calculating probabilities when the sample size n is less than 5% of the population size N. Suppose the manufacturer of a certain brand of light bulbs made 10,000 of these bulbs and 500 are defective. You randomly pick a package of two such bulbs off the shelf of a store. What is the probability that both bulbs are defective? Are the events E1 = the first bulb is defective and E2 = the second bulb is defective independent? To answer thisprobability question, let’s explore thea What would be the of selecting probabilities of these two events. defective light bulb? 500/10,000 = .05 Light Bulbs Continued What would be the probability of selecting a Ifdefective a random light sample of size n is taken from a population of bulb? size N, then the outcomes of selecting successive items = .05 can be treated as from the population500/10,000 without replacement independent when the sample size n is at most 5% of the Having selected population one defective bulb, what is the size N. probability of selecting another without replacement? 499/9999 = .0499 These values are so close to each other that when rounded to three decimal places they are both .050. For all practical purposes, we can treat them as being independent. Light Bulbs Continued What is the probability that both bulbs are defective? Are the selections independent? We can assume independence. P(defectiv e defective) (0.05)(0.05) = .0025 Section 6-6 Some General Probability Rules General Rule for Addition Since the intersection is added in twice, we subtract out the intersection. For any two events E and F, P(E ∪ F) = P(E) + P(F) – P(E ∩ F) E F Musical styles other than rock and pop are becoming more popular. A survey of college students finds that the probability they like country music is .40. The probability that they liked jazz is .30 and that they liked both is .10. What is the probability that they like country or jazz? P (Country ∪ Jazz) = P(C) + P(J) – P(C ∩ J) = .4 + .3 - .1 = .6 Job Satisfaction Example Consider the teacher satisfaction survey College High School Elementary Total Job Satisfaction Satisfied Unsatisfied 0.0951 0.0553 0.2879 0.2198 0.1620 0.1799 0.5450 0.4550 Total 0.1504 0.5077 0.3419 1.0000 Find the probability of a teacher teaching at college level or being satisfied. P(C ∪ S) = P(C) + P(S) – P(C ∩ S) = 0.1504 + 0.5450 – 0.0951 = 0.6003 Here is a process to use when calculating the union of two or more events. P(E ∪ F) Yes Ask yourself, “Are the events mutually exclusive?” In some problems, the intersection of the two events is given (see No previous example). P(E) + P(F) In some problems, the P(E) + P(F) – P(E ∩ F) intersection of the two events is not given, but we know that the events are If independent independent. P(E) ● P(F) Suppose two six-sided dice are rolled (one white and one red). What is the probability that the white die lands on 6 or the red die landsHow on can 1? Let A = white die landing on 6 you find the probability of A and B? B = red die landing on 1 Are A and B disjoint? NO, independent events cannot be disjoint P(A ∪ B) = P(A) + P(B) – P(A ∩ B) 1 1 1 1 11 6 6 6 6 36 General Multiplication Rule For any two events E and F, P(E F) P(E | F)P(F) From symmetry we also have P(E F) P(F | E)P(E) Here is a process to use when calculating the intersection of two or more events. Ask yourself, “ Are these events independent?” P(A ∩ B) Yes No P(A) ● P(B) P(B l A) ● P(A) Secretary Example 18% of all employees in a large company are secretaries and furthermore, 35% of the secretaries are male . If an employee from this company is randomly selected, what is the probability the employee will be a secretary and also male. Let E stand for the event the employee is male. Let F stand for the event the employee is a secretary. The question can be answered by noting that P(F) = 0.18 and P(E|F) = 0.35 so P(E F) P(E | F)P(F) (0.35)(0.18) 0.063 There are seven girls and eight boys in a math class. The teacher selects two students at random to answer questions on the board. What is the probability that both students are girls? Are these events independent? NO 7 6 P( G1 ∩ G2) = .2 15 14 Light Bulbs Continued A certain brand of light bulbs are defective five percent of the time. You randomly pick a package of two such bulbs off the shelf of a store. What is the probability that exactly one bulb is defective? Let D1 = first light bulb is defective D2 = second light bulb is defective P(exactly one defective) = P((D1 ∩ D2C) ∪ (D1C ∩ D2)) = (.05)(.95) + (.95)(.05) = .0950 An electronics store sells DVD players made by one of two brands. Customers can also purchase extended warranties for theinDVD The This can happen one ofplayer. two ways: 1) They purchased the extended following probabilities are given: warranty and Brand 1 DVD player Let B1 = event that brand 1 is purchased OR 2)BThey purchased the extended warranty and Brand 2 that brand 2 is purchased 2 = event DVD player E = event that extended warranty is purchased P(B1) = .7 P(B2) = .3 P(E|B1) = .2 P(E|B2) = .4 If a DVD customer is selected at random, what is the probability that they purchased the extended warranty? E = (E ∩ B1) ∪ (E ∩ B2) Law of Total Probabilities If B1 and B2 are disjoint events with probabilities P(B1) + P(B2) = 1, for any event E P(E) = P(E ∩ B1) + P(E ∩ B2) = P(E l B1) ● P(B1) + P(E l B2) ●P(B2) More generally B1, B2, …, Bk are disjoint events with probabilities P(B1) + P(B2) + … + P(Bk) = 1, for any event E P(E) = P(E ∩ B1) + P(E ∩ B2) + … + P(E ∩ Bk) = P(E l B1) ● P(B1) + P(E l B2) ●P(B2) +…+ P(E l Bk) ●P(Bk) DVD Player Example Continued Let B1 = event that brand 1 is purchased B2 = event that brand 2 is purchased E = event that extended warranty is purchased P(B1) = .7 P(B2) = .3 P(E|B1) = .2 P(E|B2) = .4 If a DVD customer is selected at random, what is These are disjoint events the probability that they purchased the extended warranty? Use the General Multiplication Rule: E = (E ∩ B1) ∪ (E ∩ B2) P(E) = P(E ∩ B1) + P(E ∩ B2) P(E) = P(E l B1) ● P(B1) + P(E l B2) ●P(B2) DVD Player Example Continued Let B1 = event that brand 1 is purchased B2 = event that brand 2 is purchased E = event that extended warranty is purchased P(B1) = .7 P(B2) = .3 P(E|B1) = .2 P(E|B2) = .4 If a DVD customer is selected at random, what is the probability that they purchased the extended warranty? P(E) = P(E l B1) ● P(B1) + P(E l B2) ●P(B2) P(E) = (.2)(.7) + (.4)(.3) = .26 This is an example of the Law of Total Probabilities. Soccer Example A soccer team wins 60% of its games when it scores the first goal, and 10% of its games when the opposing team scores first. If the team scores the first goal about 30% of the time, what fraction of the games does it win? Let W be the event that the team wins, and SF be the event that it scores first. By the law of total probability: P(W) = P(W l SF) ● P(SF) + P(W l SFc) ● P(SFc) = (0.6)(0.3) + (0.1)(0.7) = 0.25 Chess Example You enter a chess tournament where your probability of winning a game is 0.3 against beginners, 0.4 against intermediate-level players, and 0.5 against the advanced-level players. Half of the players are beginners, one-fourth are intermediate-level, and one-fourth are advanced-level. You play a game against a randomly chosen opponent. What is the probability of wining? Let B = beginners I = intermediate-level A = advanced-level W = event of winning Chess Example Continued Let B = beginners I = intermediate-level A = advanced-level W = event of winning P(B) = 0.5 P(W l B) = 0.3 P(I) = 0.25 P(A) = 0.25 P(W l I ) = 0.4 P(W l A) = 0.5 By the law of total probability, the probability of winning is: P(W) = P(W l B)P(B) + P(W l I) P(I) + P(W l A) P(A) P(W) = (0.3)(0.5) + (0.4)(0.25) + (0.5)(0.25) P(W) = 0.375 Four-sided Die Example We roll a fair four-sided die. If the result is 1 or 2, we roll once more but otherwise, we stop. What is the probability that the sum total of our rolls is at least 4? Let Ai be the event that the result of the first roll is I, and note that P(Ai) = ¼ for each i. Let B be the event that the sum total is at least 4. Given the event A1, the sum total will be at least 4 if the second roll results in 3 or 4, which happens with probability ½. Similarly, given the event A2, the sum total will be at least 4 if the second roll results in 2, 3, or 4, which happens with probability ¾. Also, given the event A3, we stop and the sum total remains below 4. Therefore, Four-sided Die Example Continued Therefore, P(B l A1) = ½ (1, 3) (1, 4) P(B l A2) = ¾ P(B l A3) = 0 (2, 2) (2, 3) (2, 4) P(B l A4) = 1 (4) By the law of total probability, P(B) = P(B l A1)P(A1) + P(B l A2)P(A2) + P(B l A3)P(A3) + P(B l A4)P(A4) = (0.5)(0.25) + (0.75)(0.25) + (0) (0.25) + (1) (0.25) = 0.5625 Bayes’ Rule (Theorem) A formula discovered by the Reverend Thomas Bayes, an English Presbyterian minister, to solve what he called “converse” problems. Let’s examine the following problem before looking at the formula . . . Lyme’s disease is the leading tick-borne disease in the United States and England. Diagnosis of the disease is difficult and is aided by a test that detects particular antibodies in the blood. The article, “Laboratory Consideration in the Diagnosis and Management of Lyme Borreliosis”, American Journal of Clinical Pathology, 1993, used the following notations: + represents a positive result on a blood test - represents a negative result on a blood test L represents the patient actually has Lymes LC represents the patient doesn’t have Lymes The article gave the following probabilities: P(L) = .00207 P(LC) = .99723 P(+|L) = .937 P(-|L) = .063 P(+|LC) = .03 P(-|LC) = .97 Lyme’s Disease Example Continued The article gave the following probabilities: P(L) = .00207 P(LC) = .99723 P(+|L) = .937 P(-|L) = .063 P(+|LC) = .03 P(-|LC) = .97 Bayes’ converse problem poses this question: “Given that a patient tests positive, what is the probability that he or she really has the disease?” written: P(L|+) This question is of primary concern in medical diagnosis problems! Lyme’s Disease Continued TheUsing article gave the following the Law of Totalprobabilities: Probabilities, the denominator P(L) = .00207 P(LC) = .99723 becomes C)P(LC). P(+|L) = .937 = .063 P(+|L)P(L) P(-|L) + P(+|L P(+|LC) = .03 P(-|LC) = .97 Bayes reasoned as follows: P (L ) P (L | ) P ( ) Substitute values: PSince ( | L ) P (L ) C C P ( |PL(L) P()L) P (P( |LL ) ) P (L ) we can use P(+|L) P(L) for .937(.×00207 ) the numerator. .937(.00207) .03(.99793) .0596 Bayes’ Rule If B1 and B2 are disjoint events with P(B1) + P(B2) = 1, then for any even E P(E l B1)●P(B1) P(B1 l E) = P(E l B1)●P(B1)+P(E l B2)●P(B2) More generally, if B1, B2, …, Bk are disjoint events with P(B1) + P(B2) + …+ P(Bk) = 1, then for any even E P(Bk l E) = P(E l B1)●P(B1) P(E l B1)●P(B1)+P(E l B2)●P(B2)+ …+P(E l Bk)●P(Bk) Radio Example A company that makes radios, uses three different subcontractors (A, B and C) to supply on switches used in assembling a radio. 50% of the switches come from company A, 35% of the switches come from company B and 15% of the switches come from company C. Furthermore, it is known that 1% of the switches that company A supplies are defective, 2% of the switches that company B supplies are defective and 5% of the switches that company C supplies are defective. If a radio from this company was inspected and failed the inspection because of a defective on switch, what are the probabilities that that switch came from each of the suppliers? Example - continued Define the events S1 = event that the on switch came from subcontractor A S2 = event that the on switch came from subcontractor B S3 = event that the on switch came from subcontractor C D = event that the on switch was defective From the problem statement we have P(S1) = 0.5, P(S2) = 0.35 , P(S3) = 0.15 P(D|S1) =0.01, P(D|S2) =0.02, P(D|S3) =0.05 Radio Example Continued P(Switch came from supplier givenit itwas wasdefective) = P(Switch came from supplier AA given defective) = P(D l S1)●P(S1) P(D | S ) P(SP(S = 1 l D) | D) P(D l S1)●P(S1)+P(D l S2)●P(S2)+ …+P(D lS3)●P(S3) P(D | S )P(S ) P(D | S )P(S ) P(D | S )P(S ) 1 1 1 1 2 2 3 3 (.5)(.01) (.5)(.01) (.35)(.02) (.15)(.05) .005 .005 .256 .005 .007 .0075 .0195 Similarly, P(S3 | D) (.35)(.02) (.15)(.05) .359 and P(S2 | D) .385 .0195 .0195 Radio Example Continued These calculations show that 25.6% of the on defective switches are supplied by subcontractor A, 35.9% of the defective on switches are supplied by subcontractor B and 38.5% of the defective on switches are supplied by subcontractor C. Even though subcontractor C supplies only a small proportion (15%) of the switches, it supplies a reasonably large proportion of the defective switches (38.9%). AIDS Example Just for the heck of it Bob decides to take a test for AIDS and it comes back positive. • The test is 99% effective (1% FP and FN). • Suppose 0.3% of the population in Bob’s “bracket” has AIDS. What is the probability that he has AIDS? • A1 = people in Bob’s bracket with AIDS • A2 = people in Bob’s bracket without AIDS • B = people in Bob’s bracket who would test positive AIDS Example Continued • A1 = people in Bob’s bracket with AIDS • A2 = people in Bob’s bracket without AIDS • B = people in Bob’s bracket who would test positive P(A1) = 0.003 P(BlA1) = 0.99 P(A2) = 0.997 P(BlA2) = 0.01 AIDS Example Continued By Bayes’ rule P(A1lB) = ______(0.99)(0.003)______ (0.99)(0.003) + (0.01)(0.997) = _____0.00297_____ 0.00297 + 0.00997 = 0.2295 Voter Example In a certain county 60% of registered voters are Republicans, 30% are Democrats, and 10% are Independents. When those voters were asked about increasing military spending 40% of Republicans opposed it, 65% of the Democrats opposed it, and 55% of the Independents opposed it. What is the probability that a randomly selected voter in this county opposes increased military spending? Let R = registered republicans D = registered democrats I = registered independents B = registered voters opposing increased military spending Voter Example Continued A registered voter from our county writes a letter to the local paper, arguing against increased military spending. What is the probability that this voter is a Democrat? Let R = registered republicans D = registered democrats I = registered independents B = registered voters opposing increased military spending P(R) = 0.60 P(BlR) = 0.4 P(D) = 0.30 P(BlD) = 0.65 P(I) = .10 P(BlI) = 0.55 Voter Example Continued P(R) = 0.60 P(D) = 0.30 P(I) = .10 P(B l R) = 0.4 P(B l D) = 0.65 P(B l I) = 0.55 By the total probability theorem: P(B) = P(B l R) ● P(R) + P(B l D) ● P(D) + P(B l I) ● P(I) = (0.4)(0.6) + (0.65)(0.3) + (0.55)(0.1) = 0.49 Voter Example Continued A registered voter from our county writes a letter to the local paper, arguing against increased military spending. What is the probability that this voter is a Democrat? • Presumably that is P(D l B), so by Bayes’ theorem: P(D l B) = __________(0.65)(0.3)__________ (0.4)(0.6) + (0.65)(0.3) + (0.55)(0.1) = 0.195 0.49 = 0.3980 Section 6-7 Estimating Probabilities Empirically using Simulation Simulation 1. Design a method that uses a random mechanism (such as a random generator table, Simulation provides anumber means of estimatingor probabilities tossing a coin or die, to represent an when we are unable to etc.) determine them analytically or it observation. Be sure that thethem important is impractical to estimate empirically by characteristics of theobservation. actual process are preserved. 2. Generate an observation using the method in step 1 and determine if the outcome of interest has occurred. 3. Repeat step 2 a large number of times 4. Calculate the estimated probability by dividing the number of observations of the outcome of interest by the total number of observations generated. Suppose that couples who wanted children were to continue having children until a boy was born. Would this change the proportion of boys in the population? We will use simulation to estimate the proportion of boys in the population if couples were to continue having children until a boy was born. 1)We will use a single-random digit to represent a child, where odd digits represent a male birth and even digits represent a female birth. 2) Select random digits from a random digit table until a male is selected and record the number of boys and girls. 3) Repeat step 2 a large number of times. Boy Simulation Continued Below are four from thenumber random at the Continue this rows process a large of digit times table (at least back of our textbook. 100 trials). RowCalculate the proportion of boys out of the number of children born. 6 0 9 3 8 7 6 7 9 9 5 6 2 5 6 5 8 4 2 6 4 7 4 1 0 1 0 2 2 0 4 7 5 1 1 9 4 7 9 7 5 1 8 6 4 7 3 6 3 4 5 1 2 3 1 1 8 0 0 4 8 2 0 Notice that with only 10 trials, the proportion of 9 8 0 2 8 boys 7 9 is310/22, 8 4 which 0 4 is 2 close 0 8to90.5! 1 2 3 3 2 Trial 1: girl, boy Trial 5: boy Trial 9: girl, boy Trial 2: boy Trial 6: boy Trial 3: girl, boy Trial 7: boy Trial 10: girl, girl, girl, girl, girl, girl, boy Trial 4: girl, boy Trial 8: girl, girl, boy