# The Gamma Distribution

 Chapter 13: The Gamma Distribution

 Chapter 13 The Gamma Distribution

## Contents

Available Software:
Weibull++

More Resources:
Weibull++ Examples Collection

Life Data Analysis (*.pdf)

Generate Reference Book:
File may be more up-to-date

The gamma distribution is a flexible life distribution model that may offer a good fit to some sets of failure data. It is not, however, widely used as a life distribution model for common failure mechanisms. The gamma distribution does arise naturally as the time-to-first-fail distribution for a system with standby exponentially distributed backups, and is also a good fit for the sum of independent exponential random variables. The gamma distribution is sometimes called the Erlang distribution, which is used frequently in queuing theory applications, as discussed in [32].

### The Gamma Probability Density Function

The pdf of the gamma distribution is given by:

$f(t)=\frac{{{e}^{kz-{{e}^{z}}}}}{t\Gamma (k)}\,\!$

where:

\begin{align} z=\ln (t)-\mu \end{align}\,\!

and:

\begin{align} & {{e}^{\mu }}= \text{scale parameter} \\ & k= \text{shape parameter} \end{align}\,\!

where $0, $-\infty <\mu <\infty \,\!$ and $k>0\,\!$.

### The Gamma Reliability Function

The reliability for a mission of time $t\,\!$ for the gamma distribution is:

\begin{align} R=1-{{\Gamma }_{I}}(k;{{e}^{z}}) \end{align}\,\!

### The Gamma Mean, Median and Mode

The gamma mean or MTTF is:

$\overline{T}=k{{e}^{\mu }}\,\!$

The mode exists if $k>1\,\!$ and is given by:

$\tilde{T}=(k-1){{e}^{\mu }}\,\!$

The median is:

$\widehat{T}={{e}^{\mu +\ln (\Gamma _{I}^{-1}(0.5;k))}}\,\!$

### The Gamma Standard Deviation

The standard deviation for the gamma distribution is:

${{\sigma }_{T}}=\sqrt{k}{{e}^{\mu }}\,\!$

### The Gamma Reliable Life

The gamma reliable life is:

${{T}_{R}}={{e}^{\mu +\ln (\Gamma _{1}^{-1}(1-R;k))}}\,\!$

### The Gamma Failure Rate Function

The instantaneous gamma failure rate is given by:

$\lambda =\frac{{{e}^{kz-{{e}^{z}}}}}{t\Gamma (k)(1-{{\Gamma }_{I}}(k;{{e}^{z}}))}\,\!$

## Characteristics of the Gamma Distribution

Some of the specific characteristics of the gamma distribution are the following:

For $k>1\,\!$ :

• As $t\to 0,\infty\,\!$, $f(t)\to 0.\,\!$
$f(t)\,\!$ increases from 0 to the mode value and decreases thereafter.
• If $k\le 2\,\!$ then pdf has one inflection point at $t={{e}^{\mu }}\sqrt{k-1}(\,\!$ $\sqrt{k-1}+1).\,\!$
• If $k>2\,\!$ then pdf has two inflection points for $t={{e}^{\mu }}\sqrt{k-1}(\,\!$ $\sqrt{k-1}\pm 1).\,\!$
• For a fixed $k\,\!$, as $\mu \,\!$ increases, the pdf starts to look more like a straight angle.
• As $t\to \infty ,\lambda (t)\to \tfrac{1}{{{e}^{\mu }}}.\,\!$

For $k=1\,\!$ :

• Gamma becomes the exponential distribution.
• As $t\to 0\,\!$, $f(T)\to \tfrac{1}{{{e}^{\mu }}}.\,\!$
• As $t\to \infty ,f(t)\to 0.\,\!$
• The pdf decreases monotonically and is convex.
$\lambda (t)\equiv \tfrac{1}{{{e}^{\mu }}}\,\!$. $\lambda (t)\,\!$ is constant.
• The mode does not exist.

For $0 :

• As $t\to 0\,\!$, $f(t)\to \infty .\,\!$
• As $t\to \infty ,f(t)\to 0.\,\!$
• As $t\to \infty ,\lambda (t)\to \tfrac{1}{{{e}^{\mu }}}.\,\!$
• The pdf decreases monotonically and is convex.
• As $\mu \,\!$ increases, the pdf gets stretched out to the right and its height decreases, while maintaining its shape.
• As $\mu \,\!$ decreases, the pdf shifts towards the left and its height increases.
• The mode does not exist.

## Confidence Bounds

The only method available in Weibull++ for confidence bounds for the gamma distribution is the Fisher matrix, which is described next. The complete derivations were presented in detail (for a general function) in the Confidence Bounds chapter.

### Bounds on the Parameters

The lower and upper bounds on the mean, $\widehat{\mu }\,\!$, are estimated from:

\begin{align} & {{\mu }_{U}}= & \widehat{\mu }+{{K}_{\alpha }}\sqrt{Var(\widehat{\mu })}\text{ (upper bound)} \\ & {{\mu }_{L}}= & \widehat{\mu }-{{K}_{\alpha }}\sqrt{Var(\widehat{\mu })}\text{ (lower bound)} \end{align}\,\!

Since the standard deviation, $\widehat{\sigma }\,\!$, must be positive, $\ln (\widehat{\sigma })\,\!$ is treated as normally distributed and the bounds are estimated from:

\begin{align} & {{k}_{U}}= & \widehat{k}\cdot {{e}^{\tfrac{{{K}_{\alpha }}\sqrt{Var(\widehat{k})}}{{\hat{k}}}}}\text{ (upper bound)} \\ & {{k}_{L}}= & \frac{\widehat{\sigma }}{{{e}^{\tfrac{{{K}_{\alpha }}\sqrt{Var(\widehat{k})}}{\widehat{k}}}}}\text{ (lower bound)} \end{align}\,\!

