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
Chapter 4 Introduction to Probability STAT 3038 4.1 Experiment, Outcome, and Sample Space 4.2 Calculating Probability 4.3 Marginal Probability, Conditional Probability, and Related Probability Concepts 4.4 Intersection of Events and the Multiplication Rule 4.5 Union of Events and the Addition Rule 4.6 Counting Rule, Factorials, Combinations, and Permutations 4-1 Dr. Yingfu (Frank) Li Introduction What is probability? Chance of what? 4.1 Experiments, Outcomes, & Sample Spaces STAT 3038 An experiment is a process that, when performed, results in one and only one of many observations. These observations are called that outcomes of the experiment. The collection of all outcomes for an experiment is called a sample space 4-3 Dr. Yingfu (Frank) Li Event What is “event”? How to calculate probability? What is the relationship between probability and statistics? STAT 3038 A numerical measure of chance, likelihood. Probability is the theoretical foundation of statistics 4-2 Dr. Yingfu (Frank) Li Example 4-1 STAT 3038 Venn and tree diagrams for the experiment of tossing a coin once 4-4 Dr. Yingfu (Frank) Li 1 Example 4-3 Example 4-2 Venn and tree diagrams for the experiment of tossing a coin twice 4-5 STAT 3038 Dr. Yingfu (Frank) Li Suppose we randomly select two workers from a company and observe whether the worker selected each time is a man or a woman. Write all the outcomes for this experiment. Draw the Venn and tree diagrams for this experiment. 4-6 STAT 3038 Simple and Compound Events STAT 3038 Example 4-6 An event is a collection of one or more of the outcomes of an experiment An event that includes one and only one of the (final) outcomes for an experiment is called a simple event and is E1 + E2 + E3 + … = S denoted by Ei A compound event is a collection of more than one outcome for an experiment Example 4 – 5 Selecting two workers from a company and observing whether the worker selected each time is a man or a woman. Let A be the event that at most one man is selected. Event A will occur if either no man or one man is selected. Hence, the event A is given by A = {MW, WM, WW} Event A contains more than one outcome, so it is a compound event. 4-7 Dr. Yingfu (Frank) Li Dr. Yingfu (Frank) Li In a group of a people, some are in favor of genetic engineering and others are against it. Two persons are selected at random from this group and asked whether they are in favor of or against genetic engineering. How many distinct outcomes are possible? Draw a Venn diagram and a tree diagram for this experiment. List all the outcomes included in each of the following events and mention whether they are simple or compound events. STAT 3038 Both persons are in favor of the genetic engineering. At most one person is against genetic engineering. Exactly one person is in favor of genetic engineering. 4-8 Dr. Yingfu (Frank) Li 2 Example 4-6: Solution Let 4.2 Calculating Probability F = a person is in favor of genetic engineering A = a person is against genetic engineering FF = both persons are in favor of genetic engineering FA = the first person is in favor and the second is against AF = the first is against and the second is in favor AA = both persons are against genetic engineering Definition of probability Properties of probability Both persons are in favor of genetic engineering = { FF } At most one person is against genetic engineering = { FF, FA, AF } Exactly one person is in favor of genetic engineering = { FA, AF } 0 P(Ei) 1 P(E1) + P(E2) + … + P(En) = 1 For any event A, 0 P(A) 1 Solution A numerical measure of the likelihood that a specific event will occur Three kinds of probabilities Classical probability: Empirical probability: Subjective probability First one is simple event and the last two are compound events 4-9 STAT 3038 Dr. Yingfu (Frank) Li 4-10 1 Total number of outcomes for the experiment Example 4-7 Two or more outcomes (or events) that have the same probability of occurrence are said to be equally likely outcomes (or events) Classical Probability Rule to Find Probability P ( Ei ) Find the probability of obtaining a head and the probability of obtaining a tail for one toss of a coin P ( head ) Example 4-8 STAT 3038 4-11 Dr. Yingfu (Frank) Li Example 4-9 STAT 3038 1 . 50 2 A = {2, 4, 6}. If any one of these three numbers is obtained, event A is said to occur P ( head ) P ( A) 1 Total number of outcomes Find the probability of obtaining an even number in one roll of a die Number of outcomes favorable to A Total number of outcomes for the experiment n( A) n( S ) Dr. Yingfu (Frank) Li Examples of Finding Probability Classical probability P(A) = P(A) = Law of Large Numbers STAT 3038 Three Conceptual Approaches to Probability P(A) = 1, then A is a certain event P(A) = 0, then A is an impossible event Number of outcomes included in A 3 .50 Total number of outcomes 6 In a group of 500 women, 120 have played golf at least once. Suppose one of these 500 women is randomly selected. What is the probability that she has played golf at least once? My examples of tossing coins and rolling dice 4-12 Dr. Yingfu (Frank) Li 3 Relative Frequency Concept of Probability If an experiment is repeated n times and an event A is observed f times, then, according to the relative frequency f concept of probability, an Approximation of Probability P( A) Example 4-10 n Ten of the 500 randomly selected cars manufactured at a certain auto factory are found to be lemons. Assuming that the lemons are manufactured randomly, what is the probability that the next car manufactured at this auto factory is a lemon? P ( next car is a lemon) Law of Large Numbers f 10 . 02 n 500 Law of Large Numbers If an experiment is repeated again and again, the probability of an event obtained from the relative frequency approaches the actual or theoretical probability Subjective probability is the probability assigned to an event based on subjective judgment, experience, information and belief P(glass broken) = ? STAT 3038 4-13 Dr. Yingfu (Frank) Li 4-14 STAT 3038 4.3 Marginal and Conditional Probabilities Marginal probability is the probability of a single event without consideration of any other event. Marginal probability is also called simple probability. Suppose all 100 employees of a company were asked whether they are in favor of or against paying high salaries to CEOs of U.S. companies. Table 4.4 gives a two way classification of the responses of these 100 employees. Dr. Yingfu (Frank) Li Conditional Probabilities Conditional probability is the probability that an event will occur given that another has already occurred. If A and B are two events, then the conditional probability A given B is written as P ( A | B ) and read as “the probability of A given that B has already occurred.” P (M ) = 60/100 = .60 Two methods P (F ) = 40/100 = .40 Treat the “condition” as a new sample space. Find the probability of A within the new sample space Two-way classification table method – easiest one Tree diagram method P (A ) = 19/100 = .19 P (B ) = 81/100 = .81 STAT 3038 4-15 Dr. Yingfu (Frank) Li STAT 3038 4-16 Dr. Yingfu (Frank) Li 4 Example 4-12 Example 4-13 P(in favor | male) in Table 4.4 – see slide 4-15 Two-way classification table Number of males who are in favor 15 P (in favor | male) .25 Total number of males 60 For the data of Table 4.4, find the conditional probability that a randomly selected employee is a female given that this employee is in favor of paying high salaries to CEOs Two-way classification table P (female |in favor) Tree Diagram Number of females who are in favor Total number of employees who are in favor 4 .2105 19 Tree Diagram 4-17 STAT 3038 Dr. Yingfu (Frank) Li 4-18 STAT 3038 More Examples of Conditional Probabilities Mutually Exclusive Events Randomly pick a # from {1, 2, …, 9} A – even number; B – multiple of 3 P(A|B) = ? P(B|A) = ? Events that cannot occur together are said to be mutually exclusive events Example 4-14 STAT 3038 A – double; P(A|B) = ? Consider the following events for one roll of a die: Roll two dice B – sum of 8 P(B|A) = ? 4-19 Dr. Yingfu (Frank) Li Dr. Yingfu (Frank) Li STAT 3038 A= an even number is observed= {2, 4, 6} B= an odd number is observed= {1, 3, 5} C= a number less than 5 is observed= {1, 2, 3, 4} Are events A and B mutually exclusive? What about A and C? 4-20 Dr. Yingfu (Frank) Li 5 Example 4-15 Independent And Dependent Events Consider the following two events for a randomly selected adult: Y = this adult has shopped on the Internet at least once N = this adult has never shopped on the Internet Are events Y and N mutually exclusive? Two events are said to be independent if the occurrence of one does not affect the probability of the occurrence of the other. In other words, A and B are independent events if either P(A | B) = P(A) or P(B | A) = P(B) Common Sense? sometimes Example 4-16 4-21 STAT 3038 Dr. Yingfu (Frank) Li Conditional probability => unconditional probability Condition has no impact on the probability of the event Refer to the information on 100 employees given in Table 4.4 in Section 4.4. Are events “female (F)” and “in favor (A)” independent? P (F) = 40/100 = .40 and P (F | A) = 4/19 = .2105. Because these two probabilities are not equal, the two events are dependent. 4-22 STAT 3038 Example 4-17 Complementary Events A box contains a total of 100 DVDs that were manufactured on two machines. Of them, 60 were manufactured on Machine I. Of the total DVDs, 15 are defective. Of the 60 DVDs that were manufactured on Machine I, 9 are defective. Let D be the event that a randomly selected DVD is defective, and let A be the event that a randomly selected DVD was manufactured on Machine I. Are events D and A independent? Solution P (D) = 15/100 = .15 and P (D | A) = 9/60 = .15. Hence, P (D) = P (D | A). So the two events, D and A, are independent The complement of event A, denoted by Ā and is read as “A bar” or “A complement,” is the event that includes all the outcomes for an experiment that are not in A. Complementary Rule Examples STAT 3038 4-23 Dr. Yingfu (Frank) Li Dr. Yingfu (Frank) Li STAT 3038 Toss a coin 2 (3, 4, 5, …) times. P(getting at least one head) = ? Roll a pair of dice 2 (3, 4, 5) times. P(getting at least one double 6) = ? 4-24 Dr. Yingfu (Frank) Li 6 Examples 4-18 & 19 In a group of 2000 taxpayers, 400 have been audited by the IRS at least once. If one taxpayer is randomly selected from this group, what are the two complementary events for this experiment, and what are their probabilities? Solution 4.4 Intersection Of Events & Multiplication Rule The two complementary events for this experiment are A = the selected taxpayer has been audited by the IRS at least once Ā = the selected taxpayer has never been audited by the IRS The probabilities of the complementary events are P (A) = 400/2000 = .20 and P (Ā) = 1600/2000 = .80 Intersection of Events Example 4-19 leaves to you Multiplication Rule 4-25 STAT 3038 Dr. Yingfu (Frank) Li STAT 3038 Example 4-20 Let A and B be two events defined in a sample space. The intersection of A and B represents the collection of all outcomes that are common to both A and B and is denoted by A and B (or AB or AᴖB) The probability of the intersection of two events is called their joint probability. It is written as P(A and B). Multiplication Rule says P(A and B) = P(A) P(B |A) = P(B) P(A|B) 4-26 Dr. Yingfu (Frank) Li Tree Diagram for Joint Probabilities Table 4.7 gives the classification of all employees of a company given by gender and college degree. If one of these employees is selected at random for membership on the employee-management committee, what is the probability that this employee is a female and a college graduate? What about direct method? Solution STAT 3038 P(F and G) = P(F) P(G |F) P(F) = 13/40 P(G |F) = 4/13 P(F and G) = P(F) P(G |F) = (13/40)(4/13) = .100 4-27 Dr. Yingfu (Frank) Li STAT 3038 4-28 Dr. Yingfu (Frank) Li 7 Calculating Conditional Probability Example 4-21 A box contains 20 DVDs, 4 of which are defective. If two DVDs are selected at random (without replacement) from this box, what is the probability that both are defective? G1 = event that the first DVD selected is good; D1 = is defective G2 = event that the second DVD selected is good; D2 = is defective Solution If A and B are two events, then P ( A and B ) P ( A and B ) P ( B | A) and P ( A | B ) P ( A) P(B) given that P (A ) ≠ 0 and P (B ) ≠ 0 Example 4-22 P(D1 and D2)=P(D1) P(D2|D1) P(D1) = 4/20 P(D2|D1) = 3/19 P(D1 and D2) = (4/20)(3/19) = .0316 Solution 4-29 STAT 3038 Dr. Yingfu (Frank) Li The probability that a randomly selected student from a college is a senior is .20, and the joint probability that the student is a computer science major and a senior is .03. Find the conditional probability that a student selected at random is a computer science major given that the student is a senior. A = the student selected is a senior & B = the student selected is a computer science major. Then P(A) = .20 and P(A and B) = .03 P (B | A) = P(A and B)/P(A) = .03/.20 = .15 4-30 STAT 3038 Multiplication Rule for Independent Events The probability of the intersection of two independent events A and B is P(A and B) = P(A) P(B) Example 4-23 Example 4-24 Dr. Yingfu (Frank) Li Find the probability that all three of them are allergic to it. Find the probability that at least one of the them is not allergic to it Solution Let A, B, and C denote the events the first, second and third patients, respectively, are allergic to penicillin. Hence a) P (A and B and C) = P(A) P(B) P(C) = (.20) (.20) (.20) = .008 b) Let us define the following events: G = all three patients are allergic & H = at least one patient is not allergic. P(G) = P(A and B and C) = .008. Therefore, P(H) = 1 – P(G) = 1 - .008 = .992 by using the complementary event rule A = the first fire detector fails to go off during a fire B = the second fire detector fails to go off during a fire Then, the joint probability of A and B is P(A and B) = P(A) P(B) = (.02)(.02) = .0004 4-31 The probability that a patient is allergic to penicillin is .20. Suppose this drug is administered to three patients a) b) Solution STAT 3038 An office building has two fire detectors. The probability is .02 that any fire detector of this type will fail to go off during a fire. Find the probability that both of these fire detectors will fail to go off in case of a fire Dr. Yingfu (Frank) Li STAT 3038 4-32 Dr. Yingfu (Frank) Li 8 4.5 Union of Events & Additional Rule Joint Probability of Mutually Exclusive Events The joint probability of two mutually exclusive events is always zero. If A and B are two mutually exclusive events, then P(A and B) = 0 Example 4-25 Consider the following two events for an application filed by a person to obtain a car loan: A = event that the loan application is approved R = event that the loan application is rejected Let A and B be two events defined in a sample space. The union of events A and B is the collection of all outcomes that belong either to A or to B or to both A and B and is denoted by A or B (or AᴗB) Additional Rule P(A or B) = P(A) + P(B) - P(A and B) For mutually exclusive events A and B, we have a simpler formula P(A or B) = P(A) + P(B) What is the joint probability of A and R? The two events A and R are mutually exclusive. Either the loan application will be approved or it will be rejected. Hence, P(A and R) = 0 4-33 STAT 3038 Dr. Yingfu (Frank) Li A STAT 3038 Example 4-26 Let us define the following events: M = a senior citizen is a male F = a senior citizen is a female A = takes at least one medicine B = does not take any medicine STAT 3038 Dr. Yingfu (Frank) Li Example 4-27 A senior citizen center has 300 members. Of them, 140 are male, 210 take at least one medicine on a permanent basis, and 95 are male and take at least one medicine on a permanent basis. Describe the union of the events “male” and “take at least one medicine on a permanent basis.” Solution 4-34 B A university president has proposed that all students must take a course in ethics as a requirement for graduation. Three hundred faculty members and students from this university were asked about their opinion on this issue. Table 4.9 gives a two-way classification of the responses of these faculty members and students. Find the probability that one person selected at random from these 300 persons is a faculty member or is in favor of this proposal. The union of the events “male” and “take at least one medicine” includes those senior citizens who are either male or take at least one medicine or both. The number of such senior citizen is 140 + 210 – 95 = 255 4-35 Dr. Yingfu (Frank) Li STAT 3038 4-36 Dr. Yingfu (Frank) Li 9 Example 4-27: Solution Example 4-28 Let us define the following events: A = the person selected is a faculty member B = the person selected is in favor of the proposal From the information in the Table 4.9, P(A) = 70/300 = .2333 P(B) = 135/300 = .4500 P(A and B) = P(A) P(B | A) = (70/300)(45/70) = .1500 In a group of 2500 persons, 1400 are female, 600 are vegetarian, and 400 are female and vegetarian. What is the probability that a randomly selected person from this group is a male or vegetarian? First try to create a two-way classification table Using the addition rule, we obtain P(A or B) = P(A) + P(B) – P(A and B) = .2333 + .4500 – .1500 = .5333 STAT 3038 4-37 Dr. Yingfu (Frank) Li 4-38 STAT 3038 Example 4-29 Addition Rule for Mutually Exclusive Events A university president has proposed that all students must take a course in ethics as a requirement for graduation. Three hundred faculty members and students from this university were asked about their opinion on this issue. What is the probability that a randomly selected person from these 300 faculty members and students is in favor of the proposal or is neutral? The probability of the union of two mutually exclusive events A and B is P(A or B) = P(A) + P(B) Example 4-30 4-39 Dr. Yingfu (Frank) Li STAT 3038 Consider the experiment of rolling a die twice. Find the probability that the sum of the numbers obtained on two rolls is 5, 7, or 10 Solution STAT 3038 Dr. Yingfu (Frank) Li P(sum is 5 or 7 or 10) = P(sum is 5) + P(sum is 7) + P(sum is 10) = 4/36 + 6/36 + 3/36 = 13/36 = .3611 4-40 Dr. Yingfu (Frank) Li 10 4.6 Counting Rule Counting Rule: If an experiment consists of three steps and if the first step can result in m outcomes, the second step in n outcomes, and the third step in k outcomes, then the total outcomes for the experiment = m n k Examples Factorials & Combinations Toss 2 (3, 4, 5, …) coins Roll 2 (red & blue) dice. Your outfits (T-shirt, jeans, shoes, etc.) Example 4-33 Dr. Yingfu (Frank) Li STAT 3038 Combinations n Cx STAT 3038 x!(n x)! where n!, x!, and (n-x)! are read as “n factorial,” “x factorial,” “n minus x factorial,” respectively. Another way to look at the combination Combinations give the number of ways x elements can be selected from n elements. The notation used to denote the total number of combinations is n C x , which is read as “the number of combinations of n elements selected x at a time” How many ways to divide a big group of n elements into two small groups, one consisting x elements and the other n – x elements nCn-1 = n; nC1 = n; nCn = 1; nC0 = 1 The order of elements selected is not important 4-43 4-42 Dr. Yingfu (Frank) Li Examples of Combinations The number of combinations for selecting x from n distinct elements is given by the formula n! By definition, 0! = 1 Examples: 5! = ?, 2! = ?, (5 – 2)! = 3!, (5 – 2)! ≠ 5! – 2! A prospective car buyer can choose between a fixed and a variable interest rate and can also choose a payment period of 36 months, 48 months, or 60 months. How many total outcomes are possible? Solution: Total outcomes = 2 x 3 = 6 4-41 STAT 3038 The symbol n!, read as “n factorial,” represents the product of all the integers from n to 1. In other words, n! = n(n - 1)(n – 2)(n – 3) · · · 3 · 2 · 1 Dr. Yingfu (Frank) Li STAT 3038 Example 4-39: An ice cream parlor has six flavors of ice cream. Kristen wants to buy two flavors of ice cream. If she randomly selects two flavors out of six, how many combinations are there? Example 4-40: Three members of a jury will be randomly selected from five people. How many different combinations are possible? Example 4-41: Marv & Sons advertised to hire a financial analyst. The company has received applications from 10 candidates who seem to be equally qualified. The company manager has decided to call only 3 of these candidates for an interview. If she randomly selects 3 candidates from the 10, how many total selections are possible? 4-44 Dr. Yingfu (Frank) Li 11 Case Study: Probability of Winning the Jackpot Both Powerball and Mega Millions games operate on a similar premise. There are two bins - one containing white balls, and one containing red (Powerball) or gold (Mega Millions) balls. When a player fills out a ticket, he or she selects five numbers from the set of white balls (1–59 for Powerball, 1–56 for Mega Millions) and one number from the set of red (1–35) or gold (1–46) balls, depending on the game. Prizes awarded to players are based on how many balls of each color are matched. If all five white ball numbers and the colored ball number are matched, the player wins the jackpot. If more than one player matches all of the numbers, then the jackpot is divided among them. The following table lists the various prizes for the Mega Millions lottery. Permutations Permutations give the total selections of x element from n (different) elements in such a way that the order of selections is important. The notation used to denote the permutations is n Px , which is read as “the number of permutations of selecting x elements from n elements.” Permutations are also called arrangements In permutation, the order of elements selected is important Permutations Formula The following formula is used to find the number of permutations or arrangements of selecting x items out of n items. Note that here, the n items should all be different. n 4-45 STAT 3038 Dr. Yingfu (Frank) Li Px n! (n x )! 4-46 STAT 3038 Example 4-42 Summary A club has 20 members. They are to select three office holders – president, secretary, and treasurer – for next year. They always select these office holders by drawing 3 names randomly from the names of all members. The first person selected becomes the president, the second is the secretary, and the third one takes over as treasurer. Thus, the order in which 3 names are selected from the 20 names is important. Find the total arrangements of 3 names from these 20. Solution: n = 20, x = 3 n Px n! 20! 20! 6840 (n x )! (20 3)! 17! Sample space and two definitions of probability Conditional probability Important concepts Important rules Dr. Yingfu (Frank) Li STAT 3038 Mutually exclusive & independent Complementary rule: Additional rule: Multiplication rule: You all know how to count? 4-47 Directly from table or use formula STAT 3038 Dr. Yingfu (Frank) Li Remember the F-test! Why not let computer or calculator do the job? 4-48 Dr. Yingfu (Frank) Li 12