Stable lifecycle

dist_gumbel(alpha, scale)

Arguments

alpha

location parameter.

scale

parameter. Must be strictly positive.

Details

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.

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
generate(dist, 10)
#> [[1]] #> [1] 1.4234504 -0.8770471 0.7087932 -1.3189072 -0.7334558 -0.9265949 #> [7] 3.9049136 1.5706775 1.3214666 3.3713520 #> #> [[2]] #> [1] 1.4323986 -0.2535069 3.9726463 1.1796475 1.7809066 1.2331546 #> [7] 3.9209700 1.7204825 0.8260725 5.0416996 #> #> [[3]] #> [1] 10.046382 5.383544 1.224093 4.838922 3.045138 5.024959 1.982674 #> [8] 1.794856 3.793600 1.007968 #> #> [[4]] #> [1] 11.0318227 3.4582295 5.6218779 0.9202432 6.4717787 3.6832715 #> [7] 5.4196623 10.6118931 -2.4033575 5.4201572 #>
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