Gumbel: The Gumbel Distribution

GumbelR Documentation

The Gumbel Distribution


Density function, distribution function, quantile function, random generation and raw moments for the Gumbel extreme value distribution with parameters alpha and scale.


dgumbel(x, alpha, scale, log = FALSE)
pgumbel(q, alpha, scale, lower.tail = TRUE, log.p = FALSE)
qgumbel(p, alpha, scale, lower.tail = TRUE, log.p = FALSE)
rgumbel(n, alpha, scale)
mgumbel(order, alpha, scale)
mgfgumbel(t, alpha, scale, log = FALSE)


x, q

vector of quantiles.


vector of probabilities.


number of observations. If length(n) > 1, the length is taken to be the number required.


location parameter.


parameter. Must be strictly positive.

log, log.p

logical; if TRUE, probabilities/densities p are returned as \log(p).


logical; if TRUE (default), probabilities are P[X \le x], otherwise, P[X > x].


order of the moment. Only values 1 and 2 are supported.


numeric vector.


The Gumbel distribution with parameters alpha = \alpha and scale = \theta has distribution function:

F(x) = \exp[-\exp(-(x - \alpha)/\theta)]

for -\infty < x < \infty, -\infty < a < \infty and \theta > 0.

The mode of the distribution is in \alpha, the mean is \alpha + \gamma\theta, where \gamma = 0.57721566 is the Euler-Mascheroni constant, and the variance is \pi^2 \theta^2/6.


dgumbel gives the density, pgumbel gives the distribution function, qgumbel gives the quantile function, rgumbel generates random deviates, mgumbel gives the kth raw moment, k = 1, 2, and mgfgamma gives the moment generating function in t.

Invalid arguments will result in return value NaN, with a warning.


Distribution also knonw as the generalized extreme value distribution Type-I.

The "distributions" package vignette provides the interrelations between the continuous size distributions in actuar and the complete formulas underlying the above functions.


Vincent Goulet


Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2012), Loss Models, From Data to Decisions, Fourth Edition, Wiley.


dgumbel(c(-5, 0, 10, 20), 0.5, 2)

p <- (1:10)/10
pgumbel(qgumbel(p, 2, 3), 2, 3)

curve(pgumbel(x, 0.5, 2), from = -5, to = 20, col = "red")
curve(pgumbel(x, 1.0, 2), add = TRUE, col = "green")
curve(pgumbel(x, 1.5, 3), add = TRUE, col = "blue")
curve(pgumbel(x, 3.0, 4), add = TRUE, col = "cyan")

a <- 3; s <- 4
mgumbel(1, a, s)                        # mean
a - s * digamma(1)                      # same

mgumbel(2, a, s) - mgumbel(1, a, s)^2   # variance
(pi * s)^2/6                            # same

actuar documentation built on Nov. 8, 2023, 9:06 a.m.