Choosing an extreme-value distribution#
Use the family name when constructing an extreme-value marginal in PySTRA. The Type I, II and III names describe the classical families; the maxima or minima convention determines which tail is bounded. State the reference period of the extreme, such as an annual maximum load, alongside its units and parameters.
Match the family and the tail#
Classical family |
PySTRA class |
Tail convention |
Former 1.x name |
|---|---|---|---|
Type I, largest |
Gumbel maxima; unbounded support |
|
|
Type I, smallest |
Gumbel minima; reflected maxima |
|
|
Type II, largest |
Fréchet maxima; heavy upper tail |
|
|
Type III, smallest |
Weibull minima; finite lower bound |
|
|
Generalized extreme value, maxima |
Shape selects Type I, II or III |
|
|
Generalized extreme value, minima |
Reflected GEV maxima |
|
GEVmax is a permanent alias for GEV: both names refer to the same
class. The old type-numbered names and GEVmin have been replaced; see
Migrating from 1.x to 2.0 for script conversion.
The ordinary Weibull distribution describes minima. A Type III distribution
for maxima has a finite upper endpoint and is often called the reversed
Weibull distribution. Construct that case with GEV(shape=...) using a
negative shape. The Fréchet and Weibull names and their SciPy parameterizations
are documented in SciPy’s invweibull reference
and weibull_min reference.
Read the GEV shape convention#
Write \(\ell\) for loc, \(s>0\) for scale and
\(\xi\) for shape. The maxima CDF is
At \(\xi=0\) the limiting expression is
\(F_{\max}(x)=\exp[-\exp(-(x-\ell)/s)]\). PySTRA uses the opposite
shape sign to SciPy’s genextreme:
the corresponding SciPy argument is c=-shape.
Shape |
Family |
Support |
|---|---|---|
\(\xi=0\) |
Type I, Gumbel |
All real values |
\(0<\xi<0.5\) |
Type II, Fréchet |
Lower endpoint \(\ell-s/\xi\); unbounded above |
\(\xi<0\) |
Type III, reversed Weibull |
Unbounded below; upper endpoint \(\ell-s/\xi\) |
GEVMin(loc=ell, scale=s, shape=xi) is the distribution of
\(-Y\) when \(Y\) has
GEV(loc=-ell, scale=s, shape=xi). Reflection changes the CDF to
Its support requires \(1+\xi(\ell-x)/s>0\). Thus negative shape gives
a finite lower endpoint \(\ell+s/\xi\), and positive shape gives a
heavy lower tail with finite upper endpoint \(\ell+s/\xi\).
Zero shape gives GumbelMin.
Both GEV classes require shape < 0.5 for finite variance. Supply either
mean and std, or loc and scale, together with shape.
Location and scale have the variable’s units; shape is dimensionless.
Location generally differs from the mean, and scale generally differs from
the standard deviation.
Check equivalent parameterizations#
The following examples compare quantiles across each named family. For Fréchet scale \(a\) and shape \(k>2\), the equivalent GEV parameters are \((\ell,s,\xi)=(a,a/k,1/k)\). For Weibull lower bound \(b\), scale \(a\) and shape \(k>0\), the equivalent GEVMin parameters are \((\ell,s,\xi)=(b+a,a/k,-1/k)\). These relations follow by substitution into the CDFs; the family-specific shape is not the GEV shape.
import numpy as np
import pystra as ra
probabilities = np.array([0.01, 0.25, 0.5, 0.75, 0.99])
pairs = [
(
ra.Gumbel("Q", loc=10.0, scale=2.0),
ra.GEV("Q", loc=10.0, scale=2.0, shape=0.0),
),
(
ra.GumbelMin("R", loc=10.0, scale=2.0),
ra.GEVMin("R", loc=10.0, scale=2.0, shape=0.0),
),
(
ra.Frechet("Q", scale=12.0, shape=4.0),
ra.GEV("Q", loc=12.0, scale=3.0, shape=0.25),
),
(
ra.Weibull("R", lower=2.0, scale=8.0, shape=4.0),
ra.GEVMin("R", loc=10.0, scale=2.0, shape=-0.25),
),
]
for family, generalized in pairs:
np.testing.assert_allclose(
family.ppf(probabilities),
generalized.ppf(probabilities),
rtol=1e-12,
atol=1e-12,
)
assert ra.GEVmax is ra.GEV
Each pair represents the same marginal distribution. Choosing a family from
data still requires checking the support, tail fit and reference period.
For the exact maximum of a specified number of independent, identically
distributed parent variables, see
Maximum and its parent-CDF construction.
Continue: Specifying a reliability model · Distributions and dependence · Using SciPy distributions