H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M...

16
H H IERARCHICAL IERARCHICAL B B AYESIAN AYESIAN M M ODELLING ODELLING OF THE OF THE S S PATIAL PATIAL D D EPENDENCE EPENDENCE OF OF I I NSURANCE NSURANCE R R ISK ISK L L Á Á SZL SZL Ó Ó M M ÁRKUS ÁRKUS and and M M IKLÓS IKLÓS A A RATÓ RATÓ Eötvös Loránd University Eötvös Loránd University Budapest, Hungary Budapest, Hungary

Transcript of H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M...

Page 1: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

HHIERARCHICALIERARCHICAL BBAYESIANAYESIAN MMODELLINGODELLING OF THEOF THE S SPATIALPATIAL D DEPENDENCE EPENDENCE

OF OF IINSURANCENSURANCE R RISKISK

LLÁÁSZLSZLÓ Ó MMÁRKUSÁRKUS and and MMIKLÓS IKLÓS AARATÓRATÓ

Eötvös Loránd UniversityEötvös Loránd UniversityBudapest, HungaryBudapest, Hungary

Page 2: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

The basis for locally dependent premiumsThe basis for locally dependent premiums

Companies apply spatially dependent premiums for various types Companies apply spatially dependent premiums for various types of insurances. More risky customers should pay more, but how to of insurances. More risky customers should pay more, but how to determine the dependence of risk on location?determine the dependence of risk on location?

We analyse third party liability motor insurances data for a We analyse third party liability motor insurances data for a certain company in Hungary. Only certain company in Hungary. Only claim frequencyclaim frequency is is considered in this talk, claim size needs different models. So the considered in this talk, claim size needs different models. So the occurrence of claims constitues the risks for the present talk.occurrence of claims constitues the risks for the present talk.

An insurance company may not want to set its premium rating An insurance company may not want to set its premium rating changing from locality to locality, but it has to know how much changing from locality to locality, but it has to know how much discrepancy is resulted from smoothing ie. aggregating for larger discrepancy is resulted from smoothing ie. aggregating for larger regions – customers are very sensitive for “unjustly set” rates. regions – customers are very sensitive for “unjustly set” rates.

Page 3: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

Information from the neighbourhood to be usedInformation from the neighbourhood to be used

Only the capital Budapest is large enough for reliable direct Only the capital Budapest is large enough for reliable direct risk estimation.risk estimation.

In a village with 2 contracts 1 occurring claim increases In a village with 2 contracts 1 occurring claim increases dramatically the dramatically the estimatedestimated risk, but not the risk, but not the truetrue one. one.

What to do with localities with no contractWhat to do with localities with no contract The spatial risk component cannot be estimated from the local The spatial risk component cannot be estimated from the local

experience alone, in addition the information available in the experience alone, in addition the information available in the neighbourhoods has to be accounted for. But what to call neighbourhoods has to be accounted for. But what to call neighbourhoods? neighbourhoods?

Being aware of its shortcomings, we choose all the localities Being aware of its shortcomings, we choose all the localities within 15 km aerial distance to be neighbours of a given within 15 km aerial distance to be neighbours of a given locality.locality.

Page 4: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

The inhomogeneous spatial Poisson processThe inhomogeneous spatial Poisson process

Suppose the claim frequency ZSuppose the claim frequency Zjj of the j-th individual contract to of the j-th individual contract to be distributed by Poisson law. be distributed by Poisson law.

Its Poisson intensity parameter depends on the Its Poisson intensity parameter depends on the exposure timeexposure time ττjj

(the time spent in risk), which is known to us as data. (the time spent in risk), which is known to us as data. Furthermore the intensity depends some other Furthermore the intensity depends some other risk factorsrisk factors

characterising the contract (such as car type, age etc.).characterising the contract (such as car type, age etc.).Finally the intensity parameter depends on the Finally the intensity parameter depends on the location location where the where the

contract belongs to.contract belongs to.Suppose in addition that interdependence among claim Suppose in addition that interdependence among claim

frequencies is created solely through the intensity parameters, i.e. frequencies is created solely through the intensity parameters, i.e. ZZj j -s are conditionally independent given the values of the -s are conditionally independent given the values of the intensities.intensities.

