[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 pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_gumbel.html

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

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

Mean:

$$ E(X) = \alpha + \sigma\gamma $$

where \(\gamma\) is the Euler-Mascheroni constant, approximately equal to 0.5772157.

Variance:

$$ \textrm{Var}(X) = \frac{\pi^2 \sigma^2}{6} $$

Skewness:

$$ \textrm{Skew}(X) = \frac{12\sqrt{6}\zeta(3)}{\pi^3} \approx 1.1395 $$

where \(\zeta(3)\) is Apery's constant, approximately equal to 1.2020569. Note that skewness is independent of the distribution parameters.

Kurtosis (excess):

$$ \textrm{Kurt}(X) = \frac{12}{5} = 2.4 $$

Note that excess kurtosis is independent of the distribution parameters.

Median:

$$ \textrm{Median}(X) = \alpha - \sigma\ln(\ln 2) $$

Probability density function (p.d.f):

$$ f(x) = \frac{1}{\sigma} \exp\left[-\frac{x - \alpha}{\sigma}\right] \exp\left\{-\exp\left[-\frac{x - \alpha}{\sigma}\right]\right\} $$

for \(x\) in \(R\), the set of all real numbers.

Cumulative distribution function (c.d.f):

$$ F(x) = \exp\left\{-\exp\left[-\frac{x - \alpha}{\sigma}\right]\right\} $$

for \(x\) in \(R\), the set of all real numbers.

Quantile function (inverse c.d.f):

$$ F^{-1}(p) = \alpha - \sigma \ln(-\ln p) $$

for \(p\) in (0, 1).

Moment generating function (m.g.f):

$$ E(e^{tX}) = \Gamma(1 - \sigma t) e^{\alpha t} $$

for \(\sigma t < 1\), where \(\Gamma\) is the gamma function.

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]  0.41889426 -0.33196998  0.30320168 -0.02307647  6.80543721  2.54901883
#>  [7]  0.12571773  3.96614323  1.21625715  1.43533491
#> 
#> [[2]]
#>  [1]  3.4955069 -0.5627131  2.5642517  3.1329347  1.8938184  3.1516692
#>  [7]  3.4493220  1.4966659  1.8503559  3.8646221
#> 
#> [[3]]
#>  [1]  2.6477044  0.9863052 -0.7162495  2.3457499  0.4453724  4.3364459
#>  [7] -0.1407257  3.9195029  2.5251400  8.4871423
#> 
#> [[4]]
#>  [1]  1.6612332  4.5940818  3.4847620  2.2096418  1.0569414 12.0380034
#>  [7]  7.7679624  3.8375724  0.9458804  7.5231271
#> 

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