Cumulative distribution function
The cumulative distribution function of the Gamma distribution is
\[ F(x) \;\;=\;\; P(X \le x) \;\;=\;\; \int_0^x {\frac {\beta^\alpha }{\Gamma(\alpha)} u^{\alpha - 1} e^{-u\beta}} \;du \]Unfortunately, this integral cannot be simplified and can only be evaluated numerically. To obtain probabilities for Gamma distributions, a computer must be used.
Example
If a random variable, \(X\), has a Gamma distribution
\[ X \;\;\sim\;\; \GammaDistn(\alpha = 7,\; \beta = 12) \]what is the probability of getting a value between 0.5 and 1.0?
Excel has a function to find cumulative probabilities for Gamma distributions (but note that it takes the inverse of \(\beta\) as its 3rd parameters). To evaluate \(P(X \le x)\), the following can be typed into a spreadsheet cell:
= GAMMA.DIST( \(x\), \(\alpha\), 1/\(\beta\), true)
Using this,
\[ P(0.5 \lt X \lt 1.0) \;\;=\;\; F(1.0) - F(0.5) \;\;=\;\; 0.9542 - 0.3937 \;\;=\;\; 0.560 \]Quantiles from Gamma distributions
In a similar way, there is no algebraic formula for the quantiles of a Gamma distribution, but computer algorithms are available to find them numerically.
Example
If a random variable, \(X \sim \GammaDistn(\alpha = 7,\; \beta = 12)\), what is the lower quartile of its distribution?
We want to find the value \(q\) such that \(F(q) = 0.25\). This can be evaluated in Excel by typing the following into a spreadsheet cell:
= GAMMA.INV( 0.25, 7, 1/12)
giving the value 0.424.