# What is the use of Gamma function in real world?

Is there any real world use of this function and can it be helpful now or in feature? or is it just made for fun in mathematics?

Im asking because i know that factorial it self is used for calculating permutations, combinations , in probabilities and also its used in Taylor series.

But is there any real use of gamma function which is more extended? for example Why do we even need negative factorial.

(i know we have formulas in mathematics but i want things that can prove other things or be useful anyway)

• It shows up quite a lot in probability models, for example in the gamma distribution. – André Nicolas Nov 3 '15 at 17:55
• – lhf Nov 3 '15 at 18:04
• And what exactly constitutes the “real world” ? – Lucian Nov 3 '15 at 20:25
• @Lucian By that i meant applications. Sorry for bad english. I said real word because i didnt want just mathematic equations but something that helps to express solutions to problems. – M.kazem Akhgary Nov 3 '15 at 20:31
• @lhf thanks for the link ill look in to it. – M.kazem Akhgary Nov 3 '15 at 20:33

To give an example: The beta distribution is defined via the gamma function (in the introduction of the article are some applications of this distribution mentioned).

I came across this distribution, when I looked up how probabilities of binomially distributed random variables are calculated in statistical libraries. So let's have a look at scipy (a scientific library for the programming language Python): They implement the computation of $\binom nk p^k q^{n-k}$ in scipy.stats.binom.pmf(k,n,p). When we have a look at the source code we see:

from scipy.special import entr, gammaln as gamln

...

def _logpmf(self, x, n, p):
k = floor(x)
combiln = (gamln(n+1) - (gamln(k+1) + gamln(n-k+1)))
return combiln + special.xlogy(k, p) + special.xlog1py(n-k, -p)

def _pmf(self, x, n, p):
return exp(self._logpmf(x, n, p))


You see, the function scipy.special.gammaln() is used which is the logarithm of the absolute value of the gamma function.

The conclusion: The gamma function is used in actual computations for approximating statistical values.

Others may add other applications as well ;-)