MATLAB Answers

evfit Gumbel parameters alteration for maxima distribution

23 views (last 30 days)
Chris
Chris on 6 Sep 2017
Commented: Kris Fedorenko on 14 Sep 2017
I have understood that in order to use evfit for a maxima distribution of a dataset called i.e. "Data" we have to do evfit(-Data). Does this give the Gumbel parameters right for the maxima or I have also to take the negative value of the location parameter as a friend suggested?

  0 Comments

Sign in to comment.

Answers (1)

Kris Fedorenko
Kris Fedorenko on 8 Sep 2017
Hi Chris!
It depends on what you need the location parameter for. Keep in mind that Gumbel maximum distribution is basically a "mirrored" version of the Gumbel minimum distribution and that all the computations using the distribution parameters need to happen with the 'flipped' x axis.
Here is an example demonstrating this point:
rng default; % For reproducibility
% generate 1000 samples from a normal distribution, 500 datapoints each
samples = randn(1000,500);
% one sample of maxima (1000 datapoints)
xMaxima = max(samples, [], 2);
% plot the distribution
figure;
h = histogram(xMaxima);
% fit the extreme value distribution to the sample of maximums
paramEstsMaxima = evfit(-xMaxima)
% plot the pdf of fitted distribution
figure('Name', 'pdf as is')
x = -5:0.1:-2;
y = evpdf(x, paramEstsMaxima(1), paramEstsMaxima(2));
plot(x, y)
figure('Name', 'pdf on flipped x axis')
x = h.BinEdges;
y = evpdf(-x, paramEstsMaxima(1), paramEstsMaxima(2));
plot(x, y)
% note that distribution was computed on the flipped x values,
% but is plotted against the original ones
Hope this helps!
Kris

  2 Comments

Chris
Chris on 11 Sep 2017
Hi Kris! Thanks for the reply! This helped me to understand better the whole concept though the mirroring thing still confuses me a bit. In my case, my x axis is temperature so it has to be positive, and I have some annual maxima to fit a Gumbel distribution on. I use the evfit(-xMaxima) as you suggested, but then, are the Gumbel parameters that characterize my distribution the ones I get from evfit? Or I have to change them somehow to correspond to this mirroring?
Kris Fedorenko
Kris Fedorenko on 14 Sep 2017
Hi Chris,
You can think of mirroring the Gumbel minimum distribution as a bit of a trick to be able to model Gumbel maximum distribution (we map our maxima to minima by negating them and get the parameters for the distribution of THAT data). So the parameters we get from evfit do not describe the true maximum distribution, but a 'flipped' version of it (as you can see from the second figure in my original post). Just negating the location parameter of the 'flipped' distribution is not enough to get the actual distribution. It would just move the distribution while the shape remains 'flipped', as you can see here:
figure('Name', 'distribution based on fitted parameters: (-location, scale)')
x = 1:0.1:4;
y = evpdf(x, -paramEstsMaxima(1), paramEstsMaxima(2));
plot(x, y)
To model the actual distribution of maximums, you might want to look into the Generalized Extreme Value Distribution .
Hope this helps!
Kris

Sign in to comment.

Sign in to answer this question.