Presentation is loading. Please wait.

Presentation is loading. Please wait.

6-1 2007 會計資訊系統計學 ( 一 ) 上課投影片 Probability Chapter 6.

Similar presentations


Presentation on theme: "6-1 2007 會計資訊系統計學 ( 一 ) 上課投影片 Probability Chapter 6."— Presentation transcript:

1 6-1 2007 會計資訊系統計學 ( 一 ) 上課投影片 Probability Chapter 6

2 6-2 2007 會計資訊系統計學 ( 一 ) 上課投影片 6.1Assigning probabilities to Events Random experiment (隨機實驗) –a random experiment is a process or course of action, whose outcome is uncertain. Examples ExperimentOutcomes Flip a coinHeads, Tails Exam MarksNumbers: 0, 1, 2,..., 100 Assembly Timet > 0 seconds Course GradesF, D, C, B, A, A+

3 6-3 2007 會計資訊系統計學 ( 一 ) 上課投影片 6.1Assigning 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.

4 6-4 2007 會計資訊系統計學 ( 一 ) 上課投影片 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. Die roll{ number less than 4 or even number} Die roll {odd number or even number}

5 6-5 2007 會計資訊系統計學 ( 一 ) 上課投影片 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, …, O k Using notation from set theory, we can represent the sample space and its outcomes as: S = {O 1, O 2, …, O k }

6 6-6 2007 會計資訊系統計學 ( 一 ) 上課投影片 Sample Space: S = {O 1, O 2,…,O k } 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. Simple Events The individual outcomes are called simple events. Simple events cannot be further decomposed into constituent outcomes. Event (事件) An event is any collection of one or more simple events Our objective is to determine P( A ), the probability that event A will occur. Our objective is to determine P( A ), the probability that event A will occur. O1O1 O2O2

7 6-7 2007 會計資訊系統計學 ( 一 ) 上課投影片 Given a sample space S = {O 1, O 2, …, O k }, the probabilities assigned to the outcome must satisfy these requirements: The probability of any outcome is between 0 and 1 i.e. 0 ≤ P(O i ) ≤ 1 for each i, and The sum of the probabilities of all the outcomes equals 1 i.e. P(O 1 ) + P(O 2 ) + … + P(O k ) = 1 Probability of an event: The probability P(A) of event A is the sum of the probabilities assigned to the simple events contained in A. Requirements of Probabilities P(O i ) represents the probability of outcome i

8 6-8 2007 會計資訊系統計學 ( 一 ) 上課投影片 Approaches to Assigning Probabilities There are three ways to assign a probability, P(O i ), to an outcome, O i, 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.

9 6-9 2007 會計資訊系統計學 ( 一 ) 上課投影片 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.

10 6-10 2007 會計資訊系統計學 ( 一 ) 上課投影片 Classical Approach Experiment: Rolling dice Sample Space: S = {2, 3, …, 12} Probability Examples: P(2) = 1/36 P(6) = 5/36 P(10) = 3/36 123456 1 234567 2 345678 3 456789 4 5678910 5 6789 11 6 789101112 What are the underlying, unstated assumptions??

