Post · 4 min read· pp. 340–344

1.3.6.6.11. Gamma Distribution

1. Exploratory Data Analysis 1.3. EDA Techniques 1.3.6. Probability Distributions 1.3.6.6. Gallery of Distributions
Probability Density FunctionThe general formula for the probability density function of the gamma distribution is ( f(x) = \frac{(\frac{x-\mu}{\beta})^{\gamma - 1}\exp{(-\frac{x-\mu}
{\beta}})} {\beta\Gamma(\gamma)} \hspace{.2in} x \ge \mu; \gamma,
\beta > 0 ) where γ is the shape parameter, μ is the location parameter, β is the scale parameter, and Γ is the gamma function which has the formula Γ(a)=∫0∞ta−1e−tdt\Gamma(a) = \int_{0}^{\infty} {t^{a-1}e^{-t}dt} The case where μ = 0 and β = 1 is called the standard gamma distribution. The equation for the standard gamma distribution reduces to ( f(x) = \frac{x^{\gamma - 1}e^{-x}} {\Gamma(\gamma)} \hspace{.2in}
x \ge 0; \gamma > 0 ) Since the general form of probability functions can be expressed in terms of the standard distribution, all subsequent formulas in this section are given for the standard form of the function. The following is the plot of the gamma probability density function. plot of the gamma probability density function
Cumulative Distribution FunctionThe formula for the cumulative distribution function of the gamma distribution is ( F(x) = \frac{\Gamma_{x}(\gamma)} {\Gamma(\gamma)} \hspace{.2in}
x \ge 0; \gamma > 0 ) where Γ is the gamma function defined above and Γx(a)\Gamma_{x}(a) is the incomplete gamma function. The incomplete gamma function has the formula Γx(a)=∫0xta−1e−tdt\Gamma_{x}(a) = \int_{0}^{x} {t^{a-1}e^{-t}dt} The following is the plot of the gamma cumulative distribution function with the same values of γ as the pdf plots above. plot of the gamma cumulative distribution function
Percent Point FunctionThe formula for the percent point function of the gamma distribution does not exist in a simple closed form. It is computed numerically. The following is the plot of the gamma percent point function with the same values of γ as the pdf plots above. plot of the gamma percent point function
Hazard FunctionThe formula for the hazard function of the gamma distribution is ( h(x) = \frac{x^{\gamma - 1}e^{-x}} {\Gamma(\gamma) -
\Gamma_{x}(\gamma)} \hspace{.2in} x \ge 0; \gamma > 0 ) The following is the plot of the gamma hazard function with the same values of γ as the pdf plots above. plot of the gamma hazard function
Cumulative Hazard FunctionThe formula for the cumulative hazard function of the gamma distribution is ( H(x) = -\log{(1 - \frac{\Gamma_{x}(\gamma)} {\Gamma(\gamma)})}
\hspace{.2in} x \ge 0; \gamma > 0 ) where Γ is the gamma function defined above and Γx(a)\Gamma_{x}(a) is the incomplete gamma function defined above. The following is the plot of the gamma cumulative hazard function with the same values of γ as the pdf plots above. plot of the gamma cumulative hazard function
Survival FunctionThe formula for the survival function of the gamma distribution is ( S(x) = 1 - \frac{\Gamma_{x}(\gamma)} {\Gamma(\gamma)} \hspace{.2in}
x \ge 0; \gamma > 0 ) where Γ is the gamma function defined above and Γx(a)\Gamma_{x}(a) is the incomplete gamma function defined above. The following is the plot of the gamma survival function with the same values of γ as the pdf plots above. plot of the gamma survival function
Inverse Survival FunctionThe gamma inverse survival function does not exist in simple closed form. It is computed numberically. The following is the plot of the gamma inverse survival function with the same values of γ as the pdf plots above. plot of the gamma inverse survival function
Common StatisticsThe formulas below are with the location parameter equal to zero and the scale parameter equal to one.
Parameter EstimationThe method of moments estimators of the 2-parameter gamma distribution are γ^=(xˉs)2\hat{\gamma} = (\frac{\bar{x}} {s})^{2} β^=s2xˉ\hat{\beta} = \frac{s^{2}} {\bar{x}} where xˉ\bar{x} and s are the sample mean and standard deviation, respectively. The maximum likelihood estimates for the 2-parameter gamma distribution are the solutions of the following simultaneous equations β^−xˉγ^=0\hat{\beta} - \frac{\bar{x}}{\hat{\gamma}} = 0 ( \log{\hat{\gamma}} - \psi(\hat{\gamma}) - \log \left( \frac{\bar{x}}
{ \left( \prod_{i=1}^{n}{x_i} \right) ^{1/n} } \right) = 0 ) with ψ denoting the digamma function. These equations need to be solved numerically; this is typically accomplished by using statistical software packages.
SoftwareSome general purpose statistical software programs support at least some of the probability functions for the gamma distribution.