Skip to main content

distributions.TweediePower

The Tweedie law at any power p outside (0, 1] for

Usage

Source

distributions.TweediePower()

invert_chf, in its reproductive form: mean mean, variance dispersion * mean ** p (Jorgensen’s exponential dispersion model).

p = 0 is the normal, p < 0 the extreme stable laws on the whole line, 1 < p < 2 the compound Poisson-gamma (Tweedie) with its mass at 0, p = 2 the gamma, p = 3 the inverse Gaussian and p > 2 the positive extreme stable laws, all with light tails.

Parameters

power: float

At most 0, or above 1 and finite.

mean: float

Positive.

dispersion: float
Positive.

Raises

ValueError
If a parameter is out of range.

Examples

>>> from prospicio.distributions import TweediePower, invert_chf
>>> d = invert_chf(TweediePower(2.5, 3.0, 0.4), log2=12)
>>> round(d.mean(), 6)

3.0

Attributes

Name Description
dispersion The dispersion.
mean The mean.
power The power p.
skewness The skewness, power times the coefficient of variation.
variance The variance, dispersion * mean ** power.

dispersion

The dispersion.

dispersion: float


mean

The mean.

mean: float


power

The power p.

power: float


skewness

The skewness, power times the coefficient of variation.

skewness: float


variance

The variance, dispersion * mean ** power.

variance: float

Methods

Name Description
from_mean_cv() The law with power power, mean mean and coefficient of

from_mean_cv()

The law with power power, mean mean and coefficient of

Usage

Source

from_mean_cv(power, mean, cv)

variation cv: dispersion cv**2 * mean ** (2 - power).

Parameters
power: float
mean: float
cv: float
Returns
TweediePower