5

Generalized gamma distribution

 3 years ago
source link: https://en.wikipedia.org/wiki/Generalized_gamma_distribution
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Generalized gamma distribution

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search Generalized gamma
Probability density function
Parameters a>0{\displaystyle a>0}a>0 (scale), d>0,p>0{\displaystyle d>0,p>0}{\displaystyle d>0,p>0}Support x∈(0,∞){\displaystyle x\;\in \;(0,\,\infty )}x\;\in \;(0,\,\infty )PDF p/adΓ(d/p)xd−1e−(x/a)p{\displaystyle {\frac {p/a^{d}}{\Gamma (d/p)}}x^{d-1}e^{-(x/a)^{p}}}{\frac  {p/a^{d}}{\Gamma (d/p)}}x^{{d-1}}e^{{-(x/a)^{p}}}CDF γ(d/p,(x/a)p)Γ(d/p){\displaystyle {\frac {\gamma (d/p,(x/a)^{p})}{\Gamma (d/p)}}}{\frac  {\gamma (d/p,(x/a)^{p})}{\Gamma (d/p)}}Mean aΓ((d+1)/p)Γ(d/p){\displaystyle a{\frac {\Gamma ((d+1)/p)}{\Gamma (d/p)}}}a{\frac  {\Gamma ((d+1)/p)}{\Gamma (d/p)}}Mode a(d−1p)1pford>1,otherwise0{\displaystyle a\left({\frac {d-1}{p}}\right)^{\frac {1}{p}}\mathrm {for} \;d>1,\mathrm {otherwise} \;0}{\displaystyle a\left({\frac {d-1}{p}}\right)^{\frac {1}{p}}\mathrm {for} \;d>1,\mathrm {otherwise} \;0}Variance a2(Γ((d+2)/p)Γ(d/p)−(Γ((d+1)/p)Γ(d/p))2){\displaystyle a^{2}\left({\frac {\Gamma ((d+2)/p)}{\Gamma (d/p)}}-\left({\frac {\Gamma ((d+1)/p)}{\Gamma (d/p)}}\right)^{2}\right)}a^{2}\left({\frac  {\Gamma ((d+2)/p)}{\Gamma (d/p)}}-\left({\frac  {\Gamma ((d+1)/p)}{\Gamma (d/p)}}\right)^{2}\right)Entropy ln⁡aΓ(d/p)p+dp+(1p−dp)ψ(dp){\displaystyle \ln {\frac {a\Gamma (d/p)}{p}}+{\frac {d}{p}}+\left({\frac {1}{p}}-{\frac {d}{p}}\right)\psi \left({\frac {d}{p}}\right)}\ln \frac{a \Gamma(d/p)}{p} + \frac{d}{p} + \left(\frac{1}{p}-\frac{d}{p}\right)\psi\left(\frac{d}{p}\right)

The generalized gamma distribution is a continuous probability distribution with three parameters. It is a generalization of the two-parameter gamma distribution. Since many distributions commonly used for parametric models in survival analysis (such as the Exponential distribution, the Weibull distribution and the Gamma distribution) are special cases of the generalized gamma, it is sometimes used to determine which parametric model is appropriate for a given set of data.[1] Another example is the half-normal distribution.

Characteristics[edit]

The generalized gamma has three parameters: a>0{\displaystyle a>0}a>0, d>0{\displaystyle d>0}d>0, and p>0{\displaystyle p>0}p>0. For non-negative x, the probability density function of the generalized gamma is[2]

f(x;a,d,p)=(p/ad)xd−1e−(x/a)pΓ(d/p),{\displaystyle f(x;a,d,p)={\frac {(p/a^{d})x^{d-1}e^{-(x/a)^{p}}}{\Gamma (d/p)}},}f(x;a,d,p)={\frac  {(p/a^{d})x^{{d-1}}e^{{-(x/a)^{p}}}}{\Gamma (d/p)}},

where Γ(⋅){\displaystyle \Gamma (\cdot )}\Gamma (\cdot ) denotes the gamma function.

The cumulative distribution function is

