File: continuous_gamma.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 (41 lines) | stat: -rw-r--r-- 1,127 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
39
40
41

.. _continuous-gamma:

Gamma Distribution
==================

The standard form for the gamma distribution is :math:`\left(\alpha>0\right)` valid for :math:`x\geq0` .

.. math::
   :nowrap:

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

where :math:`\gamma` is the lower incomplete gamma function, :math:`\gamma\left(s, x\right) = \int_0^x t^{s-1} e^{-t} dt`.

.. math::

     M\left(t\right)=\frac{1}{\left(1-t\right)^{\alpha}}

.. math::
   :nowrap:

    \begin{eqnarray*} \mu & = & \alpha\\
    \mu_{2} & = & \alpha\\
    \gamma_{1} & = & \frac{2}{\sqrt{\alpha}}\\
    \gamma_{2} & = & \frac{6}{\alpha}\\
    m_{d} & = & \alpha-1\end{eqnarray*}

.. math::

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

where

.. math::

     \Psi\left(a\right)=\frac{\Gamma^{\prime}\left(a\right)}{\Gamma\left(a\right)}.

Implementation: `scipy.stats.gamma`