[Stable]

The Gumbel distribution is a special case of the Generalized Extreme Value distribution, obtained when the GEV shape parameter \(\xi\) is equal to 0. It may be referred to as a type I extreme value distribution.

dist_gumbel(alpha, scale)

Arguments

alpha

location parameter.

scale

parameter. Must be strictly positive.

Details

We recommend reading this documentation on https://pkg.mitchelloharawild.com/distributional/, where the math will render nicely.

In the following, let \(X\) be a Gumbel random variable with location parameter mu = \(\mu\), scale parameter sigma = \(\sigma\).

Support: \(R\), the set of all real numbers.

Mean: \(\mu + \sigma\gamma\), where \(\gamma\) is Euler's constant, approximately equal to 0.57722.

Median: \(\mu - \sigma\ln(\ln 2)\).

Variance: \(\sigma^2 \pi^2 / 6\).

Probability density function (p.d.f):

$$f(x) = \sigma ^ {-1} \exp[-(x - \mu) / \sigma]% \exp\{-\exp[-(x - \mu) / \sigma] \}$$ for \(x\) in \(R\), the set of all real numbers.

Cumulative distribution function (c.d.f):

In the \(\xi = 0\) (Gumbel) special case $$F(x) = \exp\{-\exp[-(x - \mu) / \sigma] \}$$ for \(x\) in \(R\), the set of all real numbers.

See also

Examples

dist <- dist_gumbel(alpha = c(0.5, 1, 1.5, 3), scale = c(2, 2, 3, 4))
dist
#> <distribution[4]>
#> [1] Gumbel(0.5, 2) Gumbel(1, 2)   Gumbel(1.5, 3) Gumbel(3, 4)  

mean(dist)
#> [1] 1.654431 2.154431 3.231647 5.308863
variance(dist)
#> [1]  6.579736  6.579736 14.804407 26.318945
skewness(dist)
#> [1] 1.139547 1.139547 1.139547 1.139547
kurtosis(dist)
#> [1] 2.4 2.4 2.4 2.4
support(dist)
#> <support_region[4]>
#> [1] R R R R
generate(dist, 10)
#> [[1]]
#>  [1]  1.906667  2.914119 -1.183766  3.725815  6.283156  1.314434  1.909672
#>  [8] -1.053848  2.742038  1.582258
#> 
#> [[2]]
#>  [1]  1.1129708  1.1490048  0.8576511  1.8404877  1.4736505  1.4809729
#>  [7]  2.9740553 -0.1339422  4.0393986  1.9577943
#> 
#> [[3]]
#>  [1]  8.8307247  0.4747184  5.5971792 -0.9786054  2.0411414  1.6998399
#>  [7]  0.1657217  3.0347726 -0.1997963  3.1791674
#> 
#> [[4]]
#>  [1]  3.0270891  6.1066379 10.5169961  4.8749138 -1.6122293 21.2090477
#>  [7]  0.6607448  1.4778561  5.0234614  7.6099653
#> 

density(dist, 2)
#> [1] 0.14726616 0.16535215 0.12102469 0.08889319
density(dist, 2, log = TRUE)
#> [1] -1.915514 -1.799678 -2.111761 -2.420320

cdf(dist, 4)
#> [1] 0.8404869 0.8000107 0.6475248 0.4589561

quantile(dist, 0.7)
#> [1] 2.561861 3.061861 4.592791 7.123722