actuar (version 3.3-4)

Gumbel: The Gumbel Distribution

Description

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

Usage

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)

Value

dgumbel gives the density,

pgumbel gives the distribution function,

qgumbel gives the quantile function,

rgumbel generates random deviates,

mgumbel gives the \(k\)th 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.

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

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

alpha

location parameter.

scale

parameter. Must be strictly positive.

log, log.p

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

lower.tail

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

order

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

t

numeric vector.

Author

Vincent Goulet vincent.goulet@act.ulaval.ca

Details

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\).

References

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

Examples

Run this code
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

Run the code above in your browser using DataLab