Bayes’ Theorem. An insurance company divides its clients into two categories: those who are...

Preview:

Citation preview

Bayes’ Theorem

Bayes’ Theorem An insurance company divides its clients into two

categories: those who are accident prone and those who are not. Statistics show there is a 40% chance an accident prone person will have an accident within 1 year whereas there is a 20% chance non-accident prone people will have an accident within the first year.

If 30% of the population is accident prone, what is the probability that a new policyholder has an accident within 1 year?

Bayes’ Theorem

Let A be the event a person is accident prone Let F be the event a person has an accident

within 1 year

A AC

F

FAP FAP C

CC FAP CFAP

Bayes’ Theorem

Notice we’ve divided up or partitioned the sample space along accident prone and non-accident prone

A AC

F

FAP FAP C

CC FAP CFAP

Bayes’ Theorem Notice that and are mutually

exclusive events and that

Therefore

We need to find and

How?

FA FAC

FFAFA C

FAPFAPFP C

FAP FAP C

Bayes’ Theorem

Recall from conditional probability

FEPFPFEPFP

FEPFEP

|

|

EFPFEPEPEFPEP

EFPEFP

|

|

Bayes’ Theorem

Thus:

APAFPFAP |

CCC APAFPFAP |

P(A) = 0.30 since 30% of population is accident prone

P(F|A) = 0.40 since if a person is accident prone, then his chance of having an accident within 1 year is 40%

P(F|AC) = 0.2 since non-accident prone people have a 20% chance of having an accident within 1 year

P(AC) = 1- P(A) = 0.70

Bayes’ Theorem Updating our Venn Diagram

Notice again that

A AC

F

APAFPFAP | CCC APAFPFAP |

CC FAP

CFAP

FAPFAPFP C

Bayes’ Theorem

So the probability of having an accident within 1 year is:

26.070.020.030.040.0||

CC

C

APAFPAPAFP

FAPFAPFP

Bayes’ Theorem

Using Tree Diagrams:

Accident Prone P(A) = 0.30

Not Accident Prone P(AC) = 0.70

Accident w/in 1 year P(F|A)=0.40

No Accident w/in 1 year P(FC|A)=0.60

Accident w/in 1 year P(F|AC)=0.20

No Accident w/in 1 year P(FC|AC)=0.80

FAP

FAP C

CC FAP

CFAP

Bayes’ Theorem

Notice you can have an accident within 1 year by following branch A until F is reached The probability that F is reached via branch A is

given by In other words, the probability of being accident

prone and having one within 1 year is

APAFP |

APAFPFAP |

Bayes’ Theorem

You can also have an accident within 1 year by following branch AC until F is reached The probability that F is reached via branch AC is

given by In other words, the probability of NOT being

accident prone and having one within 1 year is

CC APAFP |

CCC APAFPFAP |

Bayes’ Theorem

What would happen if we had partitioned our sample space over more events, say , all them mutually exclusive?

Venn Diagram

nAAA ,,, 21

A1 A2 An-1 An . . . . . .

(etc.)

F

FAP 1 FAP 2 FAP n 1 FAP n

Bayes’ Theorem

For each

FAPFAPFAPFP n 21

iii APAFPFAP |

n

iii

nn

n

APAFP

APAFPAPAFPAPAFPFAPFAPFAPFP

1

2211

21

|

|||

Bayes’ Theorem

Tree Diagram

1AP

2AP

1nAP

nAP

1|AFP

1|AFP C

2|AFP

2|AFP C

1| nAFP

1| nC AFP

nAFP |

nC AFP |

Bayes’ Theorem

Notice that F can be reached via branches

Multiplying across each branch tells us the probability of the intersection

Adding up all these products gives:

nAAA ,,, 21

n

iii APAFPFP

1

|

Bayes’ Theorem

Ex: 2 (text tractor example) Suppose there are 3 assembly lines: Red, White, and Blue. Chances of a tractor not starting for each line are 6%, 11%, and 8%. We know 48% are red and 31% are blue. The rest are white. What % don’t start?

Bayes’ Theorem

Soln. R: red P(R) = 0.48W: white P(W) = 0.21B: blue P(B) = 0.31N: not starting

P(N | R) = 0.06P(N | W) = 0.11P(N | B) = 0.08

Bayes’ Theorem

Soln.

0767.031.008.021.011.048.006.0

|||

BPBNPWPWNPRPRNPNP

Bayes’ Theorem

Main theorem:Suppose we know . We would like to use this information to find if possible.

Discovered by Reverend Thomas Bayes

FEP | EFP |

Bayes’ Theorem

Main theorem:

Ex. Suppose and partition a space and A is some event.

Use and to determine .

1B 2B

,|,, 121 BAPBPBP 2|BAP ABP |1

Bayes’ Theorem

Recall the formulas:

So,

2211 || BAPBPBAPBPAP

AP

ABPABP

1

