# How can I fit a Gumbel Maximum distribution using both

How can I fit a Gumbel Maximum distribution using both Maximum Likelihood Estimates and Method of Moments Estimates?

*NOTE:-*

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

The usual Gumbel distribution models the *minimum *of a sample and it is captured in MATLAB by the “Extreme Value Distribution”.

The maximum likelihood estimates in this distribution for a particular dataset are obtained by means of the “evfit” function.

However, if we would like to model the *maximum* instead, we need to resort to a different approach. Essentially, the Gumbel maximum distribution is the mirror image of the Gumbel minimum distribution and, therefore, we can still model it using the “Extreme Value Distribution”. Transforming the dataset by taking negatives allows us to send maximums to minimums (and vice versa). As a consequence, fitting a “Extreme Value Distribution” will now model the maximum:

rng default;

xMaxima = max(randn(1000,500), [], 2);pd = fitdist(-xMaxima,'ev')

The maximum likelihood estimates are given by “evfit”:

`paramEstsMaxima = evfit(-xMaxima)`

Bear in mind that any subsequent computations are now based on the transformed dataset. For example, if we would like to calculate a maximum extreme value at p=0.99, we would need to obtain a minimum extreme value at p=0.01 in the counterpart dataset and transform it back to maximum by taking negatives:

**SEE COMPLETE ANSWER CLICK THE LINK**