Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

EVT Distributions: A Visual & Physical Tour

Open In Colab

This notebook is a gallery of the five extreme-value distributions exposed by xtremax.distributions. For each one we plot the PDF and CDF over a small parameter sweep, draw a sample and overlay the analytic density, and show a return-level curve. The narrative cells say what the distribution is, how the parameters move it around, and which physical phenomena it tends to fit.

Distributions covered

ClassFamilyShape ξTail behaviour
GumbelType1GEVDGEVD Type Iξ = 0Exponential, unbounded
FrechetType2GEVDGEVD Type IIξ > 0Heavy polynomial, lower-bounded
WeibullType3GEVDGEVD Type IIIξ < 0Light, upper-bounded
GeneralizedExtremeValueDistributionGEVD (general)ξ ∈ ℝAll three regimes
GeneralizedParetoDistributionGPD (POT)ξ ∈ ℝExcesses over a threshold

Why these five? The Fisher–Tippett–Gnedenko theorem states that the only non-degenerate limits for normalised block maxima of i.i.d. samples are the three GEVD types. The Pickands–Balkema–de Haan theorem gives the parallel statement for threshold exceedances: their limit law is the GPD. Together they are the canonical building blocks of classical extreme-value theory.

Python implementation: CPython
Python version       : 3.13.5
IPython version      : 9.10.0

jax       : 0.6.2
numpy     : 2.4.4
matplotlib: 3.10.8
numpyro   : 0.19.0
xtremax   : 0.0.0

Compiler    : GCC 11.2.0
OS          : Linux
Release     : 6.8.0-1044-azure
Machine     : x86_64
Processor   : x86_64
CPU cores   : 16
Architecture: 64bit

A unified parameterisation

All three GEVD types share a single Coles (2001) parameterisation

