Gumbel distribution (source code)

= Gumbel distribution
{c}
{title2=$\Lambda$}
{wiki}

The standard <Gumbel distribution> for maxima has <distribution function> $\Lambda(z)=e^{-e^{-z}}$ for every real $z$. Its <probability density function> is the <derivative> of its <distribution function>:
$$
\Lambda(z)=\exp(-e^{-z}),\qquad
g(z)=e^{-z}\exp(-e^{-z}),\qquad z\in\mathbb R.
$$
This article uses the maxima convention throughout. Reflecting a standard <Gumbel distribution> <random variable> $Z$ to $-Z$ gives the minima convention, with <distribution function> $1-\exp(-e^z)$. The two conventions have opposite directions of asymmetry, so their formulas must not be interchanged. https://www.itl.nist.gov/div898/handbook/eda/section3/eda366g.htm[NIST: extreme value type I distributions for maxima and minima]{ref}.

For a location $\mu\in\mathbb R$ and positive scale $b>0$, let $Y=\mu+bZ$. This <location-scale family> has <cumulative distribution function> and <probability density function>
$$
F_Y(x)=\exp\left[-\exp\left(-\frac{x-\mu}{b}\right)\right],\qquad
f_Y(x)=\frac1b\exp\left(-\frac{x-\mu}{b}\right)\exp\left[-\exp\left(-\frac{x-\mu}{b}\right)\right].
$$
Solving $\Lambda(z)=p$ gives the standard <quantile function> $q(p)=-\log(-\log p)$, $0<p<1$, and hence the standard <median>
$$
m=-\log(\log2)\approx0.366513.
$$
The <median> of $Y$ is therefore $\mu-b\log(\log2)$. Location $\mu$ is not the <median>: at $x=\mu$ the <cumulative distribution function> is $e^{-1}\approx0.367879$.

To derive the <Gumbel distribution> as an extreme-value limit, take the <maximum of independent exponential random variables> with rate $\lambda>0$ and set
$$
Z_n=\lambda M_n-\log n.
$$
The exact <distribution function> is
$$
\mathbb P(Z_n\leq z)=
\begin{cases}
\left(1-\dfrac{e^{-z}}n\right)^n,&z\geq-\log n,\\
0,&z<-\log n.
\end{cases}
$$
The finite-$n$ lower boundary is required because $M_n\geq0$. For each fixed real $z$, eventually $z>-\log n$, and the <natural logarithm> of the first branch satisfies
$$
n\log\left(1-\frac{e^{-z}}n\right)\longrightarrow-e^{-z}.
$$
Exponentiating proves <convergence in distribution> to the standard <Gumbel distribution>. It is the familiar <limit> $(1-u/n)^n\to e^{-u}$ with $u=e^{-z}$: a simple calculation reveals a whole limiting shape. The name honors Emil Gumbel; Siegrist gives this exponential-maxima derivation and the standard <Gumbel distribution> formulas. https://www.randomservices.org/random/special/ExtremeValue.html[Siegrist, Random Services: the Gumbel distribution and its exponential-maxima limit]{ref}.

\Image[/gumbel-limit-exponential-maxima.png]
{title=Centered exponential sample maxima for n equal to 1, 5, 20 and 100 approach the standard Gumbel cumulative distribution function}

For the toy delay model $\lambda=1\,\mathrm{s}^{-1}$, $n=100$, the limiting <Gumbel distribution> approximation to $M_{100}$ has $\mu=(\log100)\,\mathrm{s}$ and $b=1\,\mathrm{s}$. Its predicted <median> is
$$
m_{100}^{\mathrm{approx}}=(\log100-\log(\log2))\,\mathrm{s}\approx4.971683\,\mathrm{s},
$$
compared with the exact <median> $-\log(1-2^{-1/100})\,\mathrm{s}\approx4.975147\,\mathrm{s}$. The approximation is about $0.003464$ seconds lower in this example. It is not an exact finite-sample <probability distribution>: the approximating <Gumbel distribution> assigns positive <probability> to negative delays, while the exact <sample maximum> cannot be negative.

The <maximum domain of attraction> of the <Gumbel distribution> is characterized by an exponential tail ratio on the scale of a <Gumbel auxiliary function>. This allows many original <probability distributions> to share the limiting shape, but it does not make the centering $\log n$ appropriate to all of them.