32
Bayes’ Theorem Special Type of Conditional Probability

Feb23Bayes Theorem

Embed Size (px)

DESCRIPTION

bt

Citation preview

Page 1: Feb23Bayes Theorem

Bayes’ Theorem

Special Type of Conditional Probability

Page 2: Feb23Bayes Theorem

Recall- Conditional Probability P(Y T C|S) will be used to calculate P(S|Y T C) P(Y T C|F) will be used to calculate P(F|Y T C) HOW????? We will learn in the next lesson? BAYES THEOREM

Page 3: Feb23Bayes Theorem

Definition of Partition

Let the events B1, B2, , Bn be non-empty subsets of a sample space S for an experiment. The Bi’s are a partition of S if the intersection of any two of them is empty, and if their union is S. This may be stated symbolically in the following way.

1. Bi Bj = , unless i = j.

2. B1 B2 Bn = S.

Page 4: Feb23Bayes Theorem

Partition Example

S

B1 B2 B3

Page 5: Feb23Bayes Theorem

Example 1

Your retail business is considering holding a sidewalk sale promotion next Saturday. Past experience indicates that the probability of a successful sale is 60%, if it does not rain. This drops to 30% if it does rain on Saturday. A phone call to the weather bureau finds an estimated probability of 20% for rain. What is the probability that you have a successful sale?

Page 6: Feb23Bayes Theorem

Example 1

EventsR- rains next Saturday

N -does not rain next Saturday.

A -sale is successful

U- sale is unsuccessful.

GivenP(A|N) = 0.6 and P(A|R) = 0.3.

P(R) = 0.2.

In addition we know R and N are complementary events

P(N)=1-P(R)=0.8

