주요 콘텐츠

gppdf

Generalized Pareto probability density function

Description

p = gppdf(x) returns the probability density function (pdf) of the generalized Pareto (GP) distribution with a shape parameter equal to 0, a scale parameter equal to 1, and a threshold (location) parameter equal to 0, evaluated at the values in x. For more information, see Generalized Pareto Distribution.

p = gppdf(x,k,sigma,theta) returns the pdf using the shape parameter k, scale parameter sigma, and location parameter theta, evaluated at the values in x.

example

Examples

collapse all

Compute the probability density function (pdf) for the generalized Pareto distribution with the shape parameter k=1, scale parameter sigma=2, and location parameter theta=3, for values in the range 0 to 20.

x = 0:0.1:20;
k = 1;
sigma = 2;
theta = 3;
p = gppdf(x,k,sigma,theta);

Plot the pdf.

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

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

Input Arguments

collapse all

Values at which to evaluate the GP pdf, specified as a scalar value or an array of scalar values.

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

Data Types: single | double

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

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

Data Types: single | double

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

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

Data Types: single | double

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

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

Data Types: single | double

Output Arguments

collapse all

GP pdf values, returned as a scalar value or an array of scalar values. p is the same size as x, k, sigma, and theta after any necessary scalar expansion. Each element in p is the pdf value of the distribution specified by the corresponding elements in k, sigma, and theta, evaluated at the corresponding element in x.

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.

The GP distribution has positive density for x > theta when k0, or when

k < 0, 0xθσ1k.

Alternative Functionality

  • gppdf is a function specific to the generalized Pareto distribution. Statistics and Machine Learning Toolbox™ also offers the generic function pdf, which supports various probability distributions. To use pdf, create a GeneralizedParetoDistribution 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 gppdf is faster than the generic function pdf.

  • Use the Probability Distribution Function Tool to create an interactive plot of the cumulative distribution function (cdf) or probability density function (pdf) for a probability distribution.

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