Given a sequence of iid samples $X_1, \dots, X_n,$ where each $X_i$ comes from a Weibull distribution with shape parameter $k$ and scale parameter $\lambda$. Then it is a well-known result that the maximum $M_n:=max(X_1,\dots, X_n)$ converges weakly to a Gumbel distribution.
I am wondering: How large should $n$ be in practice such that $M_n$ can be fitted reasonably by a Gumbel distribution?
The reason why I ask the question is as follows. I performed some simulation studies in R
, where I simulated Weibull distributed samples for different sample sizes, shape and scale parameters and then I fitted a Gumbel distribution to the resulting maxima. I plotted the histogram of the maxima and plotted the estimated Gumbel density to compare both.
Consider the following example code:
library("fitdistrplus")
library("extraDistr")
k <- 1
lambda <- 1
n_sim <- 1e5
n <- 1e4
m <- numeric(n_sim)
for (i in 1:n_sim) {
m[i] <- max(rweibull(n, shape = k, scale = lambda))
}
gumbel_fit <- fitdist(m, "gumbel", start = list("mu" = 0, "sigma" = 1))$estimate
m_hist <- hist(m, breaks = 50, freq = F)
x_seq <- seq(min(m_hist$breaks), max(m_hist$breaks), , 1000)
y <- dgumbel(x_seq, mu = gumbel_fit[1], sigma = gumbel_fit[2])
lines(x_seq, y, col = "red")
Taking $k=1, \lambda = 1, n=10^4,$ and $n_{sim}=10^5$ gives the following plot.
In this case we see an almost perfect fit.
Now change the shape parameter to $k=0.3$ and keep all other parameters. This results in the following.
For this scale parameter the Gumbel distribution yields no sufficient approximation. In particular the bad approximation of the right tail is troublesome, as I am mainly interested in big quantiles of the estimated distribution. Fitting a Generalized Extreme Value distribution yields much better approximations.
Now let $k=3$ and keep all other parameters. This yields the following plot.
Again, it seems that the Gumbel distribution cannot fit the data, which can be seen nicely in the tails.
To conclude: Although the Weibull distribution belongs to the maximum domain of attraction of the Gumbel distribution, the goodness of fit of a Gumbel distribution depends heavily on the parameters and for some combinations of scale and shape parameter it seems to take a ridiculous sample size $n$ that $M_n$ can be fitted reasonably by a Gumbel distribution.
Are my conclusions correct? How can you estimate the sample size $n$ that it takes for a reasonable fit? Is it advisable in practice to use the Gumbel distribution or should one always fit a Generalized Extreme Value distribution to the data?