where ${{K}_{\alpha }}\,\!$ is defined by:

$\alpha =\frac{1}{\sqrt{2\pi }}\int_{{{K}_{\alpha }}}^{\infty }{{e}^{-\tfrac{{{t}^{2}}}{2}}}dt=1-\Phi ({{K}_{\alpha }})\,\!$

If $\delta \,\!$ is the confidence level, then $\alpha =\tfrac{1-\delta }{2}\,\!$ for the two-sided bounds and $\alpha =1-\delta \,\!$ for the one-sided bounds.

The variances and covariances of $\widehat{\mu }\,\!$ and $\widehat{k}\,\!$ are estimated from the Fisher matrix, as follows:

$\left( \begin{matrix} \widehat{Var}\left( \widehat{\mu } \right) & \widehat{Cov}\left( \widehat{\mu },\widehat{k} \right) \\ \widehat{Cov}\left( \widehat{\mu },\widehat{k} \right) & \widehat{Var}\left( \widehat{k} \right) \\ \end{matrix} \right)=\left( \begin{matrix} -\tfrac{{{\partial }^{2}}\Lambda }{\partial {{\mu }^{2}}} & -\tfrac{{{\partial }^{2}}\Lambda }{\partial \mu \partial k} \\ {} & {} \\ -\tfrac{{{\partial }^{2}}\Lambda }{\partial \mu \partial k} & -\tfrac{{{\partial }^{2}}\Lambda }{\partial {{k}^{2}}} \\ \end{matrix} \right)_{\mu =\widehat{\mu },k=\widehat{k}}^{-1}\,\!$

$\Lambda \,\!$ is the log-likelihood function of the gamma distribution, described in Parameter Estimation and Appendix D

### Bounds on Reliability

The reliability of the gamma distribution is:

$\widehat{R}(t;\hat{\mu },\hat{k})=1-{{\Gamma }_{I}}(\widehat{k};{{e}^{\widehat{z}}})\,\!$

where:

$\widehat{z}=\ln (t)-\widehat{\mu }\,\!$

The upper and lower bounds on reliability are:

${{R}_{U}}=\frac{\widehat{R}}{\widehat{R}+(1-\widehat{R})\exp (\tfrac{-{{K}_{\alpha }}\sqrt{Var(\widehat{R})\text{ }}}{\widehat{R}(1-\widehat{R})})}\text{ (upper bound)}\,\!$
${{R}_{L}}=\frac{\widehat{R}}{\widehat{R}+(1-\widehat{R})\exp (\tfrac{{{K}_{\alpha }}\sqrt{Var(\widehat{R})\text{ }}}{\widehat{R}(1-\widehat{R})})}\text{ (lower bound)}\,\!$

where:

$Var(\widehat{R})={{(\frac{\partial R}{\partial \mu })}^{2}}Var(\widehat{\mu })+2(\frac{\partial R}{\partial \mu })(\frac{\partial R}{\partial k})Cov(\widehat{\mu },\widehat{k})+{{(\frac{\partial z}{\partial k})}^{2}}Var(\widehat{k})\,\!$

### Bounds on Time

The bounds around time for a given gamma percentile (unreliability) are estimated by first solving the reliability equation with respect to time, as follows:

$\widehat{T}(\widehat{\mu },\widehat{\sigma })=\widehat{\mu }+\widehat{\sigma }z\,\!$

where:

$z=\ln (-\ln (R))\,\!$
$Var(\widehat{T})={{(\frac{\partial T}{\partial \mu })}^{2}}Var(\widehat{\mu })+2(\frac{\partial T}{\partial \mu })(\frac{\partial T}{\partial \sigma })Cov(\widehat{\mu },\widehat{\sigma })+{{(\frac{\partial T}{\partial \sigma })}^{2}}Var(\widehat{\sigma })\,\!$

or:

$Var(\widehat{T})=Var(\widehat{\mu })+2\widehat{z}Cov(\widehat{\mu },\widehat{\sigma })+{{\widehat{z}}^{2}}Var(\widehat{\sigma })\,\!$

The upper and lower bounds are then found by:

\begin{align} & {{T}_{U}}= & \hat{T}+{{K}_{\alpha }}\sqrt{Var(\hat{T})}\text{ (Upper bound)} \\ & {{T}_{L}}= & \hat{T}-{{K}_{\alpha }}\sqrt{Var(\hat{T})}\text{ (Lower bound)} \end{align}\,\!

## General Example

24 units were reliability tested, and the following life test data were obtained:

$\begin{matrix} \text{61} & \text{50} & \text{67} & \text{49} & \text{53} & \text{62} \\ \text{53} & \text{61} & \text{43} & \text{65} & \text{53} & \text{56} \\ \text{62} & \text{56} & \text{58} & \text{55} & \text{58} & \text{48} \\ \text{66} & \text{44} & \text{48} & \text{58} & \text{43} & \text{40} \\ \end{matrix}\,\!$

Fitting the gamma distribution to this data, using maximum likelihood as the analysis method, gives the following parameters:

\begin{align} & \hat{\mu }= 7.72E-02 \\ & \hat{k}= 50.4908 \end{align}\,\!

Using rank regression on $X,\,\!$ the estimated parameters are:

\begin{align} & \hat{\mu }= 0.2915 \\ & \hat{k}= 41.1726 \end{align}\,\!

Using rank regression on $Y,\,\!$ the estimated parameters are:

\begin{align} & \hat{\mu }= 0.2915 \\ & \hat{k}= 41.1726 \end{align}\,\!