1 |

2211

11

11

|||

|

BAPBPBAPBPBPBAP

APABP

ABP

1111 | BPBAPBAPABP

Bayes’ Theorem

Bayes’ Theorem:

n

iii

kkk

BPBAP

BPBAPABP

1

|

||

Bayes’ Theorem Ex. 4 (text tractor example) 3 assembly lines:

Red, White, and Blue. Some tractors don’t start (see Ex. 2). Find prob. of each line producing a non-starting tractor.

P(R) = 0.48 P(N | R) = 0.06P(W) = 0.21 P(N | W) = 0.11P(B) = 0.31 P(N | B) = 0.08

Bayes’ Theorem

Soln. Find P(R | N), P(W | N), and P(B | N)P(R) = 0.48 P(N | R) = 0.06P(W) = 0.21 P(N | W) = 0.11P(B) = 0.31 P(N | B) = 0.08

Bayes’ Theorem

Soln.

3755.031.008.021.011.048.006.0

48.006.0|||

|

|

BPBNPWPWNPRPRNPRPRNP

NPNRP

NRP

Bayes’ Theorem

Soln.

3012.0

31.008.021.011.048.006.021.011.0

||||

|

BPBNPWPWNPRPRNP

WPWNPNWP

3233.0| NBP

Bayes’ Theorem

Focus on the Project:

We want to find the following probabilities: and .

To get these, use Bayes’ Theorem

CTYSP | CTYFP |

Bayes’ Theorem

Focus on the Project:

FPFCTYPSPSCTYP

SPSCTYPCTYSP

||

||

FPFCTYPSPSCTYP

FPFCTYPCTYFP

||

||

Bayes’ Theorem

Focus on the Project:

In Excel, we find the probability to be approx. 0.4774

FPFCTYPSPSCTYP

SPSCTYPCTYSP

||

||

Bayes’ Theorem

Focus on the Project:

In Excel,we find the probability to be approx. 0.5226

FPFCTYPSPSCTYP

FPFCTYPCTYFP

||

||

Bayes’ Theorem

Focus on the Project:

Let Z be the value of a loan work out for a borrower with 7 years, Bachelor’s, Normal…

000,040,2$5226.0000,2504774.0000,000,4

Failure Prob. Failure Success Prob. Success

ZE

Bayes’ Theorem

Focus on the Project:

Since foreclosure value is $2,100,000 and on average we would receive $2,040,000 from a borrower with John Sanders characteristics, we should foreclose.

Bayes’ Theorem

Focus on the Project:

However, there were only 239 records containing 7 years experience.

Look at range of value 6, 7, and 8 (1 year more and less)

Bayes’ Theorem

Focus on the Project:

Use DCOUNT function with an extra “Years in Business” heading

Same for “no”

Added a new column

Former BankYears In Business Education Level

State Of Economy

Loan Paid Back?

Years In Business

BR >=6 yes <=8

Bayes’ Theorem Focus on the Project:

From this you get 349 successful and 323 failed records

Let be a borrower with 6, 7, or 8 years experience

and 1470349| SYP

Y

1779323| FYP

Bayes’ Theorem

Focus on the Project:

0504.05222.05314.01816.0

||||

FCPFTPFYPFCTYP

0733.05823.05301.02374.0

||||

SCPSTPSYPSCTYP

Bayes’ Theorem Focus on the Project:

Use Bayes’ Theorem to get new probabilities

: 6, 7, or 8 years, Bachelor’s, Normal (indicates work out)

5575.0| CTYSP 4425.0| CTYFP

000,341,2$ZE

Z

Bayes’ Theorem

Focus on the Project:

We can look at a large range of years.

Look at range of value 5, 6, 7, 8, and 9 (2 years more and less)

Bayes’ Theorem

Focus on the Project:

Use DCOUNT function with an extra “Years in Business” heading

Same for “no”

Added a new column

Former BankYears In Business Education Level

State Of Economy

Loan Paid Back?

Years In Business

BR >=5 yes <=9

Bayes’ Theorem Focus on the Project:

From this you get 566 successful and 564 failed records

Let be a borrower with 5, 6, 7, 8, or 9 years exper.

and 1470566|" SYP

Y

1779564|" FYP

Bayes’ Theorem

Focus on the Project:

0880.05222.05314.03170.0

||||

FCPFTPFYPFCTYP

1189.05823.05301.03850.0

||||

SCPSTPSYPSCTYP

Bayes’ Theorem Focus on the Project:

Use Bayes’ Theorem to get new probabilities

: 5, 6, 7, 8, or 9 years, Bachelor’s, Normal

(indicates work out)

5392.0| CTYSP

4608.0| CTYFP

000,272,2$ZEZ

Bayes’ Theorem

Focus on the Project:

Since both indicated a work out while only indicated a foreclosure, we will work out a new payment schedule.

Any further extensions…

ZEZE and ZE

Recommended