File: continuous_geninvgauss.rst

package info (click to toggle)
scipy 1.16.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236,092 kB
  • sloc: cpp: 503,720; python: 345,302; ansic: 195,677; javascript: 89,566; fortran: 56,210; cs: 3,081; f90: 1,150; sh: 857; makefile: 792; pascal: 284; csh: 135; lisp: 134; xml: 56; perl: 51
file content (20 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

.. _continuous-geninvgauss:

Generalized Inverse Gaussian Distribution
=========================================

The probability density function is given by:

.. math::
	:nowrap:
	
	\begin{eqnarray*}
	        f(x; p, b) = x^{p-1} \exp(-b(x + 1/x)/2) / (2 K_p(b)),
	\end{eqnarray*}

where :math:`x > 0` is a real number and the parameters :math:`p, b` satisfy :math:`b > 0`. :math:`K_v` is the modified Bessel function of second kind of order :math:`v` (`scipy.special.kv`).

If `X` is ``geninvgauss(p, b)``, then the distribution of `1/X` is ``geninvgauss(-p, b)``. The inverse Gaussian distribution (`scipy.stats.invgauss`) is a special case with p=-1/2.

Implementation: `scipy.stats.geninvgauss`