evfit Gumbel parameters alteration for maxima distribution
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Kris Fedorenko
le 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
This MATLAB answers post also might be helpful: https://www.mathworks.com/matlabcentral/answers/315084-how-can-i-fit-a-gumbel-maximum-distribution-using-both-maximum-likelihood-estimates-and-method-of-mo
Hope this helps!
Kris
2 commentaires
Kris Fedorenko
le 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
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!