## Friday, 18 October 2013

### Gamma Distribution CDF and Quantile Calculator

An implementation of the Gamma Distribution CDF and Quantile function Calculator occurs below. For shape parameter $\alpha$ and rate parameter $\beta$ (both these parameters have to be greater than zero) the Gamma density function is:-

$\Large\frac{\beta^{\alpha}}{\Gamma(\alpha)}x^{\alpha-1}e^{-\beta x}$

Note that the domain of the Gamma distribution function is restricted to be greater than zero. The $\alpha$ and $\beta$ fields have to be filled in, as well as two out of the three fields which are labelled Lower Limit, Upper Limit and Probability. The lower limit and upper limit fields each need to contain a number greater than 0. The probability field must contain a number between 0 and 1 only.

There is a graph below the tables, which will display the Gamma distribution function and highlight the area under the curve bounded by the limits defined by the Lower Limit and Upper Limit values. This is quite useful in that it allows us to examine how the value of the the shape parameter $\alpha$ and the rate parameter $\beta$ affects the shape of the distribution. By changing these values in the text entries, and pressing the Calculate button one can investigate how the two distribution parameters affect the density shape.

 $\alpha$: $\beta$:

 Lower limit: Upper limit: Probablility:

 Plot of distribution ($f(x)$) values against $x$ values $f(x)$ $x$

Discussing things gamma related, below is a Gamma function calculator. For integer input $n$ the Gamma function output is $(n-1)!$, but for non-integer values obtaining the result is more involved (although $\Gamma(0.5)=\sqrt{\pi}$). The Gamma function is undefined for input 0, so valid inputs to the Gamma function are all strictly positive real numbers.

Enter input to Gamma function $\Gamma(x)$:-

Result:-