Our goal is to compute P(A).

)RN( c

Page 7: Feb23Bayes Theorem

Using Venn diagram –Method1

Event A is the disjoint union of event R A & event N A

S=RN

R N

A

P(A) = P(R A) + P(N A)

Page 8: Feb23Bayes Theorem

P(A)- Probability that you have a Successful SaleWe need P(R A) and P(N A)Recall from conditional probabilityP(R A)= P(R )* P(A|R)=0.2*0.3=0.06 Similarly P(N A)= P(N )* P(A|N)=0.8*0.6=0.48

Using P(A) = P(R A) + P(N A) =0.06+0.48=0.54

Page 9: Feb23Bayes Theorem

Let us examine P(A|R)

Consider P(A|R) The conditional

probability that sale is successful given that it rains

Using conditional probability formula

)R(P)AR(P)R|A(P

S=RN

R N

A

Page 10: Feb23Bayes Theorem

Tree Diagram-Method 2Bayes’, Partitions

Saturday

R

N

A R A 0.20.3 = 0.06

A N A 0.80.6 = 0.48

U R U 0.20.7 = 0.14

U N U 0.80.4 = 0.32

0.2

0.8

0.7

0.3

0.6

0.4

Probability ConditionalProbability ProbabilityEvent

*Each Branch of the tree represents the intersection of two events*The four branches represent Mutually Exclusive events

P(R ) P(A|R)

P(N ) P(A|N)

Page 11: Feb23Bayes Theorem

Method 2-Tree Diagram

Using P(A) = P(R A) + P(N A) =0.06+0.48=0.54

Page 12: Feb23Bayes Theorem

Extension of Example1

Consider P(R|A)The conditional probability that it rains giventhat sale is successful the How do we calculate?Using conditional probability formula

)N(P)N|A(P)R(P)R|A(P)R(P)R|A(P

)A(P)AR(P)A|R(P

806020302030

......

=

= 0.1111*show slide 7

Page 13: Feb23Bayes Theorem

Example 2

In a recent New York Times article, it was reported that light trucks, which include SUV’s, pick-up trucks and minivans, accounted for 40% of all personal vehicles on the road in 2002. Assume the rest are cars. Of every 100,000 car accidents, 20 involve a fatality; of every 100,000 light truck accidents, 25 involve a fatality. If a fatal accident is chosen at random, what is the probability the accident involved a light truck?

Page 14: Feb23Bayes Theorem

Example 2

EventsC- Cars

T –Light truck

F –Fatal Accident

N- Not a Fatal Accident

GivenP(F|C) = 20/10000 and P(F|T) = 25/100000

P(T) = 0.4

In addition we know C and T are complementary events

P(C)=1-P(T)=0.6

Our goal is to compute the conditional probability of a Light truck accident given that it is fatal P(T|F).

)TC( c

Page 15: Feb23Bayes Theorem

Goal P(T|F)

Consider P(T|F)

Conditional probability of a Light truck accident given that it is fatal

Using conditional probability formula

)F(P)FT(P)F|T(P

S=CT

C T

F

Page 16: Feb23Bayes Theorem

P(T|F)-Method1

Consider P(T|F) Conditional probability of a Light truck

accident given that it is fatal How do we calculate? Using conditional probability formula

)C(P)C|F(P)T(P)T|F(P)T(P)T|F(P

)F(P)FT(P)F|T(P

).)(.().)(.().)(.(

60000204000025040000250

=

= 0.4545

Page 17: Feb23Bayes Theorem

Tree Diagram- Method2

Vehicle

C

T

F C F 0.6 0.0002 = .00012

F T F 0.40.00025= 0.0001

N C N 0.6 0.9998 = 0.59988

N T N 0.40.99975= .3999

0.6

0.4

0.9998

0.0002

0.00025

0.99975

Probability ConditionalProbability ProbabilityEvent

Page 18: Feb23Bayes Theorem

Tree Diagram- Method2

)FC(P)FT(P)FT(P

)F(P)FT(P)F|T(P

).)(.().)(.().)(.(

60000204000025040000250

=

= 0.4545

Page 19: Feb23Bayes Theorem

Partition

S

B1 B2 B3

A

)()|()()|()()|()( 332211 BPBAPBPBAPBPBAPAP

Page 20: Feb23Bayes Theorem

Law of Total Probability

))()()((

))(()()(

21

21

n

nBABABAP

BBBAPSAPAP

Let the events B1, B2, , Bn partition the finite discrete sample space S for an experiment and let A be an event defined on S.

Page 21: Feb23Bayes Theorem

Law of Total Probability

n

iii

nn

n

n

BPBAP

BPBAPBPBAPBPBAP

BAPBAPBAP

BABABAP

1

2211

21

21

)()|(

)()|()()|()()|(

)()()(

))()()((

.)()|()(1

n

iii BPBAPAP

Page 22: Feb23Bayes Theorem

Bayes’ Theorem

Suppose that the events B1, B2, B3, . . . , Bn partition the sample space S for some experiment and that A is an event defined on S. For any integer, k, such thatwe have

nk 1

n

jjj

kkk

BPBAP

BPBAPABP

1

|

||

Page 23: Feb23Bayes Theorem

Focus on the Project

Recall

P(Y T C|S) will be used to calculate P(S|Y T C) P(Y T C|F) will be used to calculate P(F|Y T C)

Page 24: Feb23Bayes Theorem

How can Bayes’ Theorem help us with thedecision on whether or not to attempt a loan work out?Partitions 1. Event S 2. Event F

GivenP(Y T C|S) P(Y T C|F)NeedP(S|Y T C) P(F|Y T C)

Page 25: Feb23Bayes Theorem

Using Bayes Theorem

P(S|Y T C) 0.477

)536.0()021.0()464.0()022.0()464.0()022.0(

)()|()()|()()|(|

FPFCTYPSPSCTYPSPSCTYPCTYSP

.)536.0()021.0()464.0()022.0(

)536.0()021.0()()|()()|(

)()|(|

FPFCTYPSPSCTYPFPFCTYPCTYFP

LOAN FOCUS EXCEL-BAYES

P(F|Y T C) 0.523

Page 26: Feb23Bayes Theorem

RECALL

Z is the random variable giving the amount of money, in dollars, that Acadia Bank receives from a future loan work out attempt to borrowers with the same characteristics as Mr. Sanders, in normal times.

)523.0(000,250$)477.0(000,000,4$)|(000,250$)|(000,000,4$

)000,250$(000,250$)000,000,4$(000,000,4$)(

CTYFPCTYSP

ZPZPZE

E(Z) $2,040,000.

Page 27: Feb23Bayes Theorem

Decision EXPECTED VALUE OF A WORKOUT=E(Z) $2,040,000

FORECLOSURE VALUE- $2,100,000

RECALL FORECLOSURE VALUE> EXPECTED VALUE OF A WORKOUT

DECISIONFORECLOSURE

Page 28: Feb23Bayes Theorem

Further Investigation I let Y be the event that a borrower has 6, 7, or 8 years of

experience in the business.Using the range

Let Z be the random variable giving the amount of money, in dollars, that Acadia Bank receives from a future loan work out attempt to borrowers with Y and a Bachelor’s Degree, in normal times. When all of the calculations are redone, with Y replacing Y, we find that P(Y

T C|S) 0.073 and P(Y T C|F) 0.050.

Former BankYears In Business

Years In Business

Education Level

State Of Economy

Loan Paid Back

BR >=6 <=8 yes

Page 29: Feb23Bayes Theorem

Calculations

P(Y T C|S) 0.073 P(Y T C|F) 0.050P(S|Y T C) 0.558 P(F|Y T C) 0.442

The expected value of Z is E(Z ) $2,341,000.

Since this is above the foreclosure value of $2,100,000, a loan work out attempt is indicated.

Page 30: Feb23Bayes Theorem

Further Investigation II

Let Y" be the event that a borrower has 5, 6, 7, 8, or 9 years of experience in the business

Let Z" be the random variable giving the amount of money, in dollars, that Acadia Bank receives from a future loan work out attempt to borrowers with 5, 6, 7, 8, or 9 years experience and a Bachelor's Degree, in normal times. Redoing our work yields the follow results.

Page 31: Feb23Bayes Theorem

Similarly can calculate E(Z )

Make at a decision- Foreclose vs. Workout Data indicates Loan work out

Page 32: Feb23Bayes Theorem

Close call for Acadia Bank loan officers

Based upon all of our calculations, we recommend that Acadia Bank enter into a work out arrangement with Mr. Sanders.