Categories &

Functions List

Function Reference: gevinv

statistics: x = gevinv (p, k, sigma, mu)

Inverse of the generalized extreme value (GEV) cumulative distribution function (iCDF).

For each element of p, compute the quantile (the inverse of the CDF) of the GEV distribution with shape parameter k, scale parameter sigma, and location parameter mu. The size of p is the common size of x, k, sigma, and mu. A scalar input functions as a constant matrix of the same size as the other inputs.

When k < 0, the GEV is the type III extreme value distribution. When k > 0, the GEV distribution is the type II, or Frechet, extreme value distribution. If W has a Weibull distribution as computed by the wblcdf function, then -W has a type III extreme value distribution and 1/W has a type II extreme value distribution. In the limit as k approaches 0, the GEV is the mirror image of the type I extreme value distribution as computed by the evcdf function.

The mean of the GEV distribution is not finite when k >= 1, and the variance is not finite when k >= 1/2. The GEV distribution has positive density only for values of x such that k * (x - mu) / sigma > -1.

Further information about the generalized extreme value distribution can be found at https://en.wikipedia.org/wiki/Generalized_extreme_value_distribution

Input arguments must be double or single; integer, logical, and character arrays are rejected. MATLAB accepts a character array and evaluates it at the character codes, which Octave deliberately does not, since a character array is an integer type and integers are refused too.

See also: gevcdf, gevpdf, gevrnd, gevfit, gevlike, gevstat

Source Code: gevinv

Plot various iCDFs from the generalized extreme value distribution

 p = 0.001:0.001:0.999;
 x1 = gevinv (p, 1, 1, 1);
 x2 = gevinv (p, 0.5, 1, 1);
 x3 = gevinv (p, 1, 1, 5);
 x4 = gevinv (p, 1, 2, 5);
 x5 = gevinv (p, 1, 5, 5);
 x6 = gevinv (p, 1, 0.5, 5);
 plot (p, x1, '-b', p, x2, '-g', p, x3, '-r', ...
       p, x4, '-c', p, x5, '-m', p, x6, '-k')
 grid on
 ylim ([-1, 10])
 legend ({'k = 1, σ = 1, μ = 1', 'k = 0.5, σ = 1, μ = 1', ...
          'k = 1, σ = 1, μ = 5', 'k = 1, σ = 2, μ = 5', ...
          'k = 1, σ = 5, μ = 5', 'k = 1, σ = 0.5, μ = 5'}, ...
         'location', 'northwest')
 title ('Generalized extreme value iCDF')
 xlabel ('probability')
 ylabel ('values in x')
plotted figure