General Ins - Latest News - A New Year Resolution (of Doodles and Trees)

GI Insight By Alan Chalk
A while back I was pricing a reinsurance contract. It was a fairly simple one. I used the data I had to estimate the chance of a large claim. Then I used the data again to choose how large the large claim would be. Finally I did some simulations (in R of course) and worked out the estimated loss to the layer and also the 95th percentile (which happened to be quite important).

 I took the results to my boss and he said “Have you allowed for parameter uncertainty”? (Actually I believe he said “I can’t believe you have not allowed for parameter uncertainty! How stupid are you!!!***?? “ - but I try to forget that bit). 

 So I went back to R and thought to myself, well, how uncertain am I about the frequency and severities that I have used? I realised I had no real idea, but probably plus or minus 10% should cover it. The rest was dead simple. I just put an extra few words of code in R and out popped the new answer. The 95th percentile was very different as were certain parts of the pricing. (This just goes to show that bosses can sometimes be right.)

 Looking back on this episode I thought – “well it’s a bit sad that the most important thing is parameter uncertainty and I’ve just made that bit up”.

 Enter idea number 1 for this year. Doodles. It’s all about drawing pretty pictures which a nice computer program (WinBUGS) turns in to code for you. It then runs the code for you and tells you not only the answers, but also how uncertain you ought to be about the answers – which as discussed above, can be a wonderful thing. (We could start talking about Bayes at this point – but we won’t.)

 Our look at winBUGS is courtesy of Professor David Scollnik1 (professor of Statistics and Actuarial Science at the University of Calgary) whose material makes up much the following examples.

 Let’s start with the famous Monty Hall problem. (This will illustrate what a Doodle is – although sadly playing this game will not price reinsurance for you.) You are a contestant in a game show and the host (Monty Hall) presents you with three doors. Behind one is a car and behind the other two are goats. You are going to be allowed to open one of the doors and keep whatever is behind it (by the way we presume you are hoping for the car, not the goat). You are asked to choose a door but told not to open it yet. You choose a door. What is the probability that behind that door is a car? One third. This much is obvious. Next, your host tells you that he will open one of the two remaining doors but he will be careful that if one of them contains the car he will not open that one. He opens a door – and we all see that there is a goat behind it. Clearly we now have two doors left, behind one is a car and behind the other is a goat.

 He now asks you if you want to change your choice of door. Should you change your choice? Will it affect your chance of winning?

 You can search the web for Monty Hall and you will find reams of discussion on this problem, but we will just draw a pretty diagram (Doodle) and get winBUGS to simulate the answer.

 The first thing that happens is that Monty thinks in his head which door he will place the car behind. Let’s start our Doodle. With a few clicks in winBUGS we set the oval shape called “MontyChooses” to be a stochastic variable. It takes values from “p” which is this case we have set to be values 1, 2, or 3 with equal probability.


 The next thing that happens is that he actually goes to each of the doors and puts behind each one either a goat (a zero in this program) or a car (a one). This process is done with a loop, represented by a box:


 Next you choose a door. This is represented by the oval called “firstPick”.



 At this stage, running the winBUGS model based on the above picture, gives a probability of getting the car of one third. So far everything is as expected.

 Next we have to tell winBUGS what is behind the door which is left after Monty opens one of the two remaining doors. The main thing here is that if there is a car behind the door that you have already chosen, then there is not a car behind the door you have a choice of switching to. This is done below with in the oval called “carProb”. And finally in the last oval, winBUGS simulates what happens if you were to switch and open the other door.


 That is this. The above diagram is the Doodle for the Monty Hall program. With a few clicks, winBUGS turns it in to some code which you can then run. If you simulate the game a few thousand times, you get the following outcome:


 You can see that if you stick with the first door that you chose, you will win 33% of the time, and if you change, you will win 67% of the time. So you are better off changing doors. Many years ago, when the Monty Hall problem was in vogue, this was surprising. (I still find it surprising but that’s probably just me.)

 Next month we are going to look at a slightly more relevant example – fitting a distribution to large claims and understanding the uncertainty – the kind of example which might make my boss happier (as opposed to this which may make him wonder what I spend my time doing).

 In the meantime if you would like a short note which explains in a little more detail how to install winBUGS and run this example, then please drop me a line at the email address given below.

 See you next month and until then, happy doodling!


 1Scollnik, D.P.M. (2001). Actuarial Modeling with MCMC and BUGS, North American Actuarial Journal, 2001, pages 96-124 and Scollnik, D.P.M. (2000). Actuarial Modeling with MCMC and BUGS: Additional Worked Examples. Actuarial Research Clearing House, 2000.2, pages 433-585

Back to Index

Similar News to this Story

Insurers there for as long as it takes after Storm Desmond
Insurers are today setting out the six key stages in getting those affected by flooding back into their homes and businesses as soon as possible, as t
Standard Life launches UK-wide financial advice business
Standard Life announces the launch of its wholly-owned, UK-wide, financial advice business - responding to fundamental changes that are driving unprec
5 key IT security trends for 2015
Ian Kilpatrick, chairman Wick Hill Group, specialists in secure IP infrastructure solutions, looks at five key IT security trends and solutions for 20

Site Search

Exact   Any  

Latest Actuarial Jobs

Actuarial Login

 Jobseeker    Client
Reminder Logon

APA Sponsors

Actuarial Jobs & News Feeds

Jobs RSS News RSS


Be the first to contribute to our definitive actuarial reference forum. Built by actuaries for actuaries.