Professional Documents
Culture Documents
Poisson processes
Summary
Syllabus objectives
3.3 Define and apply a Markov process
3.3.2 Define a Poisson process, derive the distribution of the number of events in a
given time interval, derive the distribution of inter-event times, and apply
these results.
0 Introduction
In this document we provide a summary of the key techniques you have learned throughout this
section.
We advise you to keep this close by so that you can refer back to it throughout your study.
1 Summary
This summary assumes that dates are given in the first column of your data.
Data files
To find your working directory:
getwd()
setwd("c:\\Temp")
claims
Summarising data
To see just the first few rows:
head(claims)
nrow(claims)
claims[6,]
claims[6,1]
Manipulating dates
To convert dates into an integer number of days:
as.numeric(claims[6,1])
diff(as.numeric(claims[,1]))
Combining values
To create vectors of data:
c(NA,diff(as.numeric(claims[,1])))
Or, if claims is a data frame and not a matrix, add a new column and name it all in one step:
mean.time = mean(claims[,4][2:length(claims$Diff)])
Poiss.param = 1/mean.time
proportion.motor = length(motor[,4])/length(claims[,4])
Poiss.param.motor = Poiss.param*proportion.motor
E X j and var X j 2
E X j var X j and E X j
mean.amount = mean(claims$claim.amount)
sd.amount = sqrt(var(claims$claim.amount))
mean.amount
sd.amount
beta = mean.amount/sd.amount^2
alpha = beta*mean.amount