Hauptinhalt

gpstat

Generalized Pareto mean and variance

Description

m = gpstat(k,sigma,theta) returns the mean for the generalized Pareto (GP) distribution with the shape parameter k, scale parameter sigma, and (threshold) location parameter theta.

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

example

Examples

collapse all

Compute the mean and variance of a generalized Pareto distribution with the shape parameter k, scale parameter sigma, and location parameter theta.

k = 0.4;
sigma = 2;
theta = 3;
[mean,variance] = gpstat(k,sigma,theta)
mean = 
6.3333
variance = 
55.5556

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 theta are arrays, then the array sizes must be the same. In this case, gpstat 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 theta are arrays, then the array sizes must be the same. In this case, gpstat 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 theta are arrays, then the array sizes must be the same. In this case, gpstat 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 GP distribution, returned as a numeric scalar or an array of numeric scalars. m is the same size as k, sigma, and theta. Each element in m is the mean of the GP distribution specified by the corresponding elements in k, sigma, and theta.

When k = 0 and theta = 0, the generalized Pareto (GP) distribution is equivalent to the exponential distribution. When k > 0 and theta = sigma/k, the GP distribution is equivalent to a Pareto distribution with a scale parameter equal to sigma/k and a shape parameter equal to 1/k. The mean of the GP distribution is not finite when k1, and the variance is not finite when k1/2.

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

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