Our final assumption is that the effects of the exposure time, risk Our final assumption is that the effects of the exposure time, risk factors and location are multiplicative on the intensity.factors and location are multiplicative on the intensity.

Page 5: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

Contract-level modelContract-level model

So we end up with ZSo we end up with Zj j distributed as Poisson( distributed as Poisson(··jj··ττjj·e·eii) with the ) with the

average intensity or common claim frequency average intensity or common claim frequency , the risk factor , the risk factor effect effect jj, exposure , exposure ττjj and the spatial risk parameter and the spatial risk parameter eeii ..

The additional risk factors are The additional risk factors are car type (car type (3030)) --gender (gender (3 3 male, female, company)male, female, company) --age group (age group (66)) --population size (population size (1010))

For the first instance suppose For the first instance suppose and all e and all eii –s to be equal to 1. –s to be equal to 1. Then Then jj-s are easily estimable by a generalised linear model.-s are easily estimable by a generalised linear model.

Introducing now Introducing now jj··ττjj as the as the modified exposuremodified exposure (denoted by (denoted by ττjj** ), ),

we can build a model for the claim frequencies at locations and we can build a model for the claim frequencies at locations and estimate the spatial risk parameter eestimate the spatial risk parameter eii . .

Page 6: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

Location-level modelLocation-level model

By virtue of the conditional independence, the claim By virtue of the conditional independence, the claim frequency Yfrequency Yii at the i-th location will be distributed as at the i-th location will be distributed as

Poisson(Poisson(··∑∑ττjj**·e·eii), where the summation goes over all ), where the summation goes over all

contracts belonging to location i.contracts belonging to location i. In this model we consider ∑In this model we consider ∑ττjj

* * as given (“observed” data), as given (“observed” data),

even though it contains estimated components, and denote it even though it contains estimated components, and denote it by by ttii..

After estimating eAfter estimating ei i it is possible to return to the contract level it is possible to return to the contract level and reestimate the effects of the risk factors and iterate this and reestimate the effects of the risk factors and iterate this procedure.procedure.

Remarkable that stability can be reached within a few steps.Remarkable that stability can be reached within a few steps.

Page 7: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

The hierarchical Bayesian modelThe hierarchical Bayesian model Let us introduce some further notations:Let us introduce some further notations:

YYii: number of claims: number of claims,, ttii: : modified exposure time,modified exposure time, θθii: risk factor: risk factorat at the i-th location, the i-th location, i i = 1, 2, …, = 1, 2, …, NN, , λλ: common claim frequency: common claim frequency

AA:: neighbourhood matrixneighbourhood matrix

ρρ: parameter: parameter of the covariance of the covariance pp, , qq, , αα, , ββ: : Bayesian Bayesian parametersparameters

The claim frequency follows a non-homogeneous Poisson The claim frequency follows a non-homogeneous Poisson process. That is, process. That is, YYii-s-s are independentare independent Poisson Poisson((··ttii··eeii) ) distributed distributed random variablesrandom variables, , givengiven λλ andand ΘΘii..

On the second level of model hierarchy suppose the spatial On the second level of model hierarchy suppose the spatial parameters parameters ΘΘjj-s to be normally distributed -s to be normally distributed

with the covariance matrix Σ=(I-with the covariance matrix Σ=(I-ρρA)A)-1-1, depending on the , depending on the neighbourhood matrix Aneighbourhood matrix A

otherwise0

