Contenido principal

gevinv

Generalized extreme value inverse cumulative distribution function

Description

x = gevinv(p) returns the inverse cumulative distribution function (icdf) of a generalized extreme value (GEV) distribution with a shape parameter equal to 0, location parameter equal to 0, and scale parameter equal to 1, evaluated at the probability values in p.

x = gevinv(p,k,mu,sigma) returns the icdf of a GEV distribution with the shape parameter k, location parameter mu, and scale parameter sigma, evaluated at the probability values in p.

When k < 0, the GEV distribution is the type III extreme value distribution. When k > 0, the GEV distribution is the type II (Frechet) extreme value distribution. If w has a Weibull distribution, then –w has a type III extreme value distribution and 1/w has a type II extreme value distribution. In the limiting case as k approaches 0, the GEV distribution is the mirror image of the type I (Gumbel) extreme value distribution. For more information, see Generalized Extreme Value Distribution.

The mean of the GEV distribution is not finite when k1, and the variance is not finite when k1/2. The GEV distribution has positive density only for values of x such that k*(x – mu)/sigma > –1. For more information, see Generalized Extreme Value Distribution.

example

Examples

collapse all

Compute the inverse cdf (icdf) values evaluated at the probability values in p for the generalized extreme value distribution with the shape parameter k, location parameter mu, and scale parameter sigma.

p = 0.005:0.01:0.995;
k = 0.5;
mu = 5;
sigma = 2;
x = gevinv(p,k,mu,sigma);

Plot the icdf.

plot(p,x)
grid on
xlabel("p");
ylabel("x");

Figure contains an axes object. The axes object with xlabel p, ylabel x contains an object of type line.

Input Arguments

collapse all

Probability values at which to evaluate the inverse of the cdf (icdf), specified as a scalar value or an array of scalar values in the range [0,1].

To evaluate the icdf at multiple values, specify p using an array. To evaluate the icdfs of multiple distributions, specify one or more of the following input arguments using arrays: k, sigma, or mu. If one or more of the input arguments p, k, sigma, and mu are arrays, then the array sizes must be the same. In this case, gevinv expands each scalar input into a constant array of the same size as the array inputs. Each element in x is the icdf value of the distribution specified by the corresponding elements in k, sigma, and mu, evaluated at the corresponding element in p.

Data Types: single | double

Shape parameter, specified as a scalar value or an array of scalar values.

To evaluate the icdf at multiple values, specify p using an array. To evaluate the icdfs of multiple distributions, specify one or more of the following input arguments using arrays: k, sigma, or mu. If one or more of the input arguments p, k, sigma, and mu are arrays, then the array sizes must be the same. In this case, gevinv expands each scalar input into a constant array of the same size as the array inputs. Each element in x is the icdf value of the distribution specified by the corresponding elements in k, sigma, and mu, evaluated at the corresponding element in p.

Scale parameter, specified as a positive scalar value or an array of positive scalar values.

To evaluate the icdf at multiple values, specify p using an array. To evaluate the icdfs of multiple distributions, specify one or more of the following input arguments using arrays: k, sigma, or mu. If one or more of the input arguments p, k, sigma, and mu are arrays, then the array sizes must be the same. In this case, gevinv expands each scalar input into a constant array of the same size as the array inputs. Each element in x is the icdf value of the distribution specified by the corresponding elements in k, sigma, and mu, evaluated at the corresponding element in p.

Data Types: single | double

Location parameter, specified as a scalar value or an array of scalar values.

To evaluate the icdf at multiple values, specify p using an array. To evaluate the icdfs of multiple distributions, specify one or more of the following input arguments using arrays: k, sigma, or mu. If one or more of the input arguments p, k, sigma, and mu are arrays, then the array sizes must be the same. In this case, gevinv expands each scalar input into a constant array of the same size as the array inputs. Each element in x is the icdf value of the distribution specified by the corresponding elements in k, sigma, and mu, evaluated at the corresponding element in p.

Data Types: single | double

Output Arguments

collapse all

Inverse cdf values evaluated at the probabilities in p, returned as a scalar value or an array of scalar values. x is the same size as p, k, sigma, and mu after any necessary scalar expansion. Each element in x is the inverse cdf value of the distribution specified by the corresponding elements in k, sigma, and mu, evaluated at the corresponding probability in p.

Alternative Functionality

  • gevinv is a function specific to the generalized extreme value distribution. Statistics and Machine Learning Toolbox™ also offers the generic function icdf, which supports various probability distributions. To use icdf, create a GeneralizedExtremeValueDistribution probability distribution object and pass the object as an input argument or specify the probability distribution name and its parameters. Note that the distribution-specific function gevinv is faster than the generic function icdf.

References

[1] Embrechts, P., C. Klüppelberg, and T. Mikosch. Modelling Extremal Events for Insurance and Finance. New York: Springer, 1997.

[2] Kotz, S., and S. Nadarajah. Extreme Value Distributions: Theory and Applications. London: Imperial College Press, 2000.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced before R2006a