More Distributions for Modeling Claim
In this section, we will discuss two more distributions that are commonly used to model the insurance claims, which are the Pareto distribution and the Weibull distribution.
Pareto distribution
Characteristics of the Pareto distribution
If a random variable follows a Pareto distribution, we denote it as
where and are the shape and scale parameters, respectively.
PDF:
The PDF can be derived by the following mixture distribution:
Suppose and , and the density function of is given by:
Then, the density function of is given by:
CDF:
Survival function:
The survival function can be derived by the following:
Propositions of the Pareto distribution
Mean:
Following the previous setting, we can have:
K-th origin moment:
Derive the -th origin moment
Variance:
Derive the variance of Pareto distribution by standard formula
Estimation of parameters
Method of moments (MM)
In the Pareto distribution, we have two parameters to estimate, so we need to use the method of moments to estimate the parameters and . The first moment of the Pareto distribution is , and the second moment is . Both of them should be equal to the sample moments.
We can solve the following criteria:
Solve the first moment,
Then, replace with in the second moment, we can get the estimator of :
According to the standard solution, we can solve the equation:
Then, we can solve the estimator of :
The estimator of and are:
Maximum likelihood estimation (MLE)
The likelihood function of the Pareto distribution is given by:
Then the log-likelihood function is:
Taking the derivative of the log-likelihood function with respect to and ,
we have the following equations:
Solve the equation, we have the MLE of :
Then, taking the derivative of the log-likelihood function with respect to ,
Solve the equation, we have the MLE of :
Then, we can have the equation:
x <- rpareto(1000, shape = 2, scale = 1)
f <- function(lambda) {
n / sum(log(1 + x / lambda)) - sum(1 / (lambda + x)) / sum(x / (lambda *
(lambda + x)))
}
lambda <- uniroot(f, c(1e-8, 1e8))$root
alpha <- length(x) / sum(log(1 + x / lambda))
paste0("alpha:", alpha)
paste0("lambda:", lambda)Weibull distribution
Characteristics of the Weibull distribution
If a random variable follows a Weibull distribution, we denote it as
where and are the shape and scale parameters, respectively.
PDF:
Weibull distribution can be derived from the exponential distribution.
Suppose , then
First, recall the change of the variable formula:
Then, recall the density function of the exponential distribution:
Then, we have
The inverse function of G is given by
Therefore, the density function of X is given by:
CDF:
Survival function:
Propositions of the Weibull distribution
Mean:
Recall the expectation of the exponential distribution:
Then, extend to the -th origin moment:
Variance:
Estimation of parameters
Method of moments (MM)
The first two moments of the Weibull distribution are:
Solve the first equation with taking logarithem:
Then, we can get the estimator of in the second equation:
Then, we replace in the first equation, we can get the estimator of .
Next, we replace the first and second moments with the sample moments:
Then, we can estimate the parameters and by the following equations:
Finally, we can solve the equation by R or Python.
# generate 1000 Weibull random variables
x <- rweibull(1000, shape = 2, scale = 1)
aux <- log(mean(x))
f <- function(gamma) {
(log(mean(x)) - log(gamma(1 + 1 / gamma))) / log(exp((log(gamma(1 + 2 / gamma)) - log(gamma(1 + 1 / gamma))^2 - log(var(x))) / (2 / gamma))) - gamma
}
gamma <- uniroot(f, c(1e-8, 1e8))$root
c <- exp((log(gamma(1 + 2 / gamma)) - log(gamma(1 + 1 / gamma))^2 - log(var(x))) / (2 / gamma))
cat(
"Estimated shape parameter: ", gamma, "\n",
"Estimated scale parameter: ", c, "\n"
)Maximum likelihood estimation (MLE)
The likelihood functon of Weibull distribution is given by:
The log-likelihood function will be:
Taking the derivative of the log-likelihood function with respect to and , we have the following equations:
Solve the equation, we have the MLE of :
Then, taking the derivative of the log-likelihood function with respect to ,
Replace with , we can get the MLE of :
This equation can be solved by R or Python.
# generate 1000 Weibull random variables
x <- rweibull(1000, shape = 2, scale = 1)
aux <- mean(log(x))
f <- function(gamma) {
1 / gamma + aux - sum(x^gamma * log(x)) / sum(x^gamma)
}
gamma <- uniroot(f, c(1e-8, 1e8))$root
c <- length(x) / sum(x^gamma)
cat(
"Estimated shape parameter: ", gamma, "\n",
"Estimated scale parameter: ", c, "\n"
)