# Not only verbs but also believes can be conjugated

November 26, 2013
By

(This article was first published on mages' blog, and kindly contributed to R-bloggers)

Following on from last week, where I presented a simple example of a Bayesian network with discrete probabilities to predict the number of claims for a motor insurance customer, I will look at continuos probability distributions today. Here I follow example 16.17 in Loss Models: From Data to Decisions [1].

Suppose there is a class of risks that incurs random losses following an exponential distribution (density $$f(x) = \Theta {e}^{- \Theta x}$$) with mean $$1/\Theta$$. Further, I believe that $$\Theta$$ varies according to a gamma distribution (density $$f(x)= \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha \,-\, 1} e^{- \beta x }$$) with shape $$\alpha=4$$ and rate $$\beta=1000$$.

In the same way as I had good and bad driver in my previous post, here I have clients with different characteristics, reflected by the gamma distribution. I shall call the gamma distribution with the above parameters my prior parameter distribution and the exponential distribution the prior predictive distribution.

The textbook tells me that the unconditional mixed distribution of an exponential distribution with parameter $$\Theta$$, whereby $$\Theta$$ has a gamma distribution, is a Pareto II distribution (density $$f(x) = \frac{\alpha \beta^\alpha}{(x+\beta)^{\alpha+1}}$$) with parameters $$\alpha,\, \beta$$. Its k-th moment is given in the general case by
$E[X^k] = \frac{\beta^k\Gamma(k+1)\Gamma(\alpha - k)}{\Gamma(\alpha)},\; -1 < k < \alpha.$ Thus, I can calculate the prior expected loss ($$k=1$$) as $$\frac{\beta}{\alpha-1}=\,$$333.33.
Now suppose I have three independent observations, namely losses of $100,$950 and $450 over the last 3 years. The mean loss is$500, which is higher than the \$333.33 of my model.

Question: How should I update my belief about the client's risk profile to predict the expected loss cost for year 4 given those 3 observations?

Visually I can regard this scenario as a graph, with evidence set for years 1 to 3 that I want to propagate through to year 4.