Chapter 6 Probability 2007 1 6 1 Assigning
Chapter 6 Probability 2007會計資訊系統計學(一)上課投影片 1
6. 1 Assigning probabilities to Events • Random experiment(隨機實驗) – a random experiment is a process or course of action, whose outcome is uncertain. • Examples Experiment Outcomes Flip a coin Heads, Tails Exam Marks Numbers: 0, 1, 2, . . . , 100 Assembly Time t > 0 seconds Course Grades F, D, C, B, A, A+ 2007會計資訊系統計學(一)上課投影片 2
6. 1 Assigning probabilities to Events • Performing the same random experiment repeatedly, may result in different outcomes, therefore, the best we can do is consider the probability of occurrence of a certain outcome. • To determine the probabilities we need to define and list the possible outcomes first. 2007會計資訊系統計學(一)上課投影片 3
Probabilities • List the outcomes of a random experiment… • This list must be exhaustive(周延) i. e. ALL possible outcomes included. Die roll {1, 2, 3, 4, 5} Die roll {1, 2, 3, 4, 5, 6} • The list must be mutually exclusive(互斥) i. e. no two outcomes can occur at the same time. 2007會計資訊系統計學(一)上課投影片 4
Sample Space • A list of exhaustive and mutually exclusive outcomes is called a sample space(樣本 空間) and is denoted by S. • The outcomes are denoted by O 1, O 2, …, Ok • Using notation from set theory, we can represent the sample space and its outcomes as: 2007會計資訊系統計學(一)上課投影片 • S = {O , …, O } 5
Sample Space: S = {O 1, O 2, …, Ok} O 1 O 2 Sample Space a sample space of a random experiment is a list of all possible outcomes of the experiment. The outcomes must be mutually exclusive and exhaustive. 2007會計資訊系統計學(一)上課投影片 Simple Events The individual outcomes are called simple Event(事件) events. An event is any collection Simple events of one or more simple eventscannot be further decomposed into constituent Our objective is to outcomes. determine P(A), the probability that event A will occur. 6
Requirements of Probabilities • Given a sample space S = {O 1, O 2, …, Ok}, the probabilities assigned to the outcome must satisfy these requirements: • The probability of any outcome is between 0 and 1 i. e. 0 ≤ P(Oi) ≤ 1 for each i, and • The sum of the probabilities of all the outcomes equals 1 P(O i i) represents i. e. P(O 1)the+probability P(O 2) of+ outcome … + P(O k) = 1 • Probability of an event: The probability P(A) of 2007會計資訊系統計學(一)上課投影片 7
Approaches to Assigning Probabilities • There are three ways to assign a probability, P(Oi), to an outcome, Oi, namely: • Classical approach(古典法): make certain assumptions (such as equally likely, independence) about situation. • Relative frequency(相對次數法): assigning probabilities based on experimentation or historical data. • Subjective approach(主觀法): Assigning probabilities based on the assignor’s judgment. 2007會計資訊系統計學(一)上課投影片 8
Classical Approach • If an experiment has n possible outcomes, this method would assign a probability of 1/n to each outcome. • Experiment: Rolling a die Sample Space: S = {1, 2, 3, 4, 5, 6} Probabilities: Each sample point has a 1/6 chance of occurring. 2007會計資訊系統計學(一)上課投影片 9
Classical Approach • Experiment: Rolling dice Sample Space: S = {2, 3, …, 12} Probability Examples: What are the underlying, unstated assumptions? ? P(2) = 1/36 P(6) = 5/36 P(10) = 3/36 2007會計資訊系統計學(一)上課投影片 1 2 3 4 5 6 4 5 6 7 8 9 4 5 6 7 6 7 8 9 8 9 10 11 12 10
Relative Frequency Approach • Bits & Bytes Computer Shop tracks the number of desktop computer systems it sells over a month (30 days): Desktops Sold • For example, 10 days out of 30 2 desktops were sold. # of Days 0 1 1 2 2 10 3 12 • From this we can construct 4 5 the probabilities of an event (i. e. the # of desktop sold on a given day)… 2007會計資訊系統計學(一)上課投影片 11
Relative Frequency Approach Desktops Sold # of Days Desktops Sold 0 1 1/30 =. 03 1 2 2/30 =. 07 2 10 10/30 =. 33 3 12 12/30 =. 40 4 5 5/30 =. 17 ∑ = 1. 00 • “There is a 40% chance Bits & Bytes will sell 3 desktops on any given day” 2007會計資訊系統計學(一)上課投影片 12
Subjective Approach • “In the subjective approach we define probability as the degree of belief that we hold in the occurrence of an event” • E. g. weather forecasting’s “P. O. P. ” • “Probability of Precipitation” (or P. O. P. ) is defined in different ways by different forecasters, but basically it’s a subjective probability based on past observations combined with current weather conditions. • POP 60% – based on current conditions, there is a 13 60% chance of rain (say). 2007會計資訊系統計學(一)上課投影片
Events & Probabilities • An event(事件) is a collection or set of one or more outcomes in a sample space. • An individual outcome of a sample space is called a simple event(簡單事件), while • A collection of two or more outcomes is called a complex event(複合事件). • Roll of a die: S = {1, 2, 3, 4, 5, 6} Simple event: the number “ 3” will be rolled Complex event: an even number (one of 2, 4, or 6) will be rolled 2007會計資訊系統計學(一)上課投影片 14
Events & Probabilities • The probability of an event is the sum of the probabilities of the simple events that constitute the event. • E. g. (assuming a fair die) S = {1, 2, 3, 4, 5, 6} and P(1) = P(2) = P(3) = P(4) = P(5) = P(6) = 1/6 • Then: P(EVEN) = P(2) + P(4) + P(6) = 1/6 + 2007會計資訊系統計學(一)上課投影片 15
Interpreting Probability • One way to interpret probability is this: • If a random experiment is repeated an infinite number of times, the relative frequency for any given outcome is the probability of this outcome. • For example: The probability of heads in flip of a balanced coin is. 5, determined using the classical approach. The probability is interpreted as being the longterm relative frequency of heads if the coin is 2007會計資訊系統計學(一)上課投影片 16
6. 2 Joint, Marginal, and Conditional Probability • We study methods to determine probabilities of events that result from combining other events in various ways. • There are several types of combinations and relationships between events: – Complement event(互補事件、餘事件) – Intersection of events(事件的交集) – Union of events(事件的聯集) – Mutually exclusive events(互斥事件) – Dependent or independent events(相依、獨立 2007會計資訊系統計學(一)上課投影片 17
Basic Relationships of Events Complement of Event A Ac Intersection of Events A 2007會計資訊系統計學(一)上課投影片 B Union of Events A B Mutually Exclusive Events A B 18
Complement of an Event • The complement of event A (互補事件、 餘事件) is defined to be the event consisting of all sample points that are “not in A”. • Complement of A is denoted by Ac • The Venn diagram below illustrates the concept of a complement. c A A c • P(A) + P(A ) = 1 • E. g. dice: 2007會計資訊系統計學(一)上課投影片 19
Intersection (交集) of Two Events • The intersection of events A and B is the set of all sample points that are in both A and B. • The intersection is denoted: (A and B) or (A B) • The joint probability of A and B is the probability of the intersection of A and B, 2007會計資訊系統計學(一)上課投影片 A B 20
Intersection • Example – The number of spots turning up when a six-side die is tossed is observed. Consider the following events. – A: The number observed is at most 2. – B: The number observed is an even number. – Determine the probability of the intersection event A and B. 3 1 A 2 4 2007會計資訊系統計學(一)上課投影片 A B B 6 P(A B) = P(2) = 1/6 5 21
Mutually Exclusive Events(互斥事 件) • If and A and B are mutually exclusive the two events cannot occur together. This means that A B A B= Mutually exclusive; no points in common. • When two events are mutually exclusive, their joint probability is P(A B) = P( ) = 0 2007會計資訊系統計學(一)上課投影片 22
Intersection • Example 6. 1 – Why are some mutual fund managers more successful than others? One possible factor is where the manager earned his or her MBA. – The following table compares mutual fund performance against the ranking of the school where the fund manager earned their MBA: Mutual fund outperform the market Mutual fund doesn’t outperform the market Top 20 MBA program . 11 . 29 Not top 20 MBA program . 06 . 54 2007會計資訊系統計學(一)上課投影片 23
Intersection • Example 6. 1 – continued – The joint probability of [mutual fund outperform…] and […from a top 20 P(A …]1 = B 1). 11 – The joint probability of [mutual fund outperform…] and […not from a top 20 …] =. 06 Mutual fund outperforms the market (B 1) Mutual fund doesn’t outperform the market (B 2) Top 20 MBA program (A 1) . 11 . 29 Not top 20 MBA program (A 2) . 06 . 54 2007會計資訊系統計學(一)上課投影片 24
Intersection • Example 6. 1 – continued – The joint probability of B 1) [mutual fund outperform…] and […from a top 20 P(A …]1 =. 11 – The joint probability of [mutual fund outperform…] and […not from a top. P(A 202 …]B 1) =. 06 Mutual fund outperforms the market (B 1) Mutual fund doesn’t outperform the market (B 2) Top 20 MBA program (A 1) . 11 . 29 Not top 20 MBA program (A 2) . 06 . 54 2007會計資訊系統計學(一)上課投影片 25
Marginal Probability(邊際機率) • Marginal probabilities are computed by adding across rows and down columns; that is they are calculated in the margins of the table: Mutual fund Marginal outperforms the market (B 1) Top 20 MBA program (A 1) Not top 20 MBA program (A 2) doesn’t outperform the market (B 2) Prob. P(Ai) P(A 1 B 1)+ P(A 1 B 2) = P(A 1) P(A 2 B 1)+ P(A 2 B 2) = P(A 2) Marginal Probability P(Bj) 2007會計資訊系統計學(一)上課投影片 26
Marginal Probability • These probabilities are computed by adding across rows and down columns Mutual fund outperforms the market (B 1) Mutual fund doesn’t outperform the market (B 2) Marginal Prob. P(Ai) Top 20 MBA program (A 1) . 11 + . 29 =. 40 Not top 20 MBA program (A 2) . 06 + . 54 =. 60 Marginal Probability P(Bj) Eg. The probability a fund manager isn’t from a top school = P(A 2) =. 06 +. 54 =. 60 2007會計資訊系統計學(一)上課投影片 27
Marginal Probability • These probabilities are computed by adding across rows and down columns Top 20 MBA program (A 1) Not top 20 MBA program (A 2) Marginal Probability P(Bj) 2007會計資訊系統計學(一)上課投影片 Mutual fund outperforms the market (B 1) Mutual fund doesn’t outperform the market (B 2) Marginal Prob. P(Ai) P(A 1 B 1) + P(A 2 B 1 = P(B 1) P(A 1 B 2) + P(A 2 B 2 = P(B 2) . 40. 60 28
Marginal Probability • These probabilities are computed by adding across rows and down columns Mutual fund outperforms the market (B 1) Mutual fund doesn’t outperform the market (B 2) Marginal Prob. P(Ai) Top 20 MBA program (A 1) . 11 . 29 . 40 + + Not top 20 MBA program (A 2) . 06 . 54 . 60 Marginal Probability P(Bj) . 17 . 83 1 Eg. The probability a fund outperforms the market = P(B 1) =. 11 +. 06 =. 17 2007會計資訊系統計學(一)上課投影片 BOTH margins must add to 1 (useful error check) 29
Conditional Probability • Conditional probability (條件機率) is used to determine how two events are related; that is, we can determine the probability of one event given the occurrence of another related event. • Conditional probabilities are written as P(A | B) and read as “the probability of A given B” and is calculated as: 2007會計資訊系統計學(一)上課投影片 30
Conditional Probability • Again, the probability of an event given that another event has occurred is called a conditional probability… Note how “A given B” and “B given A” are related… 2007會計資訊系統計學(一)上課投影片 31
Conditional Probability • Example 6. 2 What’s the probability that a fund will outperform the market given that the manager graduated from a top-20 MBA program? – Recall: – A 1 = Fund manager graduated from a top-20 MBA program – A 2 = Fund manager did not graduate from a top-20 MBA program – B 1 = Fund outperforms the market – B 2 = Fund does not outperform the market 2007會計資訊系統計學(一)上課投影片 32
Conditional Probability • We want to calculate P(B 1 | A 1) A 1 A 2 P(Bj) B 1 B 2 P(Ai) . 11 . 29 . 40 . 06 . 54 . 60 . 17 . 83 1. 00 New information reduces the relevan sample space to the 40% of event A 1. Thus, there is a 27. 5% chance that a fund will outperform the market given that the manager graduated from a top-20 MBA program. 2007會計資訊系統計學(一)上課投影片 33
Independence • One of the objectives of calculating conditional probability is to determine whether two events are related. • In particular, we would like to know whether they are independent(獨立), that is, if the probability of one event is not affected by the occurrence of the other event. • Two events A and B are said to be independent if P(A|B) = P(A) or P(B|A) = P(B) 2007會計資訊系統計學(一)上課投影片 34
Independence • Example 6. 3 We saw that P(B 1 | A 1) =. 275 The marginal probability for B 1 is: P(B 1) = 0. 17 Since P(B 1|A 1) ≠ P(B 1), B 1 and A 1 are not independent events. • Stated another way, they are dependent( 相依). That is, the probability of one event (B 1) is affected by the occurrence of the 2007會計資訊系統計學(一)上課投影片 35
Dependent and independent events Additional Example The personnel department of an insurance company has compiled data regarding promotion, classified by gender. Is promotion and gender dependent on one another? Events of interest: M 1: a manager is a male M 2: a manager is a female 2007會計資訊系統計學(一)上課投影片 A 1: a manager is prom A 2: a manager is not p 36
Dependent and independent events • If P(A 1|M 1)=P(A 1), there is no sex discrimination in awarding promotion. P(A 1) = [Number of promotions] /[total number of managers] = 54 /270 =. 20 P(A 1|M 1) = [Number of males promoted] / [Number of male managers] = 46 / 230 =. 20 46 230 54 270 Conclusion: Events A and M are independent. There is no sex discrimination in awarding promotion 2007會計資訊系統計學(一)上課投影片 37
Union (聯集) of Two Events • The union of two events A and B, is the event containing all sample points that are in A or B or both. • Union of A and B is denoted: (A or B) or (A B) A 2007會計資訊系統計學(一)上課投影片 B 38
Union • Example – The number of spots turning up when a sixside die is tossed is observed. Consider the following events. – A: The number observed is at most 2. – B: The number observed is an even number. – Determine the probability of the union event A or B. 2 4 2007會計資訊系統計學(一)上課投影片 A B 3 1 A B 6 5 P(A B) = P(1) + P(2) + P(4) + P(6) = 4/6 39
Union of Two Events • We can use this concept to answer questions like: • Example 6. 4 Determine the probability that a fund outperforms the market (B 1) or the manager graduated from a top-20 MBA program (A 1). i. e. P(A 1 B 1) 2007會計資訊系統計學(一)上課投影片 40
Union • Solution Mutual fund outperforms the market (B 1) Mutual fund doesn’t outperform the market (B 2) Top 20 MBA program (A 1) . 11 . 29 Not top 20 MBA program 2) B P(A (A . 06 . 54 1 1) A 1 or B 1 occurs whenever either: A 1 and B 1 A 1 and B 2 occurs, A 2 and B 1 occurs. = P(A 1 B 1) + P(A 1 B 2) + P(A 2 =. 11 +. 29 +. 06 =. 46 Comment: P(A 1 B 1) = 1 – P(A 2 B 2) = 1 – 2007會計資訊系統計學(一)上課投影片 41
6. 3 Probability Rules and Trees • We present more methods to determine the probability of the intersection and the union of two events. • Three rules assist us in determining the probability of complex events from the probability of simple events. – Complement Rule(互補原則) – Multiplication Rule(乘法原則) – Addition Rule(加法原則) 2007會計資訊系統計學(一)上課投影片 42
Complement Rule (互補原則) • The complement of event A (互補事件、餘 事件) (denoted by AC) is the event that occurs when event A does not occur. • The probability of the complement event is calculated by P(AC) = 1 - P(A) A and AC consist of all the simple events in the sample space. Therefore, P(A) + P(AC) = 1 2007會計資訊系統計學(一)上課投影片 43
Complement Rule • Additional Example – revisited – The number of spots turning up when a six-side die is tossed is observed. Consider the following event. A: The number observed is at most 2. – Determine the probability of AC. 1 A 2 AC 3 6 4 2007會計資訊系統計學(一)上課投影片 5 44
Multiplication Rule (乘法原則) • The multiplication rule is used to calculate the joint probability of two events. It is based on the formula for conditional probability defined earlier: If we multiply both sides of the equation by P(B) we have: P(A B) = P(A | B) • P(B) Likewise, P(A B) = P(B | A) • P(A) If A and B are independent events, then P(A B) = P(A) • P(B) 2007會計資訊系統計學(一)上課投影片 45
Example 6. 5 • A graduate statistics course has seven male and three female students. The professor wants to select two students at random to help her conduct a research project. What is the probability that the two students chosen are female? • Let A represent the event that the first student is female • Let B represent the event that the second student is female 2007會計資訊系統計學(一)上課投影片 46
Example 6. 5 • Solution • P(A) = 3/10 =. 30 • What about the second student? • P(B|A) = 2/9 =. 22 • That is, the probability of choosing a female student given that the first student chosen is 2 (females) / 9 (remaining students) = 2/9 2007會計資訊系統計學(一)上課投影片 47
Example 6. 5 • What is the probability that the two students chosen are female? • Thus, we want to answer the question: what is P(A B) ? • P(A B) = P(A) • P(B|A) = (3/10)(2/9) = 6/90 =. 067 • “There is a 6. 7% chance that the professor will choose two female students from her grad class of 10. ” 48 2007會計資訊系統計學(一)上課投影片
Example 6. 6 • The professor in Example 6. 5 is unavailable. Her replacement will teach two classes. His style is to select one student at random and pick on him or her in the class. What is the probability that the two students chosen are female? • Let A represent the event that the first student is female • Let B represent the event that the second student is female. • Thus, we want to answer the question: what is 2007會計資訊系統計學(一)上課投影片 49
Example 6. 6 • Solution • P(A) = 3/10 =. 30 • What about the second class? • Because the same student in the first class can be picked again for the second class • P(B | A) = P(B) = 3/10 =. 30 2007會計資訊系統計學(一)上課投影片 50
Example 6. 6 • What is the probability that the two students chosen are female? • Thus, we want to answer the question: what is P(A B) ? • P(A B) = P(A) • P(B) = (3/10) = 9/100 =. 09 • “There is a 9% chance that the replacement professor will choose two female students from 51 his two classes. ” 2007會計資訊系統計學(一)上課投影片
Addition Rule (加法原則) For any two events A and B P(A B) = P(A) + P(B) - P(A B) P(A) =6/13 + A P(B) =5/13 _ P(A B) =3/13 P(A B) = 8/13 2007會計資訊系統計學(一)上課投影片 B A B 52
Addition Rule • Why do we subtract the joint probability P(A B) from the sum of the probabilities of A and B? P(A B) = P(A) + P(B) – P(A B) 2007會計資訊系統計學(一)上課投影片 53
Addition Rule • P(A 1) =. 11 +. 29 =. 40 • P(B 1) =. 11 +. 06 =. 17 • By adding P(A 1) plus P(B 1) we add P(A 1 B 1) twice. • To correct we subtract B 1 P(A 1 B 1) from P(A 1) + P(B 1). B 1 B 2 P(Ai) A 1. 11. 29. 40 A 1. 06. 54. 60 A 2. 17. 83 1. 00 P(Bj) P(A 1 B 1) = P(A 1) + P(B 1) –P(A 1 B 1) =. 40 +. 17 -. 11 =. 46 2007會計資訊系統計學(一)上課投影片 54
Example 6. 7 • In a large city, two newspapers are published, the Sun and the Post. The circulation departments report that: – 22% of the city’s households have a subscription to the Sun, – 35% subscribe to the Post, – 6% of all households subscribe to both newspapers. • What proportion of the city’s households subscribe to either newspaper? • That is, what is the probability of selecting a household at random that subscribes to the 2007會計資訊系統計學(一)上課投影片 55
Example 6. 7 • The circulation departments report that: 22% of the city’s households have a subscription to the Sun, 35% subscribe to the Post, 6% of all households subscribe to both newspapers. • P(Sun Post) = P(Sun) + P(Post) – P(Sun Post) =. 22 +. 35 –. 06 =. 51 • “There is a 51% probability that a randomly 2007會計資訊系統計學(一)上課投影片 56
Addition Rule and Multiplication Rule Additional Example – A stock market analyst feels that • the probability that a certain mutual fund will receive increased contributions from investors is 0. 6. • the probability of receiving increased contributions from investors if the stock market goes up becomes 0. 9. • there is a probability of 0. 5 that the stock market rises. – The events of interest are: A: The stock market rises; 2007會計資訊系統計學(一)上課投影片 57
Addition Rule and Multiplication Rule • Calculate the probabilities of the following scenarios – The the stock market rises and the mutual fund receives increased contribution P(A B). – Either the stock market rises or the mutual fund receives increased contribution P(A B). • Solution P(B) = 0. 6; P(B|A) = 0. 9; P(A) = 0. 5 P(A B) = P(A)P(B|A) = (. 5)(. 9) = 0. 45 P(A B) = P(A) + P(B) - P(A B) =. 5 +. 6 2007會計資訊系統計學(一)上課投影片 58
Addition Rule When A and B are mutually exclusive(互 斥), P(A B) = P(A) + P(B) - P(A B) A B B P(A B) = 0 2007會計資訊系統計學(一)上課投影片 59
Probability Trees(機率樹) • A probability tree is a simple and effective method of applying the probability rules by representing events in an experiment by lines. The resulting figure resembles a tree. • Example 6. 5 revisited (dependent events). – Find the probability of selecting two female students (without replacement), if there are 3 female students in a class of First 10. selection Second selection /9 2 = |F) This is P(F), the probability of selecting a female student first P(F ) /10 3 = P(F P( M |F) = /9 P( M )=7 /10 3 = ) M P(F| P( M| 2007會計資訊系統計學(一)上課投影片 7/9 M) = 6/9 This is P(F|F), the probability of selecting a female student second, given that a female was already chosen first 60
Probability Trees • The probabilities associated with any set of branches from one “node” must add up to 1. First selection Second selection /9 2 = ) F F| P(F ) /10 3 = )=7 2007會計資訊系統計學(一)上課投影片 P( M |F) = 2/9 + 7/9 = 9/9 = 1 7/9 /9 P( M Handy way to check your work ! P( /10 3/10 + 7/10 = 10/10 = 1 3 = ) M P(F| P( M| M) = 6/9 3/9 + 6/9 = 9/9 = 1 61
Probability Trees • Note: there is no requirement that the branches splits be binary, nor that the tree only goes two levels deep, or that there be the same number of splits at each sub node… 2007會計資訊系統計學(一)上課投影片 62
Probability Trees • At the ends of the “branches”, we calculate joint probabilities as the product of the individual probabilities on the preceding branches. Joint probabilities First selection Second selection /9 2 = ) P(FF)=(3/10)(2/9) F P(F ) P( M /10 3 = )=7 /10 P(F| P( M |F) = 7/9 P(FM)=(3/10)(7/9) /9 P(MF)=(7/10)(3/9) 6/9 P(MM)=(7/10)(6/9) 3 = ) M P(F| P( M| M) = 2007會計資訊系統計學(一)上課投影片 The joint probabilities at the ends of branches 63
Probability Trees • Example 6. 6 – revisited (independent events) – Find the probability of selecting two female students Joint probabilities (with replacement), if there are 3 female students in a F) = 0 FF P(FF)=(3/10) class of 10. ( P = /1 3 = ) F P(F| Second = P( M) = selection /10 3 P ( M|F )= ) = 7/ F ( P 10 First FM P(FM)=(3/10)(7/10) = ) F selection P( 10 / = 3 MF P(MF)=(7/10)(3/10) P( M = ) )=7 F|M ( P Second /10 = P( P( M| M) = selection M) =7 /10 MM P(MM)=(7/10) 2007會計資訊系統計學(一)上課投影片 64
Probability Trees • Example 6. 8 (conditional probabilities) – The pass rate of first-time takers for the bar exam at a certain jurisdiction is 72%. – Of those who fail, 88% pass their second attempt. – Candidates cannot take the exam more than twice. – Find the probability that a randomly selected law school graduate becomes a lawyer. 2007會計資訊系統計學(一)上課投影片 65
Probability Trees • Solution P(Pass) =. 72 2 . 7 = ) s as P(P P( F First exam ail) = . 28 8 l) =. 8 ai |F s s a P P( P( F ai l|Fai P(Fail Pass) =(. 28)(. 88)=. 2464 Second exam l) =. 12 P(Fail Fail) =(. 28)(. 12) =. 0336 P(Pass) = P(Pass on first exam) + P(Fail on first Pass on second “There is almost a 97% chance they will pass the bar” 2007會計資訊系統計學(一)上課投影片 66
Probability Trees • Additional Example: Dependent Events – From experience it is known that a machine is in good conditions 90% of the time. – When in good conditions, the machine produces a defective item 1% of the time. – When in bad conditions, the machine produces a defective 10% of the time. – An item selected at random from the current production run was found defective. What is the probability that the machine is in good conditions? 2007會計資訊系統計學(一)上課投影片 67
Probability Trees – dependent events • Solution – Let us define the two events of interest: A: The machine is in good conditions B: The item is defective – The unconditional probability that the machine is in good conditions is P(A) = 0. 9. – With the new information, the selected item is defective (event B has occurred) we can reevaluate this probability by calculating P(A|B). 2007會計資訊系統計學(一)上課投影片 68
Probability Trees – dependent events • Solution A. 9 0 = ) d P(A oo G P(A Po or )= 0. 1 1 0. 0 = ) A | P(B ctive Defe Non defe ctive P(B C |A) =. 99 1. 0 = ) A | P(B fective C A De Non P(B C defectiv e |A C) A: The machine is in good condition = 0. 9 C B: Item is defective 2007會計資訊系統計學(一)上課投影片 C Joint Probabilities A B P(A B) = 0. 009 A BC AC B P(AC B) = 0. 010 P(B) = 0. 019 AC B C 69
Probability Trees – dependent events Recall: The machine is in good conditions 90% of the time. However, with additional information (an item was defective), There is only 47% chance that the machine is in good conditions. 2007會計資訊系統計學(一)上課投影片 70
Probability Trees • Additional Example: Independent Events Consider the random experiment of flipping a coin twice. 2007會計資訊系統計學(一)上課投影片 71
Probability Trees Flipping a coin twice. H. 5 = ) P(H First flip P( T P Second flip P( T) T =. 5 H 5 T 5 . (H) = P )=. 2007會計資訊系統計學(一)上課投影片 5 . (H) = Joint probabilities H P(HH)=0. 25 Second flip P( T) T =. 5 P(HT)=0. 25 P(TH)=0. 25 P(TT)=0. 25 72
Probability Trees The probability that at least one heads faces up HH = P(HH or HT or TH) HT =. 25+. 25=. 75 TH The probability that Heads faces up TT in the first flip =P(HH or HT) =. 25 +. 25 =. 50 2007會計資訊系統計學(一)上課投影片 P(HH)=0. 25 P(HT)=0. 25 P(TH)=0. 25 P(TT)=0. 25 73
6. 4 Bayes’ Law(貝氏定理) • Bayes’ Law is named for Thomas Bayes, an eighteenth century mathematician. • Conditional probability is used to find the probability of an event given that one of its possible causes has occurred. • We use Bayes’ law to find the probability of the possible cause given that an event has occurred. • In its most basic form, if we know P(B | A), we can apply Bayes’ Law to determine P(A | B) P(B|A) 2007會計資訊系統計學(一)上課投影片 P(A|B) 74
Example 6. 9 – Pay $500 for MBA prep? ? • A survey of MBA students revealed that: • among GMAT scorers above 650, 52% took a preparatory course, • whereas among GMAT scorers of less than 650 only 23% took a preparatory course. • An applicant to an MBA program has determined that he needs a score of more than 650 to get into a certain MBA program, but he feels that his probability of getting that high a score is quite low: 10%. • He is considering taking a preparatory course that cost $500. • He is willing to do so only if his probability of 2007會計資訊系統計學(一)上課投影片 75
Example 6. 9 – Convert to Statistical Notation • Let A = GMAT score of 650 or more, • hence AC = GMAT score less than 650 • Our student has determined their probability of getting greater than 650 (without any prep course) as 10%, that is: P(A) =. 10 and it follows that P(AC) = 1 –. 10 =. 90 2007會計資訊系統計學(一)上課投影片 76
Example 6. 9 – Convert to Statistical Notation • Let B represent the event “take the prep course” • hence BC is “do not take the prep course” • From our survey information, we’re told that among GMAT scorers above 650, 52% took a preparatory course, that is: P(B | A) =. 52 (Probability of finding a student who took the prep course given that they scored above 650…) • But our student wants to know P(A | B), that is, what is the probability of getting more than 650 given that a prep course is taken? • If this probability is > 20%, he will spend $500 77 2007會計資訊系統計學(一)上課投影片
Example 6. 9 – Continued • We are trying to determine P(A | B), perhaps the definition of conditional probability from earlier will assist us… • We don’t know P(A B) and we don’t know P(B). • Perhaps if we construct a probability tree… 2007會計資訊系統計學(一)上課投影片 78
Example 6. 9 – Continued • In order to go from • P(B | A) = 0. 52 to P(A | B) = ? ? • we need to apply Bayes’ Law. Score ≥ 650 Prep Test Graphically: 10 A. AC . 90 B|A. 52 A B 0. 052 B C|A. 48 A BC 0. 048 C B|A . 23 B C|A C. 77 2007會計資訊系統計學(一)上課投影片 AC B 0. 207 Now we just need P(B) ! AC BC 0. 693 79
Example 6. 9 – Continued • In order to go from • P(B | A) = 0. 52 to P(A | B) = ? ? • we need to apply Bayes’ Law. Score ≥ 650 Prep Test Graphically: 10 A. AC . 90 B|A. 52 A B 0. 052 B C|A. 48 A BC 0. 048 C B|A . 23 B C|A C. 77 2007會計資訊系統計學(一)上課投影片 AC B 0. 207 Marginal Prob. P(B) = P(A B) + P(AC B) =. 259 AC BC 0. 693 80
Example 6. 9 – Continued • Thus, • The probability of scoring 650 or better doubles to 20. 1% when the prep course is taken. 2007會計資訊系統計學(一)上課投影片 81
Bayesian Terminology • The probabilities P(A) and P(AC) are called prior probabilities(事前機率) because they are determined prior to the decision about taking the preparatory course. • The conditional probability P(A | B) is called a posterior probability(事後機率) (or revised probability), because the prior probability is revised after the decision about taking the preparatory course. 2007會計資訊系統計學(一)上課投影片 82
Bayes’ Law • Example 6. 10 – Medical tests can produce false-positive or false-negative results. – A particular test is found to perform as follows: • Correctly diagnose “Positive” 70% of the time. • Correctly diagnose “Negative” 86. 5% of the time. – It is known that 1% of men in the general population suffer from the illness. – What is the probability that a man is suffering from the illness, if the test result were positive? 2007會計資訊系統計學(一)上課投影片 83
Bayes’ Law • Solution – Define the following events • • C = Has a disease (cancer) CC = Does not have the disease (cancer) PT = Positive test results NT = Negative test results – Build a probability tree 2007會計資訊系統計學(一)上課投影片 84
Bayes’ Law • Solution – Continued – The probabilities provided are: • P(C) =. 01 • P(PT|C) =. 70 • P(PT|CC) =. 135 P(CC) =. 99 P(NT|C)=. 30 P(NT|CC) =. 865 – The probability to be determined is 2007會計資訊系統計學(一)上課投影片 85
Bayes’ Law CC PT PT|C PT |C C C C|PT PCT|C PTPT|C CPT | T P PPT T PT C | PT P(C PT) 0 7 C. | PT ) = =. 0070 |C (C) P 1 0. = P(C C )= . 99 T P(P T|C )= C) T|C P(P P( N T |C C ) 2007會計資訊系統計學(一)上課投影片 + P( N . 30 35 1. = P(CC PT) =. 1337 P(PT) =. 1407 =. 8 65 86
Bayes’ Law Prior Likelihood probabilities ) |C T P ( ) P(C 2007會計資訊系統計學(一)上課投影片 1 0. = C )= . 99 P P( N T|C 0 7. = )= C) T|C P(P P( N T Posterior probabilities |C C ) . 30 35 1. = =. 8 65 87
- Slides: 87