Gamma Distribution#
The gamma distribution is given by,
Where \(\Gamma(r)\) is the gamma function given by,
Expectation : The expected value is given by, $\( E(X) = \frac{r}{\lambda} \)$
Variance : The variance is given by,
$$
\text{SD}(X) = \frac{\sqrt{r}}{\lambda}
$$
Sums : The sum of iid gamma distributions have the distribution
* For fixed rate $\lambda$
$$
\sum_k^n X_k \sim \text{gamma}\left(\sum_k^n r_k, \lambda \right)
$$
MGF : $\( M_X(t) = \left( \frac{\lambda}{\lambda-t} \right)^r, \quad \text{for } t < \lambda \)$
Rate Parameter#
The rate parameter \(\lambda\) is the scale parameter of the distribution
Shape Parameter#
The parameter \(r\) is known as the shape parameter of the distribution.
\(r=1\) gives the exponential distribution
\(r \to \infty\) gives the normal distribution
Gamma Function#
The gamma function,
has solutions that follow,
Which implies two sets of solutions:
For positive integer \(r\), $\( \Gamma(r) = (r-1)! \)$
For non-integers,
For rationals of \(\frac{1}{2} + r\) for \(r \ge 0\) $\( \Gamma\left(\frac{1}{2} + r\right) = \begin{cases} \dfrac{1}{\sqrt{\pi}}\\ \prod_\limits{k=1}^{r} \left(\frac{1}{2} + k - 1\right)\dfrac{1}{\sqrt{\pi}} \end{cases} \)$