11 6-11 2007 會計資訊系統計學 ( 一 ) 上課投影片 Relative Frequency Approach Bits & Bytes Computer Shop tracks the number of desktop computer systems it sells over a month (30 days): For example, 10 days out of 30 2 desktops were sold. From this we can construct the probabilities of an event (i.e. the # of desktop sold on a given day)… Desktops Sold# of Days 01 12 210 312 45

12 6-12 2007 會計資訊系統計學 ( 一 ) 上課投影片 Relative Frequency Approach “There is a 40% chance Bits & Bytes will sell 3 desktops on any given day” Desktops Sold# of DaysDesktops Sold 011/30 =.03 122/30 =.07 21010/30 =.33 31212/30 =.40 455/30 =.17 ∑ = 1.00

13 6-13 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 60% chance of rain (say).

14 6-14 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

15 6-15 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 + 1/6 + 1/6 = 3/6 = 1/2

16 6-16 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 long-term relative frequency of heads if the coin is flipped an infinite number of times.

17 6-17 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 (相依、獨立事件)

18 6-18 2007 會計資訊系統計學 ( 一 ) 上課投影片 Basic Relationships of Events Complement of Event Intersection of Events Union of Events Mutually Exclusive Events A AcAc AB AB AB

19 6-19 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 A c The Venn diagram below illustrates the concept of a complement. P(A) + P(A c ) = 1 E.g. dice: P(evens) + P(“not evens”) = 1 A AcAc

20 6-20 2007 會計資訊系統計學 ( 一 ) 上課投影片 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, i.e. P(A and B) or P(A  B) AB

21 6-21 2007 會計資訊系統計學 ( 一 ) 上課投影片 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. 5 3 1 2 4 6 B A A  B 4 6 1 22 2 P(A  B) = P(2) = 1/6 Intersection

22 6-22 2007 會計資訊系統計學 ( 一 ) 上課投影片 Mutually Exclusive Events (互斥事件) If and A and B are mutually exclusive the two events cannot occur together. This means that A  B =  When two events are mutually exclusive, their joint probability is P(A  B) = P(  ) = 0 Mutually exclusive; no points in common. AB

23 6-23 2007 會計資訊系統計學 ( 一 ) 上課投影片 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: Intersection 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

24 6-24 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.1 – continued –The joint probability of [mutual fund outperform…] and […from a top 20 …] =.11 –The joint probability of [mutual fund outperform…] and […not from a top 20 …] =.06 Intersection 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 P(A 1  B 1 )

25 6-25 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.1 – continued –The joint probability of [mutual fund outperform…] and […from a top 20 …] =.11 –The joint probability of [mutual fund outperform…] and […not from a top 20 …] =.06 Intersection 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 P(A 1  B 1 ) P(A 2  B 1 )

26 6-26 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 outperforms the market (B 1 ) Mutual fund doesn’t outperform the market (B 2 ) Marginal Prob. P(A i ) Top 20 MBA program (A 1 ) Not top 20 MBA program (A 2 ) Marginal Probability P(B j ) 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 )

27 6-27 2007 會計資訊系統計學 ( 一 ) 上課投影片 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(A i ) Top 20 MBA program (A 1 ).11.29.40 Not top 20 MBA program (A 2 ).06.54.60 Marginal Probability P(B j ) += + Eg. The probability a fund manager isn’t from a top school = P(A 2 ) =.06 +.54 =.60 =

28 6-28 2007 會計資訊系統計學 ( 一 ) 上課投影片 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(A i ) Top 20 MBA program (A 1 ).40 Not top 20 MBA program (A 2 ).60 Marginal Probability P(B j ) 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 )

29 6-29 2007 會計資訊系統計學 ( 一 ) 上課投影片 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(A i ) Top 20 MBA program (A 1 ).11.29.40 Not top 20 MBA program (A 2 ).06.54.60 Marginal Probability P(B j ).17.831 + Eg.The probability a fund outperforms the market = P(B 1 ) =.11 +.06 =.17 BOTH margins must add to 1 (useful error check) +

30 6-30 2007 會計資訊系統計學 ( 一 ) 上課投影片 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:

31 6-31 2007 會計資訊系統計學 ( 一 ) 上課投影片 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…

32 6-32 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 Thus, we want to know “what is P(B 1 | A 1 ) ?”

33 6-33 2007 會計資訊系統計學 ( 一 ) 上課投影片 Conditional Probability We want to calculate P(B 1 | A 1 ) Thus, there is a 27.5% chance that that a fund will outperform the market given that the manager graduated from a top-20 MBA program. B1B1 B2B2 P(A i ) A1A1.11.29.40 A2A2.06.54.60 P(B j ).17.831.00 New information reduces the relevant sample space to the 40% of event A 1.

34 6-34 2007 會計資訊系統計學 ( 一 ) 上課投影片 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)

35 6-35 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 other event (A 1 ).

36 6-36 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 A 1 : a manager is promoted M 2 : a manager is a female A 2 : a manager is not promoted Dependent and independent events

