6-1 2007 會計資訊系統計學 ( 一 ) 上課投影片
ProbabilityProbability
Chapter 6
6-2 2007 會計資訊系統計學 ( 一 ) 上課投影片
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+
6-3 2007 會計資訊系統計學 ( 一 ) 上課投影片
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.
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}
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 O1, O2, …, Ok
• Using notation from set theory, we can represent the sample space and its outcomes as:
• S = {O1, O2, …, Ok}
6-6 2007 會計資訊系統計學 ( 一 ) 上課投影片
Sample Space: S = {O1, O2,…,Ok}
Sample Spacea sample space of a random experimentis a list of all possible outcomes of the experiment. The outcomes must be mutually exclusive and exhaustive.
Simple EventsThe individual outcomes are called simple events. Simple events cannot be further decomposed into constituent outcomes.
Event(事件)An event is any collectionof 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.
O1 O2
6-7 2007 會計資訊系統計學 ( 一 ) 上課投影片
• Given a sample space S = {O1, O2, …, 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 i.e. P(O1) + P(O2) + … + P(Ok) = 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(Oi) represents the probability of outcome i1)O(P
k
1ii
6-8 2007 會計資訊系統計學 ( 一 ) 上課投影片
Approaches to Assigning Probabilities
• There are three ways to assign a probability, P(O i), 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.
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.
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
1 2 3 4 5 6
1 2 3 4 5 6 72 3 4 5 6 7 83 4 5 6 7 8 94 5 6 7 8 9 105 6 7 8 9 10 116 7 8 9 10 11 12
What are the underlying, unstated
assumptions??
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 302 desktops were sold.
• From this we can constructthe probabilities of an event(i.e. the # of desktop sold on a given day)…
Desktops Sold # of Days
0 1
1 2
2 10
3 12
4 5
6-12 2007 會計資訊系統計學 ( 一 ) 上課投影片
Relative Frequency Approach
• “There is a 40% chance Bits & Bytes will sell 3 desktops on any given day”
Desktops Sold # of Days Desktops Sold
0 1 1/30 = .03
1 2 2/30 = .07
2 1010/30 = .33
3 1212/30 = .40
4 5 5/30 = .17
∑ = 1.00
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).
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
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
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.
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 (相依、獨立事件)
6-18 2007 會計資訊系統計學 ( 一 ) 上課投影片
Basic Relationships of Events
Complement of Event
Intersection of Events
Union of Events
Mutually Exclusive Events
A Ac A B
A B A B
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 Ac
• The Venn diagram below illustrates the concept of a complement.
• P(A) + P(Ac ) = 1
• E.g. dice: P(evens) + P(“not evens”) = 1
A Ac
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)
A B
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
31
2
46
B
A A B
46
1
222 P(A B) = P(2) = 1/6
Intersection
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.
A B
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
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
(B1)
Mutual fund doesn’t outperform the market
(B2)
Top 20 MBA program (A1) .11 .29
Not top 20 MBA program (A2) .06 .54
P(A1 B1)
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
(B1)
Mutual fund doesn’t outperform the market (B2)
Top 20 MBA program (A1) .11 .29
Not top 20 MBA program (A2) .06 .54
P(A1 B1)
P(A2 B1)
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 (B1)
Mutual fund doesn’t outperform the market (B2)
Marginal Prob.
P(Ai)
Top 20 MBA program (A1)
Not top 20 MBA program (A2)
Marginal Probability P(Bj)
P(A1 B1)+ P(A1 B2) = P(A1)
P(A2 B1)+ P(A2 B2) = P(A2)
6-27 2007 會計資訊系統計學 ( 一 ) 上課投影片
Marginal Probability
• These probabilities are computed by adding across rows and down columns
Mutual fund outperforms the market (B1)
Mutual fund doesn’t outperform the market (B2)
Marginal Prob.
P(Ai)
Top 20 MBA program (A1) .11 .29 .40
Not top 20 MBA program (A2) .06 .54 .60
Marginal Probability P(Bj)
+ =
+
Eg. The probability a fund manager isn’t from a top school = P(A2) = .06 + .54 = .60
=
6-28 2007 會計資訊系統計學 ( 一 ) 上課投影片
Marginal Probability
• These probabilities are computed by adding across rows and down columns
Mutual fund outperforms the market (B1)
Mutual fund doesn’t outperform the market (B2)
Marginal Prob.
P(Ai)
Top 20 MBA program (A1) .40
Not top 20 MBA program (A2) .60
Marginal Probability P(Bj)
P(A1 B1)+
P(A2 B1 = P(B1)
P(A1 B2)+
P(A2 B2 = P(B2)
6-29 2007 會計資訊系統計學 ( 一 ) 上課投影片
Marginal Probability
• These probabilities are computed by adding across rows and down columns
Mutual fund outperforms the market (B1)
Mutual funddoesn’t outperform the market (B2)
Marginal Prob.
P(Ai)
Top 20 MBA program (A1) .11 .29 .40
Not top 20 MBA program (A2) .06 .54 .60
Marginal Probability P(Bj) .17 .83 1
+
Eg.The probability a fund outperforms the market = P(B1) = .11 + .06 = .17
BOTH margins must add to 1(useful error check)
+
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:
)B(P
)BA(P)BA(P
6-31 2007 會計資訊系統計學 ( 一 ) 上課投影片
)B(P
)BA(P)BA(P
)A(P
)BA(P)AB(P
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…
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:– A1 = Fund manager graduated from a top-20 MBA program
– A2 = Fund manager did not graduate from a top-20 MBA program
– B1 = Fund outperforms the market
– B2 = Fund does not outperform the market
• Thus, we want to know “what is P(B1 | A1) ?”
6-33 2007 會計資訊系統計學 ( 一 ) 上課投影片
Conditional Probability
• We want to calculate P(B1 | A1)
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.
B1 B2 P(Ai)
A1.11 .29 .40
A2.06 .54 .60
P(Bj) .17 .83 1.00New informationreduces the relevantsample space to the 40% of event A1.
275.040.0
11.0
)A(P
)BA(P)AB(P
1
1111
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)
6-35 2007 會計資訊系統計學 ( 一 ) 上課投影片
Independence
• Example 6.3
We saw that P(B1 | A1) = .275
The marginal probability for B1 is: P(B1) = 0.17
Since P(B1|A1) ≠ P(B1), B1 and A1 are not independent events.
• Stated another way, they are dependent(相依). That is, the probability of one event (B1) is affected by the occurrence of the other event (A1).
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:M1: a manager is a male A1: a manager is promotedM2: a manager is a female A2: a manager is not promoted
Dependent and independent events
Manager Promoted NotPromoted TotalMale 46 184 230
Female 8 32 40Total 54 216 270
Manager Promoted NotPromoted TotalMale 46 184 230
Female 8 32 40Total 54 216 270
6-37 2007 會計資訊系統計學 ( 一 ) 上課投影片
Manager Promoted NotPromoted TotalMale 46 184 230
Female 8 32 40Total 54 216 270
Manager Promoted NotPromoted TotalMale 46 184 230
Female 8 32 40Total 54 216 270
P(A1) = [Number of promotions] /[total number of managers] = 54 /270 = .20
P(A1|M1) = [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.
46 230
54 270
Dependent and independent events• If P(A1|M1)=P(A1), there is no sex discrimination in
awarding promotion.
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)
A B
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
31
2
46
B
A
46
1
22P(A B) = P(1) + P(2) + P(4) + P(6) = 4/6
46
1
2
Union
A B
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)
6-41 2007 會計資訊系統計學 ( 一 ) 上課投影片
• Solution
Union
Mutual fund outperforms the market (B1)
Mutual fund doesn’t outperform the market (B2)
Top 20 MBA program (A1) .11 .29Not top 20 MBA program (A2) .06 .54
A1 or B1 occurs whenever either: A1 and B1 occurs,
A1 and B2 occurs,
A2 and B1 occurs.
P(A1 B1) = P(A1 B1) + P(A1 B2) + P(A2 B1) = .11 +.29 + .06 = .46
Comment:P(A1 B1) = 1 – P(A2 B2) = 1 – .54 = .46
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 (加法原則)
6-43 2007 會計資訊系統計學 ( 一 ) 上課投影片
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)P(AC) = 1 - P(A)
A and AC consist of all the simple events in the sample space. Therefore,P(A) + P(AC) = 1
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 AC.
Complement Rule
A1
2
4 5
6
3
6
46
21
)A(P1)A(P C
AC
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)
)B(P
)BA(P)BA(P
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) ?
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
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.”
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) ?
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
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.”
6-52 2007 會計資訊系統計學 ( 一 ) 上課投影片
For any two events A and B
P(A B) = P(A) + P(B) - P(A 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 (加法原則)
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)
6-54 2007 會計資訊系統計學 ( 一 ) 上課投影片
Addition Rule
• P(A1) = .11 + .29 = .40
• P(B1) = .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).
B1 B2 P(Ai)
A1.11 .29 .40
A2.06 .54 .60
P(Bj) .17 .83 1.00
P(A1 B1) = P(A1) + P(B1) –P(A1 B1) = .40 + .17 - .11 = .46
B1
A1
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) ?
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”
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
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.45P(A B) = P(A) + P(B) - P(A B) = .5 + .6 - .45 = 0.65
Addition Rule and Multiplication Rule
6-59 2007 會計資訊系統計學 ( 一 ) 上課投影片
B
When A and B are mutually exclusive (互斥) ,
P(A B) = P(A) + P(B) - P(A B)P(A B) = P(A) + P(B) - P(A B)
Addition Rule
A B
P(A B) = 0
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 selection Second selection
P(F) = 3/10
P( M) = 7/10P(F|M) = 3/9
P(F|F) = 2/9
P( M|M) = 6/9
P( M|F) = 7/9
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 selection Second selection
P(F) = 3/10
P( M) = 7/10P(F|M) = 3/9
P(F|F) = 2/9
P( M|M) = 6/9
P( M|F) = 7/9
Handy way to checkyour work !
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…
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 selection Second selection
P(F) = 3/10
P( M) = 7/10P(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.
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.
FF
MF
MM
FMFirst 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(F) =
= P(M) =
= 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
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
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”
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?
What is the probability that the machine is in good conditions?
• Additional Example: Dependent Events
Probability Trees
6-68 2007 會計資訊系統計學 ( 一 ) 上課投影片
• Solution– Let us define the two events of interest:
A: The machine is in good conditionsB: 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).
)B(P
)BA(P)B|A(P
Probability Trees – dependent events
6-69 2007 會計資訊系統計學 ( 一 ) 上課投影片
P(A) = 0.9
P(A C) = 0.1
A
AC
Good
Poor
Nondefective
P(B|A) = 0.01
P(B C|A) = .99
Defective
Defective
NondefectiveP(B C|A C) = 0.9
P(B|AC ) = 0.1
A: The machine is in good conditionB: Item is defective
P(A B) = 0.009
P(AC B) = 0.010
P(B) = 0.019
A BC
AC BC
A B
AC B
• Solution Joint Probabilities
Probability Trees – dependent events
6-70 2007 會計資訊系統計學 ( 一 ) 上課投影片
47..019
.009
)B(P
)BA(P)B|A(P
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
6-71 2007 會計資訊系統計學 ( 一 ) 上課投影片
• Additional Example: Independent EventsConsider the random experiment of flipping a coin twice.
Probability Trees
6-72 2007 會計資訊系統計學 ( 一 ) 上課投影片
H
T
H
HT
T
Flipping a coin twice.
Probability Trees
First flipP(H) = .5
P( T) = .5
Second flip
Second flipP(H) = .5
P(H) = .5
P( T) = .5
P( T) = .5
P(HH)=0.25
P(TH)=0.25
P(TT)=0.25
P(HT)=0.25
Joint probabilities
6-73 2007 會計資訊系統計學 ( 一 ) 上課投影片
P(HH)=0.25P(HT)=0.25
P(TH)=0.25P(TT)=0.25
HH
TH
TT
HT
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
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)
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?
6-76 2007 會計資訊系統計學 ( 一 ) 上課投影片
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
6-77 2007 會計資訊系統計學 ( 一 ) 上課投影片
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 on the prep course.
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…
• We don’t know P(A B) and we don’t know P(B).
• Perhaps if we construct a probability tree…
)B(P
)BA(P)BA(P
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 ≥ 650 Prep Test
A .10
AC .90
B|A .52
BC|A .48
B|AC .23
BC|AC .77
A B 0.052
A BC 0.048
AC B 0.207
AC BC 0.693
Now we just need P(B) !
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 ≥ 650 Prep Test
A .10
AC .90
B|A .52
BC|A .48
B|AC .23
BC|AC .77
A B 0.052
A BC 0.048
AC B 0.207
AC BC 0.693
Marginal Prob.P(B)= P(A B) + P(AC B)= .259
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.
201.0259.0
052.0
)B(P
)BA(P)BA(P
6-82 2007 會計資訊系統計學 ( 一 ) 上課投影片
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.
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
6-84 2007 會計資訊系統計學 ( 一 ) 上課投影片
• 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
Bayes’ Law
6-85 2007 會計資訊系統計學 ( 一 ) 上課投影片
• Solution – Continued– The probabilities provided are:
• P(C) = .01 P(CC) = .99• P(PT|C) = .70 P(NT|C)= .30• P(PT|CC) = .135 P(NT|CC) = .865
– The probability to be determined is )PT|C(P
Bayes’ Law
6-86 2007 會計資訊系統計學 ( 一 ) 上課投影片
C C
P(PT|CC ) = .135
P( NT|C C) = .865
P(PT|C) = .70
P( NT|C) = .30
PT|CPT|C
PT|CPTPT|CPTPTPTPTPT
CCCC|
PT
P(C C) = .99
P(C) = .01
PT|C PT|CPT|C
P(C PT)=.0070
P(CC PT)=.1337
)PT|C(P
P(PT) =.1407
+)PT(P
)PTC(P
0498.1407.
0070.
Bayes’ Law
6-87 2007 會計資訊系統計學 ( 一 ) 上課投影片
P(PT|CC ) = .135
P( NT|C C) = .865
P(PT|C) = .70
P( NT|C) = .30
P(C C) = .99
P(C) = .01
)PT|C(P
0498.1407.
0070.
Bayes’ Law
Prior probabilities
Likelihoodprobabilities Posterior probabilities
Top Related