gevpdf
Generalized extreme value (GEV) probability density function (PDF).
For each element of x, compute the probability density function (PDF) of the GEV distribution with shape parameter k, scale parameter sigma, and location parameter mu. The size of y 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.
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: gevcdf, gevinv, gevrnd, gevfit, gevlike, gevstat
Source Code: gevpdf
## Plot various PDFs from the generalized extreme value distribution x = -1:0.001:10; y1 = gevpdf (x, 1, 1, 1); y2 = gevpdf (x, 0.5, 1, 1); y3 = gevpdf (x, 1, 1, 5); y4 = gevpdf (x, 1, 2, 5); y5 = gevpdf (x, 1, 5, 5); y6 = gevpdf (x, 1, 0.5, 5); plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ... x, y4, "-c", x, y5, "-m", x, y6, "-k") grid on xlim ([-1, 10]) ylim ([0, 1.1]) 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", "northeast") title ("Generalized extreme value PDF") xlabel ("values in x") ylabel ("density") |