Gamma Distribution Function

 x - value Alpha -α Beta - β Gamma probability -G

α -                           Shape parameter

β -                  scale parameter

G ( x, α, β ) - Gamma distribution function

f ( x )              -  Density of G distribution spreading [0 to infinity]

f ( x ) =              G(α)-1 β-α e-x/β, xα-1

Reference -1

## The Gamma function

No wonder mathematicians find numbers to be the passion of a lifetime. Deceptively simple things can lead to such amazing complexity, to intriguing links between seemingly unconnected concepts.

Take the simple concept of the factorial. The factorial of a positive integer n is defined as the product of all the integers between 1 and ninclusive. Thus, for instance, the factorial of 5 is 5! = 1×2×3×4×5, or 120. Because n!=n×(n1)!, and conversely, (n1)!=n!/n, it is possible to define 0! as 1!/1, or 1.

If you plot the factorial of integers on a graph, you'll notice that the points you plotted will be along what appears to be some kind of an exponential curve. In any case, it looks very much possible to connect the points with a smooth line. This begs the question: might it be possible to extend the definition of the factorial and create a smooth function that has a value for all real numbers, not just integers, but for integers, its value is equal to that of the factorial itself?

The answer is a resounding yes; such a function indeed exists. In fact, the so-called Gamma function extends the definition of the factorial to the entire complex plane. In other words, while the factorial is defined only for non-negative integers, the Gamma function is defined for any complex number z as long as z is not a negative integer.

Gamma function is defined by

For all complex numbers z, the following relation is true

Γ(z+1) = zΓ(z)

For all positive integers, it becomes

n!=Γ(n+1)

The following formula makes it possible to compute Gamma function for a negative argument

To compute gamma function, the above integral is not handy as very large number of terms have to be added adopting numerical integration procedure. General approximate result can be obtained from Stirling's approximation and slight modification of Stirling's formula yields a better result.

x! = xxe-x √2πx ( 1 + 1/12x )

n! = e-n √2πn ( 1 + [1/12n] + [1/1440n3] + [239 /362880n5] )n

(second one courtesy Gergo Nemes from Hungary )