Edgeworth approximation
Edgeworth approximation of the CDF using the first four moments.
pEdge(x, moments = c(0, 1, 0, 3), raw = TRUE, lower.tail = TRUE, log.p = FALSE)
x |
Vector of points to approximate the CDF in. |
moments |
The first four raw moments if |
raw |
When |
lower.tail |
Logical indicating if the probabilities are of the form P(X≤ x) ( |
log.p |
Logical indicating if the probabilities are given as \log(p), default is |
Denote the standard normal PDF and CDF respectively by φ and Φ. Let μ be the first moment, σ^2=E((X-μ)^2) the variance, μ_3=E((X-μ)^3) the third central moment and μ_4=E((X-μ)^4) the fourth central moment of the random variable X. The corresponding cumulants are given by κ_1=μ, κ_2=σ^2, κ_3=μ_3 and κ_4=μ_4-3σ^4.
Now consider the random variable Z=(X-μ)/σ, which has cumulants 0, 1, ν=κ_3/σ^3 and k=κ_4/σ^4=μ_4/σ^4-3.
The Edgeworth approximation for the CDF of X (F(x)) is given by
\hat{F}_{E}(x) = Φ(z) + φ(z) (-ν/6 h_2(z)- (3k\times h_3(z)+γ_3^2h_5(z))/72)
with h_2(z)=z^2-1, h_3(z)=z^3-3z, h_5(z)=z^5-10z^3+15z and z=(x-μ)/σ.
See Section 6.2 of Albrecher et al. (2017) for more details.
Vector of estimates for the probabilities F(x)=P(X≤ x).
Tom Reynkens
Albrecher, H., Beirlant, J. and Teugels, J. (2017). Reinsurance: Actuarial and Statistical Aspects, Wiley, Chichester.
Cheah, P.K., Fraser, D.A.S. and Reid, N. (1993). "Some Alternatives to Edgeworth." The Canadian Journal of Statistics, 21(2), 131–138.
# Chi-squared sample X <- rchisq(1000, 2) x <- seq(0, 10, 0.01) # Empirical moments moments = c(mean(X), mean(X^2), mean(X^3), mean(X^4)) # Gram-Charlier approximation p1 <- pGC(x, moments) # Edgeworth approximation p2 <- pEdge(x, moments) # Normal approximation p3 <- pClas(x, mean(X), var(X)) # 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) lines(x, p3, lty=4, col="blue") legend("bottomright", c("True CDF", "GC approximation", "Edgeworth approximation", "Normal approximation"), col=c("red", "black", "black", "blue"), lty=1:4, lwd=2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.