File: continuous_invgamma.rst

package info (click to toggle)
scipy 1.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 132,464 kB
  • sloc: python: 207,830; ansic: 92,105; fortran: 76,906; cpp: 68,145; javascript: 32,742; makefile: 422; pascal: 421; sh: 158
file content (38 lines) | stat: -rwxr-xr-x 1,355 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

.. _continuous-invgamma:

Inverted Gamma Distribution
===========================

Special case of the generalized Gamma distribution with :math:`c=-1` and :math:`a>0` and support :math:`x\geq0`.

.. math::
   :nowrap:

    \begin{eqnarray*} f\left(x;a\right) & = & \frac{x^{-a-1}}{\Gamma\left(a\right)}\exp\left(-\frac{1}{x}\right)\\
    F\left(x;a\right) & = & \frac{\Gamma\left(a,\frac{1}{x}\right)}{\Gamma\left(a\right)}\\
    G\left(q;a\right) & = & \left\{ \Gamma^{-1}\left(a,\Gamma\left(a\right)q\right)\right\} ^{-1}\end{eqnarray*}

.. math::

     \mu_{n}^{\prime}=\frac{\Gamma\left(a-n\right)}{\Gamma\left(a\right)}\quad a>n

.. math::
   :nowrap:

    \begin{eqnarray*} \mu & = & \frac{1}{a-1}\quad a>1\\
    \mu_{2} & = & \frac{1}{\left(a-2\right)\left(a-1\right)}-\mu^{2}\quad a>2\\
    \gamma_{1} & = & \frac{\frac{1}{\left(a-3\right)\left(a-2\right)\left(a-1\right)}-3\mu\mu_{2}-\mu^{3}}{\mu_{2}^{3/2}}\\
    \gamma_{2} & = & \frac{\frac{1}{\left(a-4\right)\left(a-3\right)\left(a-2\right)\left(a-1\right)}-4\mu\mu_{3}-6\mu^{2}\mu_{2}-\mu^{4}}{\mu_{2}^{2}}-3\end{eqnarray*}

.. math::

     m_{d}=\frac{1}{a+1}

.. math::

     h\left[X\right]=a-\left(a+1\right)\psi\left(a\right)+\log\Gamma\left(a\right).

where :math:`\Psi` is the digamma function :math:`\psi(z) = \frac{d}{dz} \log(\Gamma(z))`.

Implementation: `scipy.stats.invgamma`