fcaz.stats.invexpon#

fcaz.stats.invexpon: rv_continuous = <fcaz.stats._invexpon_gen object>#

Inverse exponential continuous random variable.

As an instance of the rv_continuous class, invexpon 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.

fcaz.stats.rvs(loc=0, scale=1, size=1, random_state=None)#

Random variates.

fcaz.stats.pdf(x, loc=0, scale=1)#

Probability density function.

fcaz.stats.logpdf(x, loc=0, scale=1)#

Log of the probability density function.

fcaz.stats.cdf(x, loc=0, scale=1)#

Cumulative distribution function.

fcaz.stats.logcdf(x, loc=0, scale=1)#

Log of the cumulative distribution function.

fcaz.stats.sf(x, loc=0, scale=1)#

Survival function (also defined as 1 - cdf, but sf is sometimes more accurate).

fcaz.stats.logsf(x, loc=0, scale=1)#

Log of the survival function.

fcaz.stats.ppf(q, loc=0, scale=1)#

Percent point function (inverse of cdf — percentiles).

fcaz.stats.isf(q, loc=0, scale=1)#

Inverse survival function (inverse of sf).

fcaz.stats.moment(order, loc=0, scale=1)#

Non-central moment of the specified order.

fcaz.stats.stats(loc=0, scale=1, moments='mv')#

Mean(‘m’), variance(‘v’), skew(‘s’), and/or kurtosis(‘k’).

fcaz.stats.entropy(loc=0, scale=1)#

(Differential) entropy of the RV.

fcaz.stats.fit(data)#

Parameter estimates for generic data. See scipy.stats.rv_continuous.fit for detailed documentation of the keyword arguments.

fcaz.stats.expect(func, args=(), loc=0, scale=1, lb=None, ub=None, conditional=False, \*\*kwds)#

Expected value of a function (of one argument) with respect to the distribution.

fcaz.stats.median(loc=0, scale=1)#

Median of the distribution.

fcaz.stats.mean(loc=0, scale=1)#

Mean of the distribution.

fcaz.stats.var(loc=0, scale=1)#

Variance of the distribution.

fcaz.stats.std(loc=0, scale=1)#

Standard deviation of the distribution.

fcaz.stats.interval(confidence, loc=0, scale=1)#

Confidence interval with equal areas around the median.

Notes

The cumulative distribution function is

\[F(x) = e^{-\theta / x}, \quad x > 0,\]

where \(\theta\) is the scale parameter, matching the Loss Models parameterization. This is scipy.stats.invweibull with c=1.

The probability density above is defined in the “standardized” form. To shift and/or scale the distribution use the loc and scale parameters. Specifically, invexpon.pdf(x, loc, scale) is identically equivalent to invexpon.pdf(y) / scale with y = (x - loc) / scale. Note that shifting the location of a distribution does not make it a “noncentral” distribution; noncentral generalizations of some distributions are available in separate classes.

Examples

>>> from fcaz.stats import invexpon
>>> X = invexpon(scale=4)
>>> round(float(X.cdf(6)), 4)
0.5134
>>> round(float(X.ppf(0.3)), 4)
3.3223