Gamma
Probability density function
|
Cumulative distribution function
|
Parameters
|
shape scale
|
Support
|
|
PDF
|
|
CDF
|
|
Mean
|
![{\displaystyle \scriptstyle \operatorname {E} [X]=k\theta \!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4bcd0564c15fa09e51ad6cef42d662ef6d1dca35)
![{\displaystyle \scriptstyle \operatorname {E} [\ln X]=\psi (k)+\ln(\theta )\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ade84f1fd2e20c78ef0cf51012ad6626335092c2) (see digamma function)
|
Median
|
No simple closed form
|
Mode
|
|
Variance
|
![{\displaystyle \scriptstyle \operatorname {Var} [X]=k\theta ^{2}\,\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/333617e4e5bd65bdbe335c76c1a7d0327573320e)
![{\displaystyle \scriptstyle \operatorname {Var} [\ln X]=\psi _{1}(k)\!}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7633714acaea7355cb1750b03b1c68d8053d6196) (see trigamma function )
|
Skewness
|
|
Ex. kurtosis
|
|
Entropy
|
|
The Gamma distribution is very important for technical reasons, since it is the parent of the exponential distribution and can explain many other distributions.
The probability distribution function is:
Where
is the Gamma function. The cumulative distribution function cannot be found unless p=1, in which case the Gamma distribution becomes the exponential distribution. The Gamma distribution of the stochastic variable X is denoted as
.
Alternatively, the gamma distribution can be parameterized in terms of a shape parameter
and an inverse scale parameter
, called a rate parameter:
![{\displaystyle g(x;\alpha ,\beta )=Kx^{\alpha -1}e^{-\beta \,x}\ \mathrm {for} \ x>0\,\!.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/47b8de5bda105b4492e5041db4e54969ac1f8c8d)
where the
constant can be calculated setting the integral of the density function as 1:
![{\displaystyle \int _{-\infty }^{+\infty }g(x;\alpha ,\beta )\mathrm {d} t\,=\int _{0}^{+\infty }Kx^{\alpha -1}e^{-\beta \,x}\mathrm {d} x\,=1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7729154f0dde00a7985f1f7598587c58ed789013)
following:
![{\displaystyle K\int _{0}^{+\infty }x^{\alpha -1}e^{-\beta \,x}\mathrm {d} x\,=1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/cf48e114515bfac4b8b74d2a2a1e8a0494331196)
![{\displaystyle K={\frac {1}{\int _{0}^{+\infty }x^{\alpha -1}e^{-\beta \,x}\mathrm {d} x}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/857cfc78de08855115e1b60d6b1e5aaaf0f368bf)
and, with change of variable
:
following:
![{\displaystyle g(x;\alpha ,\beta )=x^{\alpha -1}{\frac {\beta ^{-\alpha }\,e^{-\beta \,x}}{\Gamma (\alpha )}}\ \mathrm {for} \ x>0\,\!.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/da5486f6df96432edfcd84330b7e6bd62d32c4c5)
We first check that the total integral of the probability density function is 1.
![{\displaystyle \int _{-\infty }^{\infty }{\frac {1}{a^{p}\Gamma (p)}}x^{p-1}e^{-x/a}dx}](https://wikimedia.org/api/rest_v1/media/math/render/svg/74557d32ca3865297201ce20431d8f1ed49299a8)
Now we let y=x/a which means that dy=dx/a
![{\displaystyle {\frac {1}{\Gamma (p)}}\int _{0}^{\infty }y^{p-1}e^{-y}dy}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9c204ecbae03bcca3b179f8ac84880c4c2b5e002)
![{\displaystyle {\frac {1}{\Gamma (p)}}\Gamma (p)=1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7bd61102031a493dd2d608dbcbcdd6b7e8c421e5)
![{\displaystyle \operatorname {E} [X]=\int _{-\infty }^{\infty }x\cdot {\frac {1}{a^{p}\Gamma (p)}}x^{p-1}e^{-x/a}dx}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2041b84abc19d0b68d9be98a49e51b025c98402b)
Now we let y=x/a which means that dy=dx/a.
![{\displaystyle \operatorname {E} [X]=\int _{0}^{\infty }ay\cdot {\frac {1}{\Gamma (p)}}y^{p-1}e^{-y}dy}](https://wikimedia.org/api/rest_v1/media/math/render/svg/54f1d35c1a15d3ae2ed4481c2ec1eccf01e8b4f4)
![{\displaystyle \operatorname {E} [X]={\frac {a}{\Gamma (p)}}\int _{0}^{\infty }y^{p}e^{-y}dy}](https://wikimedia.org/api/rest_v1/media/math/render/svg/59e45dd2f2dc64776612607cc9c0821c049a5c63)
![{\displaystyle \operatorname {E} [X]={\frac {a}{\Gamma (p)}}\Gamma (p+1)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9b500fdb08277ba4c426a844dd4a0293d04d5dee)
We now use the fact that
![{\displaystyle \operatorname {E} [X]={\frac {a}{\Gamma (p)}}p\Gamma (p)=ap}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ec6ebf9c846951a550635d7f913c1903886bee57)
We first calculate E[X^2]
![{\displaystyle \operatorname {E} [X^{2}]=\int _{-\infty }^{\infty }x^{2}\cdot {\frac {1}{a^{p}\Gamma (p)}}x^{p-1}e^{-x/a}dx}](https://wikimedia.org/api/rest_v1/media/math/render/svg/dd81fa18392582d5fdf8dfe72690d597d05a22fd)
Now we let y=x/a which means that dy=dx/a.
![{\displaystyle \operatorname {E} [X^{2}]=\int _{0}^{\infty }a^{2}y^{2}\cdot {\frac {1}{a\Gamma (p)}}y^{p-1}e^{-y}ady}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5ab45ebf7e86bcd131f504933497e55af902b9ce)
![{\displaystyle \operatorname {E} [X^{2}]={\frac {a^{2}}{\Gamma (p)}}\int _{0}^{\infty }y^{p+1}e^{-y}dy}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3da9177001a8304d085db66b2c51174e46c88c54)
![{\displaystyle \operatorname {E} [X^{2}]={\frac {a^{2}}{\Gamma (p)}}\Gamma (p+2)=pa^{2}(p+1)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4d399ef4add4c2afee9106d9fcc6b035e140128c)
Now we use calculate the variance
![{\displaystyle \operatorname {Var} (X)=\operatorname {E} [X^{2}]-(\operatorname {E} [X])^{2}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/cd5a922df13bdee788c0f06474fe002a42c25d8a)
![{\displaystyle \operatorname {Var} (X)=pa^{2}(p+1)-(ap)^{2}=pa^{2}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8a3e72a2926262f3aa93229b493ff4ea6dfda4d6)