37 6-37 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 Conclusion: Events A and M are independent. There is no sex discrimination in awarding promotions. 46230 54 270 Dependent and independent events If P(A 1 |M 1 )=P(A 1 ), there is no sex discrimination in awarding promotion.

38 6-38 2007 會計資訊系統計學 ( 一 ) 上課投影片 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) AB

39 6-39 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 union event A or B. 5 3 1 2 4 6 B A 4 6 1 22 P(A  B) = P(1) + P(2) + P(4) + P(6) = 4/6 4 6 1 2 Union A  B

40 6-40 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 (B1) or the manager graduated from a top-20 MBA program (A1). i.e. P(A1  B1)

41 6-41 2007 會計資訊系統計學 ( 一 ) 上課投影片 Solution Union 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 A 1 or B 1 occurs whenever either: A 1 and B 1 occurs, A 1 and B 2 occurs, A 2 and B 1 occurs. P(A 1  B 1 ) = P(A 1  B 1 ) + P(A 1  B 2 ) + P(A 2  B 1 ) =.11 +.29 +.06 =.46 Comment: P(A 1  B 1 ) = 1 – P(A 2  B 2 ) = 1 –.54 =.46

42 6-42 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 (加法原則)

43 6-43 2007 會計資訊系統計學 ( 一 ) 上課投影片 Complement Rule (互補原則) The complement of event A (互補事件、餘事件) (denoted by A C ) is the event that occurs when event A does not occur. The probability of the complement event is calculated by P(A C ) = 1 - P(A) A and A C consist of all the simple events in the sample space. Therefore, P(A) + P(A C ) = 1

44 6-44 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 A C. Complement Rule A 1 2 4 5 6 3 ACAC

45 6-45 2007 會計資訊系統計學 ( 一 ) 上課投影片 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)

46 6-46 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 Thus, we want to answer the question: what is P(A  B) ?

47 6-47 2007 會計資訊系統計學 ( 一 ) 上課投影片 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

48 6-48 2007 會計資訊系統計學 ( 一 ) 上課投影片 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.”

49 6-49 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 P(A  B) ?

50 6-50 2007 會計資訊系統計學 ( 一 ) 上課投影片 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

51 6-51 2007 會計資訊系統計學 ( 一 ) 上課投影片 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)(3/10) = 9/100 =.09 “There is a 9% chance that the replacement professor will choose two female students from his two classes.”

52 6-52 2007 會計資訊系統計學 ( 一 ) 上課投影片 For any two events A and B P(A  B) = P(A) + P(B) - P(A  B) A B P(A) =6/13 P(B) =5/13 P(A  B) =3/13 A  B + _ P(A  B) = 8/13 Addition Rule (加法原則)

53 6-53 2007 會計資訊系統計學 ( 一 ) 上課投影片 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)

54 6-54 2007 會計資訊系統計學 ( 一 ) 上課投影片 Addition Rule P(A 1 ) =.11 +.29 =.40 P(B 1 ) =.11 +.06 =.17 By adding P(A1) plus P(B1) we add P(A1  B1) twice. To correct we subtract P(A1  B1) from P(A1) + P(B1). B1B1 B2B2 P(A i ) A1A1.11.29.40 A2A2.06.54.60 P(B j ).17.831.00 P(A 1  B 1 ) = P(A1) + P(B1) –P(A1  B1) =.40 +.17 -.11 =.46 B1B1 A1A1

55 6-55 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 Sun or the Post or both? i.e. what is P(Sun  Post) ?

56 6-56 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 selected household subscribes to one or the other or both papers”

57 6-57 2007 會計資訊系統計學 ( 一 ) 上課投影片 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; B: The mutual fund receives increased contribution. Addition Rule and Multiplication Rule

58 6-58 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 -.45 = 0.65 Addition Rule and Multiplication Rule

59 6-59 2007 會計資訊系統計學 ( 一 ) 上課投影片 B When A and B are mutually exclusive (互斥), P(A  B) = P(A) + P(B) - P(A  B) Addition Rule A B P(A  B) = 0

