A Generalized Inverse Gaussian continuous random variable.
As an instance of the rv_continuous class, geninvgauss 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.
where x>0, p is a real number and b>0([1]).
\(K_p\) is the modified Bessel function of second kind of order p
(scipy.special.kv).
The probability density above is defined in the "standardized" form. To shift
and/or scale the distribution use the loc and scale parameters.
Specifically, geninvgauss.pdf(x,p,b,loc,scale) is identically
equivalent to geninvgauss.pdf(y,p,b)/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.
The inverse Gaussian distribution stats.invgauss(mu) is a special case of
geninvgauss with p=-1/2, b=1/mu and scale=mu.
Generating random variates is challenging for this distribution. The
implementation is based on [2].
O. Barndorff-Nielsen, P. Blaesild, C. Halgreen, "First hitting time
models for the generalized inverse gaussian distribution",
Stochastic Processes and their Applications 7, pp. 49–54, 1978.
Alternatively, the distribution object can be called (as a function)
to fix the shape, location and scale parameters. This returns a "frozen"
RV object holding the given parameters fixed.
Freeze the distribution and display the frozen pdf: