PLAYGROUND

DISTRIBUTIONS / CONTINUOUS / GENERALIZED GAMMA 4P

Generalized Gamma 4P distribution

Why it exists

The four-parameter Generalized Gamma is Stacy’s family with a location shift. It adds an origin loc to a superfamily that can approximate Gamma, Weibull, and lognormal behaviour on the positive side.

Alternative names

It is also called four-parameter generalized gamma or generalized gamma with location.

Constructions and limits

With loc=0 it becomes Generalized Gamma. Gamma and Weibull subfamilies remain related, but free location makes comparisons with nested cases less transparent.

Applications

It can represent setup time followed by a flexible duration. In medical data, a time zero may mark study entry rather than the biological start of risk.

Do not free location, shape, and scale without enough information: the family can fit many positive-skew shapes and make conclusions ambiguous.

A superfamily with a moving origin

The fourth coordinate adds loc to Stacy’s construction. It separates a lower threshold from the three choices already governing scale and shape. This can help when a phenomenon has a known physical onset followed by hazards that Gamma or Weibull cannot express.

Four parameters also allow the origin and curvature to compensate for one another. A small change in loc alters every transformed value near the endpoint and may strongly change estimated shapes. The threshold should be checked against process knowledge rather than merely the sample minimum. If its uncertainty interval is broad, predictive curves usually communicate the fit better than assigning separate meaning to each estimate.

Decision guide

A good candidate when: Generalized Gamma flexibility is required and a nonzero physical threshold also exists.

Compare it with: unshifted Generalized Gamma and simpler 3P submodels. Require threshold and shape stability through resampling or likelihood profiles.

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 4P Distribution: equations and calculator

Distribution defintion

X∼GeneralizedGamma4P(a,d,p,Loc)X\sim\mathrm{GeneralizedGamma_{4P}}\left(a,d,p,\text{Loc}\right)

Distribution domain

x∈(Loc,∞)x\in\left(\text{Loc},\infty\right)

Parameters domain and parameters constraints

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

Cumulative distribution function

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

Probability density function

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

Percent point function/Sample

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

Non-central parametric moments

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

Parametric mean

Mean(X)=Loc+μ~1′\mathrm{Mean}(X)=\text{Loc}+\tilde{\mu}'_{1}

Parametric variance

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

Parametric skewness

Skewness(X)=μ~3′−3μ~2′μ~1′+2μ~1′3(μ~2′−μ~1′2)1.5\mathrm{Skewness}(X)=\frac{\tilde{\mu}'_{3}-3\tilde{\mu}'_{2}\tilde{\mu}'_{1}+2\tilde{\mu}'^{3}_{1}}{(\tilde{\mu}'_{2}-\tilde{\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{\tilde{\mu}'_{4}-4\tilde{\mu}'_{1}\tilde{\mu}'_{3}+6\tilde{\mu}'^{2}_{1}\tilde{\mu}'_{2}-3\tilde{\mu}'^{4}_{1}}{(\tilde{\mu}'_{2}-\tilde{\mu}'^{2}_{1})^{2}}

Parametric median

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

Parametric mode

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

Additional information and definitions

X~∼GeneralizedGamma(a,d,p)\tilde{X}\sim\mathrm{GeneralizedGamma}\left(a,d,p\right)
Loc:Location parameter\text{Loc}:\text{Location parameter}
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}