60 6-60 2007 會計資訊系統計學 ( 一 ) 上課投影片 This is P(F), the probability of selecting a female student first This is P(F|F), the probability of selecting a female student second, given that a female was already chosen first 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 10. First selectionSecond selection P(F) = 3/10 P( M) = 7/10 P(F|M) = 3/9 P(F|F) = 2/9 P( M|M) = 6/9 P( M|F) = 7/9

61 6-61 2007 會計資訊系統計學 ( 一 ) 上課投影片 3/9 + 6/9 = 9/9 = 1 2/9 + 7/9 = 9/9 = 1 3/10 + 7/10 = 10/10 = 1 Probability Trees The probabilities associated with any set of branches from one “node” must add up to 1. First selectionSecond selection P(F) = 3/10 P( M) = 7/10 P(F|M) = 3/9 P(F|F) = 2/9 P( M|M) = 6/9 P( M|F) = 7/9 Handy way to check your work !

62 6-62 2007 會計資訊系統計學 ( 一 ) 上課投影片 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…

63 6-63 2007 會計資訊系統計學 ( 一 ) 上課投影片 Probability Trees At the ends of the “branches”, we calculate joint probabilities as the product of the individual probabilities on the preceding branches. First selectionSecond selection P(F) = 3/10 P( M) = 7/10 P(F|M) = 3/9 P(F|F) = 2/9 P( M|M) = 6/9 P( M|F) = 7/9 P(FF)=(3/10)(2/9) P(FM)=(3/10)(7/9) P(MF)=(7/10)(3/9) P(MM)=(7/10)(6/9) Joint probabilities The joint probabilities at the ends of branches must sum to 1.

64 6-64 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.6 – revisited (independent events) –Find the probability of selecting two female students (with replacement), if there are 3 female students in a class of 10. F MFMF M FMFM First selection P(F) = 3/10 P( M) = 7/10 Second selection Second selection P(F|M) = 3/10 P(F|F) = 3/10 P( M|M) =7/10 P( M|F) = 7/10 = P(F) = = P(M) = Probability Trees P(FF)=(3/10)(3/10) P(FM)=(3/10)(7/10) P(MF)=(7/10)(3/10) P(MM)=(7/10)(7/10) Joint probabilities

65 6-65 2007 會計資訊系統計學 ( 一 ) 上課投影片 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. Probability Trees

66 6-66 2007 會計資訊系統計學 ( 一 ) 上課投影片 Solution Probability Trees P(Pass) =.72 P(Fail  Pass) =(.28)(.88)=.2464 P(Fail  Fail) =(.28)(.12) =.0336 First exam P(Pass) =.72 P( Fail) =.28 Second exam P(Pass|Fail) =.88 P( Fail|Fail) =.12 P(Pass) = P(Pass on first exam) + P(Fail on first  Pass on second) =.9664 “There is almost a 97% chance they will pass the bar”

67 6-67 2007 會計資訊系統計學 ( 一 ) 上課投影片 –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? Additional Example: Dependent Events Probability Trees

68 6-68 2007 會計資訊系統計學 ( 一 ) 上課投影片 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). Probability Trees – dependent events

69 6-69 2007 會計資訊系統計學 ( 一 ) 上課投影片 P(A) = 0.9 P(A C ) = 0.1 A ACAC Good Poor Nondefective P(B|A) = 0.01 P(B C |A) =.99 Defective Nondefective P(B C |A C ) = 0.9 P(B|A C ) = 0.1 A: The machine is in good condition B: Item is defective P(A  B) = 0.009 P(A C  B) = 0.010 P(B) = 0.019 A  B C A C  B C A  B A C  B Solution Joint Probabilities Probability Trees – dependent events

70 6-70 2007 會計資訊系統計學 ( 一 ) 上課投影片 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. Probability Trees – dependent events

71 6-71 2007 會計資訊系統計學 ( 一 ) 上課投影片 Additional Example: Independent Events Consider the random experiment of flipping a coin twice. Probability Trees

72 6-72 2007 會計資訊系統計學 ( 一 ) 上課投影片 H T H H T T Flipping a coin twice. Probability Trees First flip P(H) =.5 P( T) =.5 Second flip P(H) =.5 P( T) =.5 P(HH)=0.25 P(TH)=0.25 P(TT)=0.25 P(HT)=0.25 Joint probabilities

