Main Content

gevstat

Generalized extreme value mean and variance

Description

m = gevstat(k,sigma,mu) returns the mean for the generalized extreme value (GEV) distribution defined by the shape parameter k, scale parameter sigma, and location parameter mu.

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.

[m,v] = gevstat(k,sigma,mu) also returns the variance for the distribution.

example

Examples

collapse all

Compute the mean and variance of a generalized extreme value distribution with the shape parameter k, scale parameter sigma, and location parameter mu.

k = 0.1;
sigma = 2;
mu = 3;
[mean,variance] = gevstat(k,sigma,mu)
mean = 
4.3726
variance = 
8.9050

Input Arguments

collapse all

Shape parameter, specified as a scalar value or an array of scalar values. If one or more of the input arguments k, sigma, and mu are arrays, then the array sizes must be the same. In this case, gevstat expands each scalar input into a constant array of the same size as the array inputs.

Data Types: single | double

Scale parameter, specified as a positive scalar value or an array of positive scalar values. If one or more of the input arguments k, sigma, and mu are arrays, then the array sizes must be the same. In this case, gevstat expands each scalar input into a constant array of the same size as the array inputs.

Data Types: single | double

Location parameter, specified as a scalar value or an array of scalar values. If one or more of the input arguments k, sigma, and mu are arrays, then the array sizes must be the same. In this case, gevstat expands each scalar input into a constant array of the same size as the array inputs.

Data Types: single | double

Output Arguments

collapse all

Mean for the GEV distribution, returned as a numeric scalar or an array of numeric scalars. m is the same size as k, sigma, and mu. Each element in m is the mean of the GEV distribution specified by the corresponding elements in k, sigma, and mu.

The mean of the GEV distribution is not finite when k1.

Variance for the GEV distribution, returned as a numeric scalar or an array of numeric scalars. v is the same size as k, sigma, and mu. Each element in v is the variance of the GEV distribution specified by the corresponding elements in k, sigma, and mu.

The variance of the GEV distribution is not finite when k1/2.

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