scipy.stats.genextreme#
- scipy.stats.genextreme = <scipy.stats._continuous_distns.genextreme_gen object>[source]#
A generalized extreme value continuous random variable.
As an instance of the
rv_continuous
class,genextreme
object inherits from it a collection of generic methods (see below for the full list), and completes them with details specific for this particular distribution.Methods
rvs(c, loc=0, scale=1, size=1, random_state=None)
Random variates.
pdf(x, c, loc=0, scale=1)
Probability density function.
logpdf(x, c, loc=0, scale=1)
Log of the probability density function.
cdf(x, c, loc=0, scale=1)
Cumulative distribution function.
logcdf(x, c, loc=0, scale=1)
Log of the cumulative distribution function.
sf(x, c, loc=0, scale=1)
Survival function (also defined as
1 - cdf
, but sf is sometimes more accurate).logsf(x, c, loc=0, scale=1)
Log of the survival function.
ppf(q, c, loc=0, scale=1)
Percent point function (inverse of
cdf
— percentiles).isf(q, c, loc=0, scale=1)
Inverse survival function (inverse of
sf
).moment(order, c, loc=0, scale=1)
Non-central moment of the specified order.
stats(c, loc=0, scale=1, moments=’mv’)
Mean(‘m’), variance(‘v’), skew(‘s’), and/or kurtosis(‘k’).
entropy(c, loc=0, scale=1)
(Differential) entropy of the RV.
fit(data)
Parameter estimates for generic data. See scipy.stats.rv_continuous.fit for detailed documentation of the keyword arguments.
expect(func, args=(c,), loc=0, scale=1, lb=None, ub=None, conditional=False, **kwds)
Expected value of a function (of one argument) with respect to the distribution.
median(c, loc=0, scale=1)
Median of the distribution.
mean(c, loc=0, scale=1)
Mean of the distribution.
var(c, loc=0, scale=1)
Variance of the distribution.
std(c, loc=0, scale=1)
Standard deviation of the distribution.
interval(confidence, c, loc=0, scale=1)
Confidence interval with equal areas around the median.
See also
Notes
For \(c=0\),
genextreme
is equal togumbel_r
with probability density function\[f(x) = \exp(-\exp(-x)) \exp(-x),\]where \(-\infty < x < \infty\).
For \(c \ne 0\), the probability density function for
genextreme
is:\[f(x, c) = \exp(-(1-c x)^{1/c}) (1-c x)^{1/c-1},\]where \(-\infty < x \le 1/c\) if \(c > 0\) and \(1/c \le x < \infty\) if \(c < 0\).
Note that several sources and software packages use the opposite convention for the sign of the shape parameter \(c\).