Gamma Function Advanced

Definitions

Definition A: For any x > 0 the gamma function is defined by

Gamma function

(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

Upper incomplete gamma function

For any x > 0 the upper incomplete gamma function is defined by

Lower incomplete gamma functionProperties

Property A:

image3305

Proof: Follows from Definitions A and B.

Property B:

image3306

Proof: Follows by integrating by parts.

Property C:

image3307Proof: By Property B

image3308

Property 1

  1. Γ(1) = 1
  2. Γ(x + 1) = x Γ(x)
  3. Γ(n) = (n – 1)! For all natural numbers n = 0, 1, 2, 3, …
  4. Γ(½) = \sqrt{\pi}

Proof:

(1)    By Definition 1
image3311(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

image5074

We won’t prove this here, but note that by using the substitution  x = \! \sqrt{t}, we have by Definition 1

image5075

image5076

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\sqrt{\pi}. 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.

Gamma function for 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

Leave a Comment