PLAYGROUND

DISTRIBUTIONS / CONTINUOUS / GENERALIZED GAMMA

Generalized Gamma distribution

From phenomenon to model

E. W. Stacy introduced this parameterization in 1962 as a Gamma generalization. It has since been used in survival analysis because several lifetime shapes share one model.

What to look at

Its support is positive. With Phitter’s positive parameters, the tail is of powered-exponential type and all positive moments exist, although the shape can be strongly skewed.

Useful relationships

With p=1 it becomes Gamma under an equivalent parameterization; another shape choice gives Weibull, and a parameter limit gives lognormal. It also generalizes the Erlang idea beyond integer stage counts.

Names you may also encounter

It is also called the Stacy generalized gamma. Parameter conventions vary widely, so a, d, and p should not be assumed to have the same meanings across packages.

When it makes sense

It is useful when one dataset may support Gamma-, Weibull-, or lognormal-like survival curves. The extra flexibility can make identification and communication harder.

What not to assume

The lognormal limit is numerically delicate and parameters can be strongly correlated; use profiles or bootstrap intervals when selection matters.

A crossroads for Gamma, Weibull, and Lognormal

In 1962 Stacy brought several positive laws together by adding a power parameter. Particular choices recover Gamma and Weibull, while an appropriate limit leads to Lognormal. This genealogy makes Generalized Gamma useful for comparing survival shapes within one family.

Its flexibility appears in the hazard function, which can rise, fall, or take more elaborate shapes depending on parameterization. There is a cost: different shape combinations may produce nearly indistinguishable densities over the observed range. Optimization can then encounter flat valleys and large standard errors. Compare quantile and hazard profiles, use several starting points, and avoid interpreting each parameter alone when the sample cannot identify them well.

Decision guide

A good candidate when: a positive family must represent several hazard shapes while containing Gamma and Weibull as reference cases.

Compare it with: its simpler submodels. If Gamma or Weibull reproduce the relevant quantiles, Generalized Gamma may add parameter correlation without practical benefit.

References

  • SciPy reference: scipy.stats.gengamma — definition and parameterization
  • Johnson, N. L., Kotz, S. & Balakrishnan, N. (1995). Continuous Univariate Distributions, 2nd ed., Vol. 2. Wiley.
  • Stacy, E. W. (1962). A generalization of the gamma distribution. The Annals of Mathematical Statistics, 33(3), 1187–1192.
  • Lawless, J. F. (2003). Statistical Models and Methods for Lifetime Data, 2nd ed. Wiley.

Generalized Gamma Distribution: equations and calculator

Distribution defintion

X∼GeneralizedGamma(a,d,p)X\sim\mathrm{GeneralizedGamma}\left(a,d,p\right)

Distribution domain

x∈(0,∞)x\in\left(0,\infty\right)

Parameters domain and parameters constraints

a∈R+,d∈R+,p∈R+a\in\mathbb{R}^{+},d\in\mathbb{R}^{+},p\in\mathbb{R}^{+}

Cumulative distribution function

FX(x)=P(d/p,(x/a)p)=γ(d/p,(x/a)p)Γ(d/p)F_{X}\left(x\right)=\text{P}(d/p,(x/a)^p)=\frac{\gamma(d/p,(x/a)^p)}{\Gamma(d/p)}

Probability density function

fX(x)=p/adΓ(d/p)xd−1e−(x/a)pf_{X}\left(x\right)=\frac{p/a^d}{\Gamma(d/p)} x^{d-1}e^{-(x/a)^p}

Percent point function/Sample

FX−1(u)=aP−1(dp,u)1pF^{-1}_{X}\left(u\right)=a\text{P}^{-1}\left(\frac{d}{p},u\right)^{\frac{1}{p}}

Non-central parametric moments

μk′=E[Xk]=∫0∞xkfX(x)dx=akΓ(d+kp)Γ(dp)\mu'_{k}=E[X^k]=\int_{0}^{\infty}x^{k}f_{X}\left(x\right)dx=a^k\frac{\Gamma (\frac{d+k}{p})}{\Gamma(\frac{d}{p})}

Parametric mean

Mean(X)=μ1′\mathrm{Mean}(X)=\mu'_{1}

Parametric variance

Variance(X)=μ2′−μ1′2\mathrm{Variance}(X)=\mu'_{2}-\mu'^{2}_{1}

Parametric skewness

Skewness(X)=μ3′−3μ2′μ1′+2μ1′3(μ2′−μ1′2)1.5\mathrm{Skewness}(X)=\frac{\mu'_{3}-3\mu'_{2}\mu'_{1}+2\mu'^{3}_{1}}{(\mu'_{2}-\mu'^{2}_{1})^{1.5}}

Parametric kurtosis

Kurtosis(X)=μ4′−4μ1′μ3′+6μ1′2μ2′−3μ1′4(μ2′−μ1′2)2\mathrm{Kurtosis}(X)=\frac{\mu'_{4}-4\mu'_{1}\mu'_{3}+6\mu'^{2}_{1}\mu'_{2}-3\mu'^{4}_{1}}{(\mu'_{2}-\mu'^{2}_{1})^{2}}

Parametric median

Median(X)=aP−1(dp,12)1p\mathrm{Median}(X)=a\text{P}^{-1}\left(\frac{d}{p},\frac{1}{2}\right)^{\frac{1}{p}}

Parametric mode

Mode(X)=a(d−1p)1pif d>1\mathrm{Mode}(X)=a\left(\frac{d-1}{p}\right)^{\frac{1}{p}} \quad \text{if } d>1

Additional information and definitions

a:Scale parametera:\text{Scale parameter}
u:Uniform[0,1] random varibleu:\text{Uniform[0,1] random varible}
P(a,x)=γ(a,x)Γ(a):Regularized lower incomplete gamma function\text{P}\left(a,x\right)=\frac{\gamma(a,x)}{\Gamma(a)}:\text{Regularized lower incomplete gamma function}
P−1(a,u):Inverse of regularized lower incomplete gamma function\text{P}^{-1}\left(a,u\right):\text{Inverse of regularized lower incomplete gamma function}
γ(a,x):Lower incomplete gamma function\gamma\left(a,x\right):\text{Lower incomplete gamma function}
Γ(x):Gamma function\Gamma\left(x\right):\text{Gamma function}