73 6-73 2007 會計資訊系統計學 ( 一 ) 上課投影片 P(HH)=0.25 P(HT)=0.25 P(TH)=0.25 P(TT)=0.25 H THTH T HTHT The probability that at least one heads faces up = P(HH or HT or TH) =.25+.25+.25=.75 Probability Trees The probability that Heads faces up in the first flip =P(HH or HT) =.25 +.25 =.50

74 6-74 2007 會計資訊系統計學 ( 一 ) 上課投影片 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) P(A|B)

75 6-75 2007 會計資訊系統計學 ( 一 ) 上課投影片 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 achieving 650 or more doubles. What should he do?

76 6-76 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.9 – Convert to Statistical Notation Let A = GMAT score of 650 or more, hence A C = 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(A C ) = 1 –.10 =.90

77 6-77 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.9 – Convert to Statistical Notation Let B represent the event “take the prep course” hence B C 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 on the prep course.

78 6-78 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.9 – Continued We are trying to determine P(A | B), perhaps the definition of conditional probability from earlier will assist us…earlier We don’t know P(A  B) and we don’t know P(B). Perhaps if we construct a probability tree…

79 6-79 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.9 – Continued In order to go from P(B | A) = 0.52 to P(A | B) = ?? we need to apply Bayes’ Law. Graphically: Score ≥ 650Prep Test A.10 A C.90 B|A.52 B C |A.48 B|A C.23 B C |A C.77 A  B 0.052 A  B C 0.048 A C  B 0.207 A C  B C 0.693 Now we just need P(B) !

80 6-80 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.9 – Continued In order to go from P(B | A) = 0.52 to P(A | B) = ?? we need to apply Bayes’ Law. Graphically: Score ≥ 650Prep Test A.10 A C.90 B|A.52 B C |A.48 B|A C.23 B C |A C.77 A  B 0.052 A  B C 0.048 A C  B 0.207 A C  B C 0.693 Marginal Prob. P(B) = P(A  B) + P(A C  B) =.259

81 6-81 2007 會計資訊系統計學 ( 一 ) 上課投影片 Example 6.9 – Continued Thus, The probability of scoring 650 or better doubles to 20.1% when the prep course is taken.

82 6-82 2007 會計資訊系統計學 ( 一 ) 上課投影片 Bayesian Terminology The probabilities P(A) and P(A C ) 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.

83 6-83 2007 會計資訊系統計學 ( 一 ) 上課投影片 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? Bayes’ Law

84 6-84 2007 會計資訊系統計學 ( 一 ) 上課投影片 Solution –Define the following events C = Has a disease (cancer) C C = Does not have the disease (cancer) PT = Positive test results NT = Negative test results –Build a probability tree Bayes’ Law

85 6-85 2007 會計資訊系統計學 ( 一 ) 上課投影片 Solution – Continued –The probabilities provided are: P(C) =.01P(C C ) =.99 P(PT|C) =.70P(NT|C)=.30 P(PT|C C ) =.135P(NT|C C ) =.865 –The probability to be determined is Bayes’ Law

86 6-86 2007 會計資訊系統計學 ( 一 ) 上課投影片 C C P(PT|C C ) =.135 P( NT|C C ) =.865 P(PT|C) =.70 P( NT|C) =.30 PT|C PT PT|C PT C C C C| PT P(C C ) =.99 P(C) =.01 PT|C P(C  PT ) =.0070 P(C C  PT ) =.1337 P( PT ) =.1407 + Bayes’ Law

87 6-87 2007 會計資訊系統計學 ( 一 ) 上課投影片 P(PT|C C ) =.135 P( NT|C C ) =.865 P(PT|C) =.70 P( NT|C) =.30 P(C C ) =.99 P(C) =.01 Bayes’ Law Prior probabilities Likelihood probabilities Posterior probabilities


Download ppt "6-1 2007 會計資訊系統計學 ( 一 ) 上課投影片 Probability Chapter 6."

Similar presentations


Ads by Google