FI 450/597 – 9.28.2021





Pareto – default is Type II

# Make sure to load actuar!
library(actuar)

x <- seq(0,10,.01)
alpha <- 5 # shape
theta <- 10 # scale
p <- dpareto(x,shape=alpha,scale=theta) # density
P <- ppareto(x,shape=alpha,scale=theta) # CDF
plot(x,p,type='l',main="PDF and CDF (blue) for Pareto",ylim=c(0,1),xlim=c(0,10))
lines(x,P,col="blue")


We can apply this to Q1(1) from HW 3:

For a Pareto distribution with α = 3 and θ = 1000, determine VaR at the 95% security level.

qpareto(.95,3,1000) 

[1] 1714.418

and it’s worth comparing to \(\theta=10\).

qpareto(.95,3,10) # notice the difference with the change in scale parameter!

[1] 17.14418


From the STAM tables, notice that \(E[X^k]\) has a factor in the denominator of \((\alpha-k)\).

What does this imply about the moments of a Pareto distribution?



Note: If \(X\) ~ Pareto(\(\alpha\), \(\theta\)), then \(X-d\) | \(X>d\) ~ Pareto(\(\alpha\), \(\theta+d\)).


Single-Parameter Pareto

An S-P Pareto with parameters \(\alpha,\theta\) is a Pareto (\(\alpha, \theta^*\)) that is shifted by the \(\theta\).

sp.theta <- 4
sp <- dpareto1(x,shape=alpha,min=sp.theta) # density
SP <- ppareto1(x,shape=alpha,min=sp.theta) # CDF
plot(x,p,type='l', main="S-P Pareto is a shifted Pareto",ylim=c(0,1),xlim=c(0,10))
lines(x,P)
lines(x,sp,col="blue")
lines(x,SP,col="blue")

However, while a Pareto is defined for \(x>0\), the S-P Pareto is only defined for \(x>\theta\).


Inverse Pareto

Although the Inverse Pareto distribution is parameterized by \(\tau\) and \(\theta\), rather than \(\alpha\) and \(\theta\), the connection to Pareto is straightforward.

If \(X\) ~ Pareto(\(\alpha\), \(\theta\)), then \(X^{-1}\) ~ Inverse Pareto(\(\tau=\alpha\), \(\theta^{-1}\)).


x <- seq(0,2,.01)
alpha <- 3 # shape
theta <- .2 # scale
p <- dpareto(x,shape=alpha,scale=theta) # density
invp <- dinvpareto(x,shape=alpha,scale=theta) # inverse density
plot(x,p,type='l',main='Pareto and Inverse Pareto (red)',ylim=c(0,5),xlim=c(0,2))
lines(x,invp,col='red')

Gamma

Don’t confuse the Gamma(\(\alpha,\theta\)) with the gamma function, \(\Gamma(n)=(n-1)!\), or with the incomplete gamma function, \(\Gamma(n;x)\).

x <- seq(0,20,.1)
alpha1 <- 2 # shape
alpha2 <- 4 # shape
theta1 <- 5 # scale1
theta2 <- 10 # scale2
p1 <- dgamma(x,shape=alpha1,scale=theta1) # MUST use "scale=" !!!!
p1.5 <- dgamma(x,shape=alpha2,scale=theta1) # MUST use "scale=" !!!!
p2 <- dgamma(x,shape=alpha1,scale=theta2) # MUST use "scale=" !!!!
plot(x,p1,type='l',main='Variations on Gamma',ylim=c(0,.1),xlim=c(0,20))
lines(x,p2,col='red')
lines(x,p1.5,col='blue')


Note: The Poisson Shortcut

While finding the CDF for a Gamma distribution is SUPER simple in R, it’s not so easy if you’re working with a pencil and paper. When going old school, this shortcut is extremely useful to evaluate \(\Gamma(\alpha;x/\theta)\) when \(\alpha\) and is a positive integer.

Let \(N\) ~ Poisson(\(\lambda=k\)) and \(\alpha\) a positive integer. Then \(\Gamma(\alpha;k)=1-F_N(\alpha-1)=1-Pr(N<\alpha)\).


Let \(X\) ~ Gamma(\(\alpha=2,\theta=10\)). What is \(F_X(12)\)?

So, \(\alpha=2,\theta=10,\) and \(x=12\).

pgamma(12,shape=2,scale=10) # CDF of the Gamma at x=12

[1] 0.3373727

OR

Use Poisson shortcut with \(k=\frac{x}{\theta}=1.2\).

1-ppois(1,lambda=1.2) # don't forget to use alpha-1 !

[1] 0.3373727

Sum of independent gammas

As was the case with (a,b,0), the sum of independent gammas with the same scale parameter is also gamma with \(\alpha=\sum_i\alpha_i\) and \(\theta = \theta\).


Exponential Distribution

An exponential distribution is a gamma with \(\alpha = 1\). Therefore, given what we now know about the sum of independent gammas, we can see easily that the sum of \(n\) iid exponential RVs having the same \(\theta\) is gamma(\(n,\theta\)).


Remember also that, like the geometric distribution, the exponential distribution is memorylesss. That is,

If \(X\) ~ Exponential(\(\theta\)), then \(X-d\) | \(X>d\) ~ Exponential(\(\theta\)).


Weibull Distribution

A Weibull is a \(\tau^{\text{th}}\) rooted exponential.

That is, if \(X\) ~ Exponential(\(\mu\)), then \(X^{1/\tau}\) ~ Weibull(\(\theta = \mu^{1/\tau},\tau\)).

A family photo

x <- seq(0,10,.01)
gamma <- dgamma(x,shape=2,scale=2)
expon <- dexp(x,rate=1) # rate is theta
weibull <- dweibull(x,shape=1/2,scale=2)
plot(x,gamma,type='l',main='Gamma Family - Gamma (black), Expon (red), Weibull (blue)',ylab='prob',ylim=c(0,1),xlim=c(0,10))
lines(x,expon,col='red')
lines(x,weibull,col='blue')


Finally, each of these distributions has an inverse version:

If \(X\) ~ Gamma(\(\alpha,\theta\)), then \(X^{-1}\) ~ Inverse Gamma(\(\alpha,\theta^{-1}\)).

If \(X\) ~ Exponential(\(\theta\)), then \(X^{-1}\) ~ Inverse Exponential(\(\theta^{-1}\)).

If \(X\) ~ Weibull(\(\theta,\tau\)), then \(X^{-1}\) ~ Inverse Weibull(\(\theta^{-1},\tau\)).