MAT8886 Extremes and sums (of i.i.d. random variables)

[This article was first published on Freakonometrics - Tag - R-english, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Yesterday, we have discussed briefly sums and maximas of i.i.d. random variables using the concept of subexponential distributions. Today, we will introduce the concept of regular variation: a positive function is said to be regularly varying (at infinity), denoted https://i1.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-30.gif?w=578, for some https://i1.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-31.gif?w=578, if

https://i1.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-33.gif?w=578

for all https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexo_34.gif?w=578. An this concept can be related to sums and maxima (see section 6.2.6 in Embrechts et al. (1997)). Consider i.i.d. positive random variables https://i1.wp.com/freakonometrics.blog.free.fr/public/perso5/subsexp-01.gif?w=578: let https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-2.gif?w=578 and https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-3.gif?w=578. Then it can be shown easily that

  • https://i0.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-20.gif?w=578 if and only if
https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-10.gif?w=578
  • https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-21.gif?w=578 for some https://i0.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-23.gif?w=578 if and only if the exists a non-degenerate variable https://i0.wp.com/freakonometrics.blog.free.fr/public/perso5/Z.gif?w=578 such that
https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-13.gif?w=578
  • https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-21.gif?w=578 with https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-22.gif?w=578 if and only if
https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-14.gif?w=578

If is not that simple to check for such convergences, it is still possible to use graphs to study the behavior of the empirical version of those quantities. Consider the following function to visualize convergence of empirical ratios,

CONVERGENCE=function(g,p=1,n=500000){
set.seed(1)
X=g(n);X1=g(n);X2=g(n);X3= g(n);X4=g(n)
Tp =cummax(X^p)/cumsum(X^p)
Tp1=cummax(X1^p)/cumsum(X1^p)
Tp2=cummax(X2^p)/cumsum(X2^p)
Tp3=cummax(X3^p)/cumsum(X3^p)
Tp4=cummax(X4^p)/cumsum(X4^p)
plot(Tp4,type="l",ylim=c(0,1),log="x",
xlim=c(100,n),ylab="",col="light blue",xlab="")
lines(Tp1,col="light green")
lines(Tp2,col="yellow")
lines(Tp3,col="pink")
lines(Tp,lwd=2)
abline(h=0:1,col="red",lty=2)
}

or the following to study the “asymptotic” distribution of the ratio on simulated samples

LIMITDIST=function(g,p=1,n=500000,ns=1000){
set.seed(1)
T=rep(NA,ns)
for(i in 1:ns){
X=g(n)
T[i]=max(X^p)/sum(X^p)
}
hist(T,breaks=seq(0,1,by=.05),probability=TRUE,
col="light green",ylab="",xlab="",main="")
}

In the case of exponentially distributed variables, we have

CONVERGENCE(rexp)

For variables with a lognormal distribution,

CONVERGENCE(rlnorm)

And finally, consider the case of a Pareto distribution

rpareto=function(n){runif(n)^(-1/1.5)-1}
CONVERGENCE(rpareto)

Here, it looks like those three distributions have finite variance (and actually, they do). To go one step further, for https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp00.gif?w=578, define https://i1.wp.com/freakonometrics.blog.free.fr/public/perso5/suuuuuubexp.gif?w=578 and https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-5.gif?w=578. Then analogous results can be derived,

  • https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-99.gif?w=578 if and only if
https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-11.gif?w=578
  • https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-21.gif?w=578 for some https://i1.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-25.gif?w=578 if and only if the exists a non-degenerate variable https://i0.wp.com/freakonometrics.blog.free.fr/public/perso5/Zk.gif?w=578 such that
https://i0.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-12.gif?w=578
  • https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-21.gif?w=578 with https://i2.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-22.gif?w=578 if and only if
https://i1.wp.com/freakonometrics.blog.free.fr/public/perso5/subexp-15.gif?w=578

Again, it is possible to use the function defined above,

CONVERGENCE(rexp,p=2)

or

CONVERGENCE(rexp,p=3)

or even

CONVERGENCE(rexp,p=10)

If the power is not too high, it looks like the ratio goes to zero. But when it becomes larger, it looks like more simulations might be necessary to say something relevant.

CONVERGENCE(rlnorm,p=2)

or

CONVERGENCE(rlnorm,p=3)

Here also, it looks like we have a light tailed distribution (and actually, it is the case). And finally, if we consider the case of a Pareto distribution

CONVERGENCE(rpareto,p=2)

Then it looks like it is an heavy tailed distribution. In order to get a better understanding, plot the distribution of the ratio obtained from 1,000 simulated samples (of size 500,000),

LIMITDIST(rpareto,p=1)

versus

LIMITDIST(rpareto,p=2)

So obviously, something is going on between 1 and 2 (recall that the power parameter of the Pareto distribution is 1.5).

To leave a comment for the author, please follow the link and comment on their blog: Freakonometrics - Tag - R-english.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)