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
5A-1 Chapter 5A Probability (Part 1) Random Experiments Probability Rules of Probability Independent Events McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 5A-3 Random Experiments Sample Space • A random experiment is an observational process whose results cannot be known in advance. • The set of all outcomes (S) is the sample space for the experiment. • A sample space with a countable number of outcomes is discrete. 5A-4 Random Experiments Sample Space • For example, when CitiBank makes a consumer loan, the sample space is: S = {default, no default} • The sample space describing a Wal-Mart customer’s payment method is: S = {cash, debit card, credit card, check} 5A-5 Random Experiments Sample Space • For a single roll of a die, the sample space is: S = {1, 2, 3, 4, 5, 6} • When two dice are rolled, the sample space is the following pairs: S = {(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2), (2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6), (5,1), (5,2), (5,3), (5,4), (5,5), (5,6), (6,1), (6,2), (6,3), (6,4), (6,5), (6,6)} 5A-6 Random Experiments Events • An event is any subset of outcomes in the sample space. • A simple event or elementary event, is a single outcome. • A discrete sample space S consists of all the simple events (Ei): S = {E1, E2, …, En} 5A-7 Random Experiments Events • Consider the random experiment of tossing a balanced coin. What is the sample space? S = {H, T} • What are the chances of observing a H or T? • These two elementary events are equally likely. • When you buy a lottery ticket, the sample space S = {win, lose} has only two events. • Are these two events equally likely to occur? 5A-8 Random Experiments Events • A compound event consists of two or more simple events. • For example, in a sample space of 6 simple events, we could define the compound events A = {E1, E2} B = {E3, E5, E6} • These are displayed in a Venn diagram: 5A-9 Random Experiments Events • Many different compound events could be defined. • Compound events can be described by a rule. • For example, the compound event A = “rolling a seven” on a roll of two dice consists of 6 simple events: S = {(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)} 5A-10 Probability Definitions • The probability of an event is a number that measures the relative likelihood that the event will occur. • The probability of event A [denoted P(A)], must lie within the interval from 0 to 1: 0 < P(A) < 1 If P(A) = 0, then the event cannot occur. If P(A) = 1, then the event is certain to occur. 5A-11 Probability Definitions • In a discrete sample space, the probabilities of all simple events must sum to unity: P(S) = P(E1) + P(E2) + … + P(En) = 1 • For example, if the following number of purchases were made by credit card: 32% debit card: 20% cash: 35% P(cash) = .35 check: 18% P(check) = .18 Sum = 100% Sum = 1.0 P(credit card) = .32 Probability P(debit card) = .20 5A-12 Probability Law of Large Numbers • The law of large numbers is an important probability theorem that states that a large sample is preferred to a small one. • Flip a coin 50 times. We would expect the proportion of heads to be near .50. • However, in a small finite sample, any ratio can be obtained (e.g., 1/3, 7/13, 10/22, 28/50, etc.). • A large n may be needed to get close to .50. • Consider the results of 10, 20, 50, and 500 coin flips. 5A-13 Probability 5A-14 Rules of Probability Complement of an Event • The complement of an event A is denoted by A′ and consists of everything in the sample space S except event A. 5A-15 Rules of Probability Complement of an Event • Since A and A′ together comprise the entire sample space, P(A) + P(A′ ) = 1 • The probability of A′ is found by P(A′ ) = 1 – P(A) • For example, The Wall Street Journal reports that about 33% of all new small businesses fail within the first 2 years. The probability that a new small business will survive is: P(survival) = 1 – P(failure) = 1 – .33 = .67 or 67% 5A-16 Rules of Probability Odds of an Event • The odds in favor of event A occurring is Odds = P( A) P( A) P( A ') 1 P( A) • Odds are used in sports and games of chance. • For a pair of fair dice, P(7) = 6/36 (or 1/6). What are the odds in favor of rolling a 7? P(rolling seven) 1/ 6 1/ 6 1 Odds = 1 P(rolling seven) 1 1/ 6 5/ 6 5 5A-17 Rules of Probability Odds of an Event • On the average, for every time a 7 is rolled, there will be 5 times that it is not rolled. • In other words, the odds are 1 to 5 in favor of rolling a 7. • The odds are 5 to 1 against rolling a 7. • In horse racing and other sports, odds are usually quoted against winning. 5A-18 Rules of Probability Odds of an Event • If the odds against event A are quoted as b to a, then the implied probability of event A is: a P(A) = ab • For example, if a race horse has a 4 to 1 odds against winning, the P(win) is a 1 1 0.20 or 20% P(win) = a b 4 1 5 5A-19 Rules of Probability Union of Two Events • The union of two events consists of all outcomes in the sample space S that are contained either in event A or in event B or both (denoted A B or “A or B”). may be read as “or” since one or the other or both events may occur. 5A-20 Rules of Probability Union of Two Events • For example, randomly choose a card from a deck of 52 playing cards. • If Q is the event that we draw a queen and R is the event that we draw a red card, what is Q R? • It is the possibility of drawing either a queen (4 ways) or a red card (26 ways) or both (2 ways). 5A-21 Rules of Probability Intersection of Two Events • The intersection of two events A and B (denoted A B or “A and B”) is the event consisting of all outcomes in the sample space S that are contained in both event A and event B. may be read as “and” since both events occur. This is a joint probability. 5A-22 Rules of Probability Intersection of Two Events • For example, randomly choose a card from a deck of 52 playing cards. • If Q is the event that we draw a queen and R is the event that we draw a red card, what is Q R? • It is the possibility of getting both a queen and a red card (2 ways). 5A-23 Rules of Probability General Law of Addition • The general law of addition states that the probability of the union of two events A and B is: P(A B) = P(A) + P(B) – P(A B) When you add So, you have A and B the P(A) and to subtract P(B) together, P(A B) to you count the avoid overA B P(A and B) stating the twice. probability. 5A-24 Rules of Probability General Law of Addition • For the card example: P(Q) = 4/52 (4 queens in a deck) P(R) = 26/52 (26 red cards in a deck) P(Q R) = 2/52 (2 red queens in a deck) P(Q R) = P(Q) + P(R) – P(Q Q) Q and R = 2/52 = 4/52 + 26/52 – 2/52 = 28/52 = .5385 or 53.85% Q 4/52 R 26/52 5A-25 Rules of Probability Mutually Exclusive Events • Events A and B are mutually exclusive (or disjoint) if their intersection is the null set () that contains no elements. If A B = , then P(A B) = 0 Special Law of Addition • In the case of mutually exclusive events, the addition law reduces to: P(A B) = P(A) + P(B) 5A-26 Rules of Probability Conditional Probability • The probability of event A given that event B has occurred. • Denoted P(A | B). The vertical line “ | ” is read as “given.” P( A B) P( A | B) P( B) for P(B) > 0 and undefined otherwise 5A-27 Rules of Probability Conditional Probability • Consider the logic of this formula by looking at the Venn diagram. The sample space is P( A B) restricted to B, an event P( A | B) P( B) that has occurred. A B is the part of B that is also in A. The ratio of the relative size of A B to B is P(A | B). 5A-28 Rules of Probability Example: High School Dropouts • Of the population aged 16 – 21 and not in college: Unemployed 13.5% High school dropouts 29.05% Unemployed high school dropouts 5.32% • What is the conditional probability that a member of this population is unemployed, given that the person is a high school dropout? 5A-29 Rules of Probability Example: High School Dropouts • First define U = the event that the person is unemployed D = the event that the person is a high school dropout P(D) = .2905 P(UD) = .0532 P(U) = .1350 P(U D) .0532 P(U | D) .1831 or 18.31% P ( D) .2905 • P(U | D) = .1831 > P(U) = .1350 • Therefore, being a high school dropout is related to being unemployed. 5A-30 Independent Events • Event A is independent of event B if the conditional probability P(A | B) is the same as the marginal probability P(A). • To check for independence, apply this test: If P(A | B) = P(A) then event A is independent of B. • Another way to check for independence: If P(A B) = P(A)P(B) then event A is independent of event B since P(A | B) = P(A B) = P(A)P(B) = P(A) P(B) P(B) 5A-31 Independent Events Example: Television Ads • Out of a target audience of 2,000,000, ad A reaches 500,000 viewers, B reaches 300,000 viewers and both ads reach 100,000 viewers. 300, 000 500, 000 P( B) .15 P( A) .25 2, 000, 000 2, 000, 000 100, 000 P( A B) .05 2, 000, 000 • What is P(A | B)? P( A B) .05 .3333 or 33% P( A | B) .30 P( B) .15 5A-32 Independent Events Example: Television Ads • So, P(ad A) = .25 P(ad B) = .15 P(A B) = .05 P(A | B) = .3333 • Are events A and B independent? • P(A | B) = .3333 ≠ P(A) = .25 • P(A)P(B)=(.25)(.15)=.0375 ≠ P(A B)=.05 5A-33 Independent Events Dependent Events • When P(A) ≠ P(A | B), then events A and B are dependent. • For dependent events, knowing that event B has occurred will affect the probability that event A will occur. • Statistical dependence does not prove causality. • For example, knowing a person’s age would affect the probability that the individual uses text messaging but causation would have to be proven in other ways.