Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
ACST 8083 ACTUARIAL STATISTICS
Answer ALL of the questions (Questions 1-5) by providing a typed report
in Word or PDF which should include your answers and explanations to the
answers, your R codes used for the computations and the respective com-
puting results. The computing results may be presented in tables or figures
whenever appropriate. The typed report including your answers and expla-
nations, your R codes and results, tables and figures should not be more than
10 pages.
The Norwegian fire insurance dataset is considered. The dataset contains
183,999 observations of automobile insurance policies losses in one year. It
was obtained from the R package “CASdatasets” (Dutang and Charpentier
(2020)). To install and load the “CASdatasets” package in R, the following
commands can be used:
install.packages(’sp’)
library(sp)
install.packages(’xts’)
library(xts)
install.packages(’zoo’)
library(zoo)
install.packages("CASdatasets",
repos = "http://dutangc.free.fr/pub/RRepos/",
type="source")
library(CASdatasets)
After installing and loading the “CASdatasets” package, the Norwegian fire
insurance dataset can be loaded using the following command:
data(norauto)
Using Bayesian statistics and Bayesian credibility theory, we first analyze
the data for the numbers of claims, which are contained in the variable
“NbClaim” of the dataset. Specifically, we first consider a parametric Bayesian
model under which it is supposed that the numbers of claims are independent
and identically distributed random variables from a Poisson distribution with
an unknown rate parameter λ. The unknown rate parameter λ is assumed to
be a random variable which follows a Gamma distribution. It is given that
the prior mean and variance of λ are 0.03 and 0.05, respectively. Answer
Questions 1-3 as follows:
QUESTIONS TO BE CONTINUED NEXT PAGE
PLEASE TURN TO NEXT PAGE
1
(1) Use R to compute the mean and standard deviation of the Bayesian
posterior density for the unknown rate parameter λ.
(2) Plot the Bayesian posterior density for λ using R. You may use the
minimum and maximum values of the horizontal axis as 0.04 and 0.05,
respectively.
(3) Use the credibility function “cm” in the R package “actuar” (Dutang et
al. (2008) and Goulet et al. (2019)) to compute the Bayesian credibility
estimate for λ.
Now, we analyze the data for the amounts of claims, which are contained in
the variable “ClaimAmount” of the dataset. Specifically, we consider another
parametric Bayesian model under which it is supposed that the amounts of
claims are independent and identically distributed random variables from
a Normal distribution with an unknown mean Θ and a known standard
deviation σ = 8000. The unknown mean parameter Θ is assumed to be a
random variable which follows another Normal distribution. It is given that
the prior mean and standard deviation of Θ are 2000 and 6000, respectively.
Answer Questions 4-5 as follows:
(4) Use R to compute the Bayesian posterior density for the unknown mean
Θ.
(5) Write a R function to compute a 95% Bayesian confidence interval for
Θ, and display the results.