locations ngneighbouri tocorrespond ji,1)( , jiA

)AI,0(~ 1 NNorm

Page 8: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

We must keep the covariance matrix Σ positive definite, therefore We must keep the covariance matrix Σ positive definite, therefore suppose the following prior on the parametersuppose the following prior on the parameter and and ρρ

AA

A

of eigenvalue maximal thebeing )(

,)(

1 re whe, ),(~

max

maxmax

max

qpBeta

1

max

1

2/1

11

12

1exp

expexp,

q

pTT

N

i

yN

ii

T ii teyyf

A

AI

p and q are conditional on p and q are conditional on ρρ prescribing the expectation and variance asprescribing the expectation and variance as

p/(p+q)= ρp/(p+q)= ρ and and ρρ22(1-ρ)/(p+ρ)=(1-ρ)/(p+ρ)=22

We have to take care of the update of We have to take care of the update of ρρ, since this distribution is not , since this distribution is not symmetric. R’s xbeta function helps to compute the correction for the symmetric. R’s xbeta function helps to compute the correction for the posterior ratioposterior ratio Under these assumptions the posterior can be computed asUnder these assumptions the posterior can be computed as

Page 9: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

From here we have the form for the log-posterior asFrom here we have the form for the log-posterior as

For For λ λ the computation of the maximum likelihood estimator, the computation of the maximum likelihood estimator, conditional on conditional on ρρ and and Θ Θ is possible, asis possible, as

For For ρρ and and ΘΘ Metropolis-Hastings update is needed Metropolis-Hastings update is needed

max

111

1log)1(log)1(2

1

)(1log2

1log,log

qp

yteyyf

TT

N

ii

N

ii

N

ii

T i

A

A

N

ii

N

ii

te

y

i

1

Page 10: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

The problem is that The problem is that ΘΘ is a 3111 long vector is a 3111 long vector Updating the posterior requires the computation of a quadratic form with a Updating the posterior requires the computation of a quadratic form with a

3111x3111 matrix, at each coordinate of the 3111 long vector3111x3111 matrix, at each coordinate of the 3111 long vector So it is clearly paralysing step even on a very fast computer, even if trying So it is clearly paralysing step even on a very fast computer, even if trying

to factorise the matrix into a full rank diagonal plus a sparse matrixto factorise the matrix into a full rank diagonal plus a sparse matrix We used the following updating ruleWe used the following updating rule Propose in all the coordinates, one by one, and compute the increment Propose in all the coordinates, one by one, and compute the increment

between the between the presentpresent logposterior and the one-coordinate-update. (By not logposterior and the one-coordinate-update. (By not updating the logposterior, we can use vector operation instead of cycles updating the logposterior, we can use vector operation instead of cycles which is a lot faster)which is a lot faster)

Determine on this basis those coordinates where to accept the proposalDetermine on this basis those coordinates where to accept the proposal Update the logposteriorUpdate the logposterior Update the other parametersUpdate the other parameters In these steps the logposterior is updated sequentiallyIn these steps the logposterior is updated sequentially 10 000 update of 10 000 update of Θ Θ (with cca. 80 % acceptance) and 250 000 (with cca. 80 % acceptance) and 250 000 updateupdate for for ρ ρ

and and λ λ is possible in about 2 hours running time on a PC.is possible in about 2 hours running time on a PC.

Page 11: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

Convergence of Convergence of the parametersthe parameters

0 2000 4000 6000 8000

-10

-50

510

Index

outp

ut1[

1, 1

:nit]

0 2000 4000 6000 8000

24

68

1012

Index

outp

ut1[

2, 1

:nit]

0 2000 4000 6000 8000

-10

-50

510

Index

outp

ut1[

3, 1

:nit]

0 2000 4000 6000 8000

-10

-50

510

Index

outp

ut1[

4, 1

:nit]

0 2000 4000 6000 8000

24

68

10

Index

outp

ut1[

5, 1

:nit]

0 2000 4000 6000 8000

-10

-50

510

Index

outp

ut1[

6, 1

:nit]

0 2000 4000 6000 8000

-10

-50

510

15

Index

outp

ut1[

7, 1

:nit]

0 2000 4000 6000 8000

-10

-50

510

15

Index

outp

ut1[

8, 1

:nit]

0 2000 4000 6000 8000

46

810

12

Index

outp

ut1[

9, 1

:nit]

0 50000 100000 150000 200000

6000

10000

14000

logpost

(120 -

outp

os[1

:(nit *

bit)]

)

0 50000 100000 150000 200000

0.0

0.1

0.2

0.3

0.4

0.5

lambda1e-04

outp

ut2

[1,

100:(

nit *

bit)]

0 50000 100000 150000 200000

0.3

50.4

00.4

50.5

00.5

5

tau0.350631528281863

outp

ut2

[2,

1:(

nit *

bit)]

0 50000 100000 150000 200000

0.0

03

0.0

04

0.0

05

0.0

06

rho0.00587265030943564

outp

ut2

[3,

100:(

nit *

bit)]

acceptance ratioacceptance ratioλλ : 34,4%, : 34,4%, ρρ: 18.6%, : 18.6%, Θ:Θ: 74.1% 74.1%meansmeansλλ : : 0.0000843 0.0000843, , ρρ: : 0.005870.00587, , : :0.3440.344

Page 12: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

Updates of logposteriorsUpdates of logposteriors

0 2000 4000 6000 8000

-300

-200

-100

0100

logpost11

outp

ut1

[11,

10:n

it]

0 2000 4000 6000 8000

-1000

0500

1500

logpost12

outp

ut1

[12,

10:n

it]

0 2000 4000 6000 8000

-50

050

100

logpost13

outp

ut1

[13,

10:n

it]

- outp

ut1

[14,

10:n

it]

0 2000 4000 6000 8000

-50

050

100

logpost14

outp

ut1

[14,

10:n

it]

Page 13: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

By estimating λ we can compare the expected number of By estimating λ we can compare the expected number of claims to the observed ones claims to the observed ones

There are other risk factors than location, that have to be There are other risk factors than location, that have to be accounted for, but accounted for, but suppose the oppositesuppose the opposite for a moment. for a moment.

When When expected < observedexpected < observed, compute the probability of , compute the probability of sample exceedence sample exceedence P(YP(Yjjyyjj)) , whereas when , whereas when expected > expected >

observedobserved compute the probability of sample domination compute the probability of sample domination P(YP(Yjj

yyjj)) Plot these probabilities on a map – this is the so called Plot these probabilities on a map – this is the so called

probability map, measuring the inhomogeneity of the Poisson probability map, measuring the inhomogeneity of the Poisson processprocess

Page 14: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

Probability map of claims, based on exposure timeProbability map of claims, based on exposure time

16 17 18 19 20 21 22 23

46

.04

6.5

47

.04

7.5

48

.04

8.5

prmaps[, 1]

prm

ap

s[, 2

]

There are further risk factors, like age of the policyholder, car There are further risk factors, like age of the policyholder, car type (ccm), or population size of the locality, etc.type (ccm), or population size of the locality, etc.A simple general linear model can be used for adjusting for A simple general linear model can be used for adjusting for

these risk factors, but even then, a probability map clearly these risk factors, but even then, a probability map clearly shows a spatial inhomogeneity in the remaining risksshows a spatial inhomogeneity in the remaining risks

Other risk factorsOther risk factors

16 17 18 19 20 21 22 23

46

.04

6.5

47

.04

7.5

48

.04

8.5

prmaps[, 1]

prm

ap

s[, 2

]

Page 15: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

Comparison of observed and expectedComparison of observed and expected

0 500 1500 2500

46

812

16

spatial parameters

theta

mean2

0 500 1500 2500

02000

4000

observed claims

y

0 500 1500 2500

02000

4000

expected claims

expecte

dcla

im2

0 500 1500 2500

-3-1

12

3

residuals

rem

cla

im2

16 17 18 19 20 21 22 23

46

.04

6.5

47

.04

7.5

48

.04

8.5

prmaps[, 1]

prm

ap

s[, 2

]

The expected claim frequency has to be compared to the observed oneThe expected claim frequency has to be compared to the observed oneand the probability map can be drawnand the probability map can be drawnClearly the residuals are almost equally likely everywhereClearly the residuals are almost equally likely everywhere

Page 16: H IERARCHICAL B AYESIAN M ODELLING OF THE S PATIAL D EPENDENCE OF I NSURANCE R ISK L ÁSZLÓ M ÁRKUS and M IKLÓS A RATÓ Eötvös Loránd University Budapest,

Premium clustering based on the spatial structurePremium clustering based on the spatial structure

16 17 18 19 20 21 22 23

64

65

66

67

surface order = 0 , distance = 2

longitude

sca

led

latit

ud

e