Categories &

Functions List

Function Reference: gevcdf

statistics: p = gevcdf (x, k, sigma, mu)
statistics: p = gevcdf (x, k, sigma, mu, "upper")

Generalized extreme value (GEV) cumulative distribution function (CDF).

For each element of x, compute the cumulative distribution function (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.

[…] = gevcdf (x, k, sigma, mu, "upper") computes the upper tail probability of the GEV distribution with parameters k, sigma, and mu, at the values in x.

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

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

Source Code: gevcdf

Example: 1

 

 ## Plot various CDFs from the generalized extreme value distribution
 x = -1:0.001:10;
 p1 = gevcdf (x, 1, 1, 1);
 p2 = gevcdf (x, 0.5, 1, 1);
 p3 = gevcdf (x, 1, 1, 5);
 p4 = gevcdf (x, 1, 2, 5);
 p5 = gevcdf (x, 1, 5, 5);
 p6 = gevcdf (x, 1, 0.5, 5);
 plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ...
       x, p4, "-c", x, p5, "-m", x, p6, "-k")
 grid on
 xlim ([-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", "southeast")
 title ("Generalized extreme value CDF")
 xlabel ("values in x")
 ylabel ("probability")

                    
plotted figure