F(x;a,d,p)=γ(d/p,(x/a)p)Γ(d/p),{\displaystyle F(x;a,d,p)={\frac {\gamma (d/p,(x/a)^{p})}{\Gamma (d/p)}},}F(x;a,d,p)={\frac  {\gamma (d/p,(x/a)^{p})}{\Gamma (d/p)}},

where γ(⋅){\displaystyle \gamma (\cdot )}\gamma (\cdot ) denotes the lower incomplete gamma function.

The quantile function can be found by noting that F(x;a,d,p)=G((x/a)p){\displaystyle F(x;a,d,p)=G((x/a)^{p})}{\displaystyle F(x;a,d,p)=G((x/a)^{p})} where G{\displaystyle G}G is the cumulative distribution function of the Gamma distribution with parameters α=d/p{\displaystyle \alpha =d/p}{\displaystyle \alpha =d/p} and β=1{\displaystyle \beta =1}\beta =1. The quantile function is then given by inverting F{\displaystyle F}F using known relations about inverse of composite functions, yielding:

F−1(q;a,d,p)=a⋅[G−1(q)]1/p,{\displaystyle F^{-1}(q;a,d,p)=a\cdot {\big [}G^{-1}(q){\big ]}^{1/p},}{\displaystyle F^{-1}(q;a,d,p)=a\cdot {\big [}G^{-1}(q){\big ]}^{1/p},}

with G−1(q){\displaystyle G^{-1}(q)}{\displaystyle G^{-1}(q)} being the quantile function for a Gamma distribution with α=d/p,β=1{\displaystyle \alpha =d/p,\,\beta =1}{\displaystyle \alpha =d/p,\,\beta =1}.

If d=p{\displaystyle d=p}d=p then the generalized gamma distribution becomes the Weibull distribution. Alternatively, if p=1{\displaystyle p=1}p=1 the generalised gamma becomes the gamma distribution. If p=2{\displaystyle p=2}p=2 and d=2m{\displaystyle d=2m}{\displaystyle d=2m} then it becomes the Nakagami distribution.

Alternative parameterisations of this distribution are sometimes used; for example with the substitution α  =   d/p.[3] In addition, a shift parameter can be added, so the domain of x starts at some value other than zero.[3] If the restrictions on the signs of a, d and p are also lifted (but α = d/p remains positive), this gives a distribution called the Amoroso distribution, after the Italian mathematician and economist Luigi Amoroso who described it in 1925.[4]

Moments[edit]

If X has a generalized gamma distribution as above, then[3]

E⁡(Xr)=arΓ(d+rp)Γ(dp).{\displaystyle \operatorname {E} (X^{r})=a^{r}{\frac {\Gamma ({\frac {d+r}{p}})}{\Gamma ({\frac {d}{p}})}}.}\operatorname {E}(X^{r})=a^{r}{\frac  {\Gamma ({\frac  {d+r}{p}})}{\Gamma ({\frac  {d}{p}})}}.

Kullback-Leibler divergence[edit]

If f1{\displaystyle f_{1}}f_{1} and f2{\displaystyle f_{2}}f_{2} are the probability density functions of two generalized gamma distributions, then their Kullback-Leibler divergence is given by