F(x; μ,σ,ξ)  =  {exp⁡ ⁣{−[1+ξ x−μσ]−1/ξ},ξ≠0,exp⁡ ⁣{−exp⁡ ⁣(−x−μσ)},ξ=0,F(x;\,\mu,\sigma,\xi) \;=\; \begin{cases} \exp\!\left\{-\bigl[1 + \xi\,\tfrac{x-\mu}{\sigma}\bigr]^{-1/\xi}\right\}, & \xi \neq 0,\\[6pt] \exp\!\left\{-\exp\!\bigl(-\tfrac{x-\mu}{\sigma}\bigr)\right\}, & \xi = 0, \end{cases}

with σ>0\sigma > 0 and support determined by 1+ξ(x−μ)/σ>01 + \xi(x - \mu)/\sigma > 0. Differentiating gives the PDF

f(x)=1σ[1+ξ x−μσ]−(1/ξ+1) exp⁡ ⁣{−[1+ξ x−μσ]−1/ξ},ξ≠0.f(x) = \frac{1}{\sigma}\bigl[1 + \xi\,\tfrac{x-\mu}{\sigma}\bigr]^{-(1/\xi + 1)} \,\exp\!\left\{-\bigl[1 + \xi\,\tfrac{x-\mu}{\sigma}\bigr]^{-1/\xi}\right\},\quad \xi \neq 0.

The three classical types are slices of this family at ξ=0\xi=0 (Gumbel), ξ>0\xi>0 (Fréchet) and ξ<0\xi<0 (Weibull). The GPD has an analogous structure for excesses y=x−uy = x - u over a threshold uu:

FGPD(y; σ,ξ)={1−[1+ξ yσ]−1/ξ,ξ≠0,1−exp⁡(−y/σ),ξ=0,F_{\text{GPD}}(y;\,\sigma,\xi) = \begin{cases} 1 - \bigl[1 + \xi\,\tfrac{y}{\sigma}\bigr]^{-1/\xi}, & \xi \neq 0,\\[6pt] 1 - \exp(-y/\sigma), & \xi = 0, \end{cases}

defined on y≥0y \ge 0 (and y≤−σ/ξy \le -\sigma/\xi if ξ<0\xi < 0). The GPD shape parameter ξ\xi is the same one that appears in the GEVD limit of the parent distribution: this is the Pickands–Balkema–de Haan theorem.

In the cells below we share a small helper that draws PDF, CDF and a histogram-vs-density panel for whichever distribution we hand it.

1. Gumbel (Type I, ξ = 0)

The Gumbel is the GEVD limit when the parent distribution has exponentially decaying tails (e.g. Gaussian, exponential, gamma). It has unbounded support, finite moments of every order, and a fixed positive skewness ≈1.14\approx 1.14.

Density and CDF (with standardised variate z=(x−μ)/σz = (x-\mu)/\sigma):

f(x)=1σ e−z exp⁡(−e−z),F(x)=exp⁡(−e−z).f(x) = \tfrac{1}{\sigma}\,e^{-z}\,\exp(-e^{-z}),\qquad F(x) = \exp(-e^{-z}).

Moments. With γ≈0.5772\gamma \approx 0.5772 (Euler–Mascheroni),

E[X]=μ+γσ,Var[X]=π26σ2,skew=126 ζ(3)π3≈1.1395.\mathbb{E}[X] = \mu + \gamma\sigma,\qquad \mathrm{Var}[X] = \frac{\pi^2}{6}\sigma^2,\qquad \text{skew} = \frac{12\sqrt{6}\,\zeta(3)}{\pi^3} \approx 1.1395.

Return level for return period TT (probability 1−1/T1 - 1/T of not being exceeded in any one block):

zT=μ−σ log⁡ ⁣(−log⁡(1−1/T)).z_T = \mu - \sigma \,\log\!\bigl(-\log(1 - 1/T)\bigr).

Note that zTz_T grows linearly in log⁡T\log T — the signature linear-in-log return-level plot of the Gumbel.

Physical examples

  • Annual maxima of mid-latitude daily temperature, where the parent distribution is approximately Gaussian.

  • Annual peak river stages on regulated rivers (light upper tails after dam control).

  • Maximum daily wind speeds outside the tropics.

  • Maximum component lifetimes when the underlying failure-time law has an exponential tail.

When to reach for something else. Heavy-tailed phenomena like extreme precipitation, financial losses, earthquake magnitudes or catastrophic insurance claims are under-predicted by Gumbel — use Fréchet (ξ > 0). Hard physical caps (e.g. material strength, run-up height against a fixed seawall) are over-predicted — use Weibull (ξ < 0).

<Figure size 1600x420 with 3 Axes>
<Figure size 800x450 with 1 Axes>
<Figure size 800x450 with 1 Axes>

2. Fréchet (Type II, ξ > 0)

The Fréchet is the GEVD limit when the parent has a power-law (regularly varying) upper tail: P(X>x)∼x−1/ξ\mathbb{P}(X > x) \sim x^{-1/\xi}. The shape ξ\xi is the reciprocal of the tail index α\alpha:

P(X>x)∼x−α,α=1/ξ.\mathbb{P}(X > x) \sim x^{-\alpha},\qquad \alpha = 1/\xi.

Heavier tail ⇒\Rightarrow larger ξ\xi ⇒\Rightarrow smaller α\alpha.

Density and CDF. Using z=(x−μ)/σz = (x-\mu)/\sigma and the support x≥μ−σ/ξx \ge \mu - \sigma/\xi,

F(x)=exp⁡ ⁣{−(1+ξz)−1/ξ},f(x)=1σ(1+ξz)−(1/ξ+1)F(x).F(x) = \exp\!\left\{-\bigl(1 + \xi z\bigr)^{-1/\xi}\right\},\qquad f(x) = \tfrac{1}{\sigma}(1 + \xi z)^{-(1/\xi + 1)} F(x).

Moments are partial. The kk-th moment exists iff ξ<1/k\xi < 1/k:

E[X]=μ+σξ(Γ(1−ξ)−1),ξ<1.\mathbb{E}[X] = \mu + \tfrac{\sigma}{\xi}\bigl(\Gamma(1-\xi) - 1\bigr),\quad \xi < 1.

For ξ≥1\xi \ge 1 the mean is infinite; for ξ≥1/2\xi \ge 1/2 the variance blows up. That divergence is not a numerical artefact — it is the defining behaviour of the family.

Return level.

zT=μ+σξ[(−log⁡(1−1/T))−ξ−1].z_T = \mu + \tfrac{\sigma}{\xi}\Bigl[\bigl(-\log(1-1/T)\bigr)^{-\xi} - 1\Bigr].

On a log⁡T\log T axis, zTz_T curves upward — the hallmark of heavy tails.

Physical examples

  • Daily precipitation extremes (the textbook heavy-tail meteorological variable).

  • Earthquake magnitudes (Gutenberg–Richter is a power law).

  • Insurance claim sizes, especially catastrophic claims.

  • Internet packet interarrival sizes and file size distributions.

  • Tropical cyclone wind speeds and storm surges in the heavy-tail regime.

When to reach for something else. Bounded physical quantities (max wave run-up against a seawall of finite height, peak strain against the breaking limit of a beam) cannot have a power-law tail — use Weibull. Light-tailed temperature data fits Gumbel better; if you fit Fréchet there it will say ξ≈0\xi \approx 0 but use up a degree of freedom unnecessarily.

<Figure size 1600x420 with 3 Axes>
<Figure size 800x450 with 1 Axes>
<Figure size 800x450 with 1 Axes>

3. Weibull (Type III, ξ < 0)

The reversed Weibull is the GEVD limit when the parent distribution has a finite right endpoint. Support is upper-bounded:

x≤xsup⁡  =  μ−σ/ξ(ξ<0).x \le x_{\sup} \;=\; \mu - \sigma/\xi \quad (\xi < 0).

As ξ→0−\xi \to 0^- the upper endpoint recedes to +∞+\infty and we recover Gumbel.

Density and CDF are the same Coles formula as Fréchet, restricted to ξ<0\xi < 0. With z=(x−μ)/σz = (x-\mu)/\sigma,

F(x)=exp⁡ ⁣{−(1+ξz)−1/ξ},x≤μ−σ/ξ.F(x) = \exp\!\bigl\{-(1 + \xi z)^{-1/\xi}\bigr\},\qquad x \le \mu - \sigma/\xi.

All moments exist because the support is bounded:

E[X]=μ+σξ(Γ(1−ξ)−1)(finite for all ξ<0).\mathbb{E}[X] = \mu + \tfrac{\sigma}{\xi}\bigl(\Gamma(1-\xi) - 1\bigr) \quad \text{(finite for all }\xi < 0\text{)}.

Return level. Same closed form as Fréchet,

zT=μ+σξ[(−log⁡(1−1/T))−ξ−1],z_T = \mu + \tfrac{\sigma}{\xi}\Bigl[\bigl(-\log(1-1/T)\bigr)^{-\xi} - 1\Bigr],

but on a log⁡T\log T axis it flattens and asymptotes to the upper endpoint μ−σ/ξ\mu - \sigma/\xi.

Physical examples

  • Maximum strength of brittle materials (there is a hard breaking stress).

  • Human lifespan (biological maximum near 120 years).

  • Maximum surge height against a fixed seawall: any excess simply spills over.

  • Maximum power output of a renewable source with a hard-rated capacity.

  • Reliability extremes when the failure mechanism has a deterministic upper bound.

When to reach for something else. If your “cap” is probabilistic rather than physical (rare crossings still happen) you may be in the Gumbel regime. If your data show no sign of saturating — return-level plot keeps climbing on a log axis — the data probably does not justify the bounded fit; let GEVD pick ξ\xi rather than forcing ξ<0\xi < 0.

<Figure size 1600x420 with 3 Axes>
<Figure size 800x450 with 1 Axes>
<Figure size 800x450 with 1 Axes>

4. The unifying GEVD

GeneralizedExtremeValueDistribution(loc, scale, concentration) exposes the full (μ,σ,ξ)(\mu,\sigma,\xi) family in one class. Use this when you do not know the tail regime a priori and want the data to choose ξ\xi. The implementation branches on ∣ξ∣<10−7|\xi| < 10^{-7} and falls through to the Gumbel limit, so ξ=0\xi = 0 is numerically safe.

In a Bayesian fit one typically places a weakly informative prior on ξ\xi (e.g. N(0,0.3)\mathcal{N}(0, 0.3)) so all three regimes are reachable, and reads off the posterior to decide which one the data prefers. Coles (2001, §3) is the standard reference for the diagnostics (return-level plot, PP/QQ plot, profile likelihood for ξ\xi).

Why have all three sub-classes too? The GumbelType1GEVD, FrechetType2GEVD, WeibullType3GEVD classes hard-encode the tail regime via arg_constraints. They are:

  • useful for priors — if you have strong reason to believe ξ>0\xi > 0 (precipitation), constraining the model removes mass from the wrong half-line and improves identifiability;

  • faster to sample and more numerically stable in their respective regimes;

  • cleaner in NumPyro models, since numpyro.sample("xi", Normal(0, 0.3)) can be replaced by a constrained scale-only fit.

The full GEVD is the right default when you are exploring; the typed sub-classes are the right default when you are committing to a regime.

<Figure size 1600x420 with 3 Axes>
<Figure size 800x450 with 1 Axes>
<Figure size 800x450 with 1 Axes>

5. Generalized Pareto (POT)

The Pickands–Balkema–de Haan theorem says: if XX lies in the domain of attraction of a GEVD with shape ξ\xi, then for a high enough threshold uu the conditional excess

Y=X−u∣X>uY = X - u \mid X > u

is approximately distributed as a Generalized Pareto with the same ξ\xi and a scale σu\sigma_u that depends on uu. Crucially, σu\sigma_u varies with uu via the threshold-stability relation

σu2=σu1+ξ(u2−u1),\sigma_{u_2} = \sigma_{u_1} + \xi(u_2 - u_1),

which means a non-trivial slope of σu\sigma_u vs uu on a mean-residual-life plot is a sign that the asymptotic POT regime has not yet kicked in — pick a higher threshold.

Density and CDF (with y≥0y \ge 0, additionally y≤−σ/ξy \le -\sigma/\xi if ξ<0\xi<0):

F(y)={1−(1+ξy/σ)−1/ξ,ξ≠0,1−e−y/σ,ξ=0,f(y)=1σ(1+ξy/σ)−(1/ξ+1).F(y) = \begin{cases} 1 - \bigl(1 + \xi y/\sigma\bigr)^{-1/\xi}, & \xi \neq 0,\\ 1 - e^{-y/\sigma}, & \xi = 0, \end{cases}\qquad f(y) = \tfrac{1}{\sigma}\bigl(1 + \xi y/\sigma\bigr)^{-(1/\xi + 1)}.

Mean and variance (when finite — same ξ\xi-thresholds as Fréchet):

E[Y]=σ1−ξ,ξ<1,Var[Y]=σ2(1−ξ)2(1−2ξ),ξ<1/2.\mathbb{E}[Y] = \frac{\sigma}{1-\xi},\quad \xi < 1,\qquad \mathrm{Var}[Y] = \frac{\sigma^2}{(1-\xi)^2(1-2\xi)},\quad \xi < 1/2.

Return level for the TT-block return level under POT, with rate ζu=P(X>u)\zeta_u = \mathbb{P}(X > u) and number of blocks nyn_y per year (or per any rate unit):

zT=u+σξ[(Tnyζu)ξ−1].z_T = u + \frac{\sigma}{\xi}\Bigl[(T n_y \zeta_u)^{\xi} - 1\Bigr].

(A pure GPD has no per-block notion of return period on its own — it is always combined with the rate of threshold exceedances.)

Physical examples

  • Storm-surge heights above the 95th percentile: more data than annual maxima, same tail in the limit.

  • Significant wave heights above a nuisance threshold.

  • Financial losses above value-at-risk: GPD is the workhorse for expected shortfall.

  • Wildfire burn-area exceedances above a regulatory threshold.

  • Rainfall accumulations above a flood-relevant cutoff.

When to reach for something else. If you naturally have block maxima (one observation per block, e.g. annual peak), use GEVD directly — pretending each annual max is a “threshold exceedance” wastes a degree of freedom. If your threshold is too low the GPD fit is biased; if it is too high the variance blows up. The threshold-selection step (next two notebooks in this series) is where most of the modelling effort goes.

<Figure size 1600x420 with 3 Axes>
<Figure size 1600x420 with 3 Axes>

6. Comparison: same μ, σ; varying ξ

Putting all three GEVD types on a single axes makes the role of ξ\xi visible at a glance. We hold μ=0\mu = 0, σ=1\sigma = 1 and vary ξ\xi from -0.4 (Weibull, bounded above at 1/0.4=2.51/0.4 = 2.5) to +0.4 (Fréchet, heavy upper tail).

<Figure size 1300x450 with 2 Axes>

Read this figure as: negative ξ truncates the upper tail, positive ξ inflates it. The kink in the negative-ξ PDF is where the support hits μ−σ/ξ\mu - \sigma/\xi.

7. Comparison: GEVD vs GPD on a return-level axis

A side-by-side return-level plot makes the scaling differences concrete. We use a per-block exceedance rate of ζu=0.05\zeta_u = 0.05 (one event in twenty blocks above the threshold) and compare the GEVD return level zT=μ+σξ[(−log⁡(1−1/T))−ξ−1]z_T = \mu + \frac{\sigma}{\xi}\bigl[(-\log(1-1/T))^{-\xi} - 1\bigr] with the POT version zT=u+σξ[(Tζu)ξ−1]z_T = u + \frac{\sigma}{\xi}\bigl[(T \zeta_u)^{\xi} - 1\bigr] at threshold u=0u = 0.

The two curves should line up in their tails — that is the Pickands–Balkema–de Haan theorem in graphical form.

<Figure size 800x500 with 1 Axes>

What’s next

The follow-up notebooks in this series demonstrate end-to-end workflows:

  1. GEVD on annual maxima — synthetic daily series, xtremax.extraction.temporal_block_maxima, NumPyro NUTS, posterior return-level bands.

  2. Fréchet on heavy-tailed precipitation — same flow as (1) with a Pareto-mixture parent and a comparison against a misspecified Gumbel fit.

  3. Weibull on bounded extremes — same flow as (1) on a capped synthetic process, with the upper-endpoint posterior μ−σ/ξ\mu - \sigma/\xi as the headline quantity.

  4. GPD via peaks-over-threshold — quantile_threshold + decluster_runs + a NumPyro GPD fit, with a mean-residual-life plot for threshold sensitivity.

  5. Quantile-regression threshold + GPD — non-stationary thresholds via XarrayQuantileRegressor, residual GPD on the resulting exceedances.

Reading list

  • Coles, An Introduction to Statistical Modeling of Extreme Values, Springer, 2001 — the standard textbook; chapters 3 (GEVD), 4 (POT), 6 (Bayesian).

  • Embrechts, Klüppelberg & Mikosch, Modelling Extremal Events, Springer, 1997 — the financial/insurance perspective.

  • Beirlant, Goegebeur, Segers & Teugels, Statistics of Extremes, Wiley, 2004 — a more comprehensive theoretical reference.