extval_gumbel
Calculates the probability (PDF) and cumulative (CDF) distribution functions of the Gumbel (Type I) distribution function given the scale and location parameters.
Available in version 6.4.0 and later.
Prototype
function extval_gumbel ( x : numeric, scale [*] : numeric, center [*] : numeric, opt [1] : integer ) return_val [ variable of type list containing 2 variables [/ PDF, CDF /]
Arguments
xA numeric array.
scaleOne dimensional array containing the scale parameter(s). Must be the same size as shape.
centerOne dimensional array containing the center (aka, location) parameter(s). Must be the same size as scale.
optCurrently, not used. Set to zero.
Return value
A variable of type 'list.' The list contains two variables: the PDF and the CDF. See Example(s).
Description
Use the equations associated with the Gumbel distribution to derive the associated PDF(s) and CDF(s).
See Also
extval_mlegev, extval_frechet, extval_gev, extval_weibull, extval_recurrence_table
Examples
Example 1
See plots at Example 2 of the Extreme Value Applications page.
N = 100 xMin = -10.0 xMax = 20 x = fspan(xMin,xMax,N) scale = (/2.0, 2.0, 3.0, 4, 6/) center = (/0.5, 1 , 1.5, 3, 3/) nscl = dimsizes( scale ) ; -- Gumbel: Type I, Max pdfcdf = extval_gumbel(x, center, scale, 1) ; minmax= 1 pdf = pdfcdf[0] ; extract from list for convenience cdf = pdfcdf[1] printVarSummary(pdf) print("==========") printVarSummary(cdf) print("==========") ; -- Gumbel: Type I, Min PDFCDF = extval_gumbel(x, center, scale, -1) ; minmax=-1 PDF = PDFCDF[0] ; extract from list for convenience CDF = PDFCDF[1] printVarSummary(PDF) print("==========") printVarSummary(CDF) print("==========")The (edited) output is:
Variable: pdf
Type: float
Total Size: 2000 bytes
500 values
Number of Dimensions: 2
Dimensions and sizes: [5] x [100]
Coordinates:
Number Of Attributes: 4
_FillValue : 9.96921e+36
long_name : Gumbel: Extreme Value Type I: Maxima; PDF
center : ( 2, 2, 3, 4, 6 )
scale : ( 0.5, 1, 1.5, 3, 3 )
(0) ==========
Variable: cdf
Type: float
Total Size: 2000 bytes
500 values
Number of Dimensions: 2
Dimensions and sizes: [5] x [100]
Coordinates:
Number Of Attributes: 2
_FillValue : 9.96921e+36
long_name : Gumbel: Extreme Value Type I: Maxima; CDF
center : ( 2, 2, 3, 4, 6 )
scale : ( 0.5, 1, 1.5, 3, 3 )
(0) ==========
Variable: PDF
Type: float
Total Size: 2000 bytes
500 values
Number of Dimensions: 2
Dimensions and sizes: [5] x [100]
Coordinates:
Number Of Attributes: 4
_FillValue : 9.96921e+36
long_name : Gumbel: Extreme Value Type I: Minima; PDF
center : ( 2, 2, 3, 4, 6 )
scale : ( 0.5, 1, 1.5, 3, 3 )
(0) ==========
Variable: CDF
Type: float
Total Size: 2000 bytes
500 values
Number of Dimensions: 2
Dimensions and sizes: [5] x [100]
Coordinates:
Number Of Attributes: 2
_FillValue : 9.96921e+36
long_name : Gumbel: Extreme Value Type I: Minima; CDF
center : ( 2, 2, 3, 4, 6 )
scale : ( 0.5, 1, 1.5, 3, 3 )