DKL(f1∥f2)=∫0∞f1(x;a1,d1,p1)ln⁡f1(x;a1,d1,p1)f2(x;a2,d2,p2)dx=ln⁡p1a2d2Γ(d2/p2)p2a1d1Γ(d1/p1)+[ψ(d1/p1)p1+ln⁡a1](d1−d2)+Γ((d1+p2)/p1)Γ(d1/p1)(a1a2)p2−d1p1{\displaystyle {\begin{aligned}D_{KL}(f_{1}\parallel f_{2})&=\int _{0}^{\infty }f_{1}(x;a_{1},d_{1},p_{1})\,\ln {\frac {f_{1}(x;a_{1},d_{1},p_{1})}{f_{2}(x;a_{2},d_{2},p_{2})}}\,dx\\&=\ln {\frac {p_{1}\,a_{2}^{d_{2}}\,\Gamma \left(d_{2}/p_{2}\right)}{p_{2}\,a_{1}^{d_{1}}\,\Gamma \left(d_{1}/p_{1}\right)}}+\left[{\frac {\psi \left(d_{1}/p_{1}\right)}{p_{1}}}+\ln a_{1}\right](d_{1}-d_{2})+{\frac {\Gamma {\bigl (}(d_{1}+p_{2})/p_{1}{\bigr )}}{\Gamma \left(d_{1}/p_{1}\right)}}\left({\frac {a_{1}}{a_{2}}}\right)^{p_{2}}-{\frac {d_{1}}{p_{1}}}\end{aligned}}}
{\begin{aligned}D_{{KL}}(f_{1}\parallel f_{2})&=\int _{{0}}^{{\infty }}f_{1}(x;a_{1},d_{1},p_{1})\,\ln {\frac  {f_{1}(x;a_{1},d_{1},p_{1})}{f_{2}(x;a_{2},d_{2},p_{2})}}\,dx\\&=\ln {\frac  {p_{1}\,a_{2}^{{d_{2}}}\,\Gamma \left(d_{2}/p_{2}\right)}{p_{2}\,a_{1}^{{d_{1}}}\,\Gamma \left(d_{1}/p_{1}\right)}}+\left[{\frac  {\psi \left(d_{1}/p_{1}\right)}{p_{1}}}+\ln a_{1}\right](d_{1}-d_{2})+{\frac  {\Gamma {\bigl (}(d_{1}+p_{2})/p_{1}{\bigr )}}{\Gamma \left(d_{1}/p_{1}\right)}}\left({\frac  {a_{1}}{a_{2}}}\right)^{{p_{2}}}-{\frac  {d_{1}}{p_{1}}}\end{aligned}}

where ψ(⋅){\displaystyle \psi (\cdot )}\psi (\cdot ) is the digamma function.[5]

Software implementation[edit]

In the R programming language, there are a few packages that include functions for fitting and generating generalized gamma distributions. The gamlss package in R allows for fitting and generating many different distribution families including generalized gamma (family=GG). Other options in R, implemented in the package flexsurv, include the function dgengamma, with parameterization: μ=ln⁡a+ln⁡d−ln⁡pp{\displaystyle \mu =\ln a+{\frac {\ln d-\ln p}{p}}}\mu =\ln a+{\frac  {\ln d-\ln p}{p}}, σ=1pd{\displaystyle \sigma ={\frac {1}{\sqrt {pd}}}}\sigma ={\frac  {1}{{\sqrt  {pd}}}}, Q=pd{\displaystyle Q={\sqrt {\frac {p}{d}}}}Q={\sqrt  {{\frac  {p}{d}}}}, and in the package ggamma with parametrisation a=a{\displaystyle a=a}a=a, b=p{\displaystyle b=p}{\displaystyle b=p}, k=d/p{\displaystyle k=d/p}{\displaystyle k=d/p}.

See also[edit]

References[edit]

  1. ^ Box-Steffensmeier, Janet M.; Jones, Bradford S. (2004) Event History Modeling: A Guide for Social Scientists. Cambridge University Press. ISBN 0-521-54673-7 (pp. 41-43)
  2. ^ Stacy, E.W. (1962). "A Generalization of the Gamma Distribution." Annals of Mathematical Statistics 33(3): 1187-1192. JSTOR 2237889
  3. ^ Jump up to: a b c Johnson, N.L.; Kotz, S; Balakrishnan, N. (1994) Continuous Univariate Distributions, Volume 1, 2nd Edition. Wiley. ISBN 0-471-58495-9 (Section 17.8.7)
  4. ^ Gavin E. Crooks (2010), The Amoroso Distribution, Technical Note, Lawrence Berkeley National Laboratory.
  5. ^ C. Bauckhage (2014), Computing the Kullback-Leibler Divergence between two Generalized Gamma Distributions, arXiv:1401.6853.
hideDiscrete univariate
with finite supportDiscrete univariate
with infinite supportContinuous univariate
supported on a bounded intervalContinuous univariate
supported on a semi-infinite intervalContinuous univariate
supported on the whole real lineContinuous univariate
with support whose type variesMixed continuous-discrete univariateMultivariate (joint)DirectionalDegenerate and singularFamilies

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK