Definitions
Definition A: For any x > 0 the gamma function is defined by
(Note: actually the gamma function can be defined as above for any complex number with non-negative real part.)
Definition B: For any x > 0 the lower incomplete gamma function is defined by
For any x > 0 the upper incomplete gamma function is defined by
Properties
Property A:
Proof: Follows from Definitions A and B.
Property B:
Proof: Follows by integrating by parts.
Property C:
Property 1
- Γ(1) = 1
- Γ(x + 1) = x Γ(x)
- Γ(n) = (n – 1)! For all natural numbers n = 0, 1, 2, 3, …
- Γ(½) =
Proof:
(1) By Definition 1
(2) Follows from Property C
(3) Follows from (1) and (2) by induction
(4) The proof of the fourth assertion results from the fact (Gaussian integral) that
We won’t prove this here, but note that by using the substitution x = , we have by Definition 1
Gamma Function for Negative Values
Observation: Note that the gamma function Γ(x) is only defined for x > 0. Negative values can be defined via Property 1.2, namely via Γ(x) = Γ(x+1)/x. Thus, by Property 1.4, we see that Γ(–.5) = Γ(-.5+1)/(-.5) = –2. This approach only works for non-integer values since Γ(0) = Γ(1)/0, Γ(-1) = Γ(0)/(-1), etc. are undefined.
The following formula can be used to calculate the gamma function for non-integer negative values.
Worksheet Functions
Real Statistics Functions: The Real Statistics Resource Pack provides the following formulas.
XGAMMA(x) = gamma function at x even when x is negative
LowerGamma(x, a) = lower incomplete gamma function γ(x, a)
UpperGamma(x, a) = upper incomplete gamma function Γ(x, a)
These functions can be calculated in standard Excel as follows:
Γ(-x) = -PI()/(x*EXP(GAMMALN(x))*SIN(PI()*x)
γ(x, a) = EXP(GAMMALN(x)) * GAMMA.DIST(a, x, 1,TRUE)
Γ(x, a) = EXP(GAMMALN(x)) * (1 – GAMMA.DIST(a, x, 1,TRUE))
References
Wikipedia (2013) Gamma function
https://en.wikipedia.org/wiki/Gamma_function
Wikipedia (2013) Incomplete gamma function
https://en.wikipedia.org/wiki/Incomplete_gamma_function