bayes’ theorem. an insurance company divides its clients into two categories: those who are...

44
Bayes’ Theorem

Upload: roger-everett-higgins

Post on 18-Dec-2015

227 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Page 2: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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?

Page 3: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 4: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 5: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 6: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Recall from conditional probability

FEPFPFEPFP

FEPFEP

|

|

EFPFEPEPEFPEP

EFPEFP

|

|

Page 7: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 8: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem Updating our Venn Diagram

Notice again that

A AC

F

APAFPFAP | CCC APAFPFAP |

CC FAP

CFAP

FAPFAPFP C

Page 9: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

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

26.070.020.030.040.0||

CC

C

APAFPAPAFP

FAPFAPFP

Page 10: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 11: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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 |

Page 12: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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 |

Page 13: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 14: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

For each

FAPFAPFAPFP n 21

iii APAFPFAP |

n

iii

nn

n

APAFP

APAFPAPAFPAPAFPFAPFAPFAPFP

1

2211

21

|

|||

Page 15: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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 |

Page 16: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

|

Page 17: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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?

Page 18: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 19: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Soln.

0767.031.008.021.011.048.006.0

|||

BPBNPWPWNPRPRNPNP

Page 20: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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 |

Page 21: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 22: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Recall the formulas:

So,

2211 || BAPBPBAPBPAP

AP

ABPABP

1

1 |

2211

11

11

|||

|

BAPBPBAPBPBPBAP

APABP

ABP

1111 | BPBAPBAPABP

Page 23: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Bayes’ Theorem:

n

iii

kkk

BPBAP

BPBAPABP

1

|

||

Page 24: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 25: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 26: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Soln.

3755.031.008.021.011.048.006.0

48.006.0|||

|

|

BPBNPWPWNPRPRNPRPRNP

NPNRP

NRP

Page 27: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Soln.

3012.0

31.008.021.011.048.006.021.011.0

||||

|

BPBNPWPWNPRPRNP

WPWNPNWP

3233.0| NBP

Page 28: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Focus on the Project:

We want to find the following probabilities: and .

To get these, use Bayes’ Theorem

CTYSP | CTYFP |

Page 29: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Focus on the Project:

FPFCTYPSPSCTYP

SPSCTYPCTYSP

||

||

FPFCTYPSPSCTYP

FPFCTYPCTYFP

||

||

Page 30: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Focus on the Project:

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

FPFCTYPSPSCTYP

SPSCTYPCTYSP

||

||

Page 31: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Focus on the Project:

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

FPFCTYPSPSCTYP

FPFCTYPCTYFP

||

||

Page 32: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 33: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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.

Page 34: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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)

Page 35: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 36: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 37: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Focus on the Project:

0504.05222.05314.01816.0

||||

FCPFTPFYPFCTYP

0733.05823.05301.02374.0

||||

SCPSTPSYPSCTYP

Page 38: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 39: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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)

Page 40: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 41: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 42: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

Bayes’ Theorem

Focus on the Project:

0880.05222.05314.03170.0

||||

FCPFTPFYPFCTYP

1189.05823.05301.03850.0

||||

SCPSTPSYPSCTYP

Page 43: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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

Page 44: Bayes’ Theorem.  An insurance company divides its clients into two categories: those who are accident prone and those who are not. Statistics show there

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