# pClas: Classical estimators for the CDF In ReIns: Functions from "Reinsurance: Actuarial and Statistical Aspects"

## Description

Compute approximations of the CDF using the normal approximation, normal-power approximation, shifted Gamma approximation or normal approximation to the shifted Gamma distribution.

## Usage

 1 2 3 pClas(x, mean = 0, variance = 1, skewness = NULL, method = c("normal", "normal-power", "shifted Gamma", "shifted Gamma normal"), lower.tail = TRUE, log.p = FALSE) 

## Arguments

 x Vector of points to approximate the CDF in. mean Mean of the distribution, default is 0. variance Variance of the distribution, default is 1. skewness Skewness coefficient of the distribution, this argument is not used for the normal approximation. Default is NULL meaning no skewness coefficient is provided. method Approximation method to use, one of "normal", "normal-power", "shifted Gamma" or "shifted Gamma normal". Default is "normal". lower.tail Logical indicating if the probabilities are of the form P(X≤ x) (TRUE) or P(X>x) (FALSE). Default is TRUE. log.p Logical indicating if the probabilities are given as \log(p), default is FALSE.

## Details

• The normal approximation for the CDF of the r.v. X is defined as

F_X(x) \approx Φ((x-μ)/σ)

where μ and σ^2 are the mean and variance of X, respectively.

• This approximation can be improved when the skewness parameter

ν=E((X-μ)^3)/σ^3

is available. The normal-power approximation of the CDF is then given by

F_X(x) \approx Φ(√{9/ν^2 + 6z/ν+1}-3/ν)

for z=(x-μ)/σ≥ 1 and 9/ν^2 + 6z/ν+1≥ 0.

• The shifted Gamma approximation uses the approximation

X \approx Γ(4/ν^2, 2/(ν\timesσ)) + μ -2σ/ν.

Here, we need that ν>0.

• The normal approximation to the shifted Gamma distribution approximates the CDF of X as

F_X(x) \approx Φ(√{16/ν^2 + 8z/ν}-√{16/ν^2-1})

for z=(x-μ)/σ≥ 1. We need again that ν>0.

See Section 6.2 of Albrecher et al. (2017) for more details.

## Value

Vector of estimates for the probabilities F(x)=P(X≤ x).

Tom Reynkens

## References

Albrecher, H., Beirlant, J. and Teugels, J. (2017). Reinsurance: Actuarial and Statistical Aspects, Wiley, Chichester.

pEdge, pGC
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 # Chi-squared sample X <- rchisq(1000, 2) x <- seq(0, 10, 0.01) # Classical approximations p1 <- pClas(x, mean(X), var(X)) p2 <- pClas(x, mean(X), var(X), mean((X-mean(X))^3)/sd(X)^3, method="normal-power") p3 <- pClas(x, mean(X), var(X), mean((X-mean(X))^3)/sd(X)^3, method="shifted Gamma") p4 <- pClas(x, mean(X), var(X), mean((X-mean(X))^3)/sd(X)^3, method="shifted Gamma normal") # True probabilities p <- pchisq(x, 2) # Plot true and estimated probabilities plot(x, p, type="l", ylab="F(x)", ylim=c(0,1), col="red") lines(x, p1, lty=2) lines(x, p2, lty=3, col="green") lines(x, p3, lty=4) lines(x, p4, lty=5, col="blue") legend("bottomright", c("True CDF", "normal approximation", "normal-power approximation", "shifted Gamma approximation", "shifted Gamma normal approximation"), lty=1:5, col=c("red", "black", "green", "black", "blue"), lwd=2)