StatlectThe Digital Textbook
Index > Mathematical tools

Gamma function

The Gamma function is a generalization of the factorial function to non-integer numbers.

Recall that, if $nin U{2115} $, its factorial $n!$ is[eq1]so that $n!$ satisfies the following recursion:[eq2]

The Gamma function [eq3] satisfies a similar recursion:[eq4]but it is defined also when $z$ is not an integer.

Definition

The following is a possible definition of the Gamma function.

Definition The Gamma function $Gamma $ is a function [eq5] satisfying the following equation:[eq6]

While the domain of definition of the Gamma function can be extended beyond the set $U{211d} _{++}$ of strictly positive real numbers (for example to complex numbers), the somewhat restrictive definition given above is more than sufficient to address all the problems involving the Gamma function that are found in these lectures.

Recursion

Given the above definition, it is straightforward to prove that the Gamma function satisfies the following recursion: [eq7]

Proof

The recursion can be derived by using integration by parts:[eq8]

Relation to the factorial function

When the argument of the Gamma function is a natural number $nin U{2115} $ then its value is equal to the factorial of $n-1$:[eq9]

Proof

First of all, we have that[eq10]

Using the recursion [eq11], we obtain[eq12]

More details

The following sections contain more details about the Gamma function.

Values of the Gamma function

A well-known fact, which is often used in probability theory and statistics is the following:[eq13]

Proof

By using the definition and performing a change of variable, we obtain[eq14]

By using this fact and the recursion formula previously shown, it is immediate to prove that[eq15]for $nin U{2115} $.

Proof

The result is obtained by iterating the recursion formula:[eq16]

There are also other special cases in which the value of the Gamma function can be derived analytically, but it is not possible to express [eq17] in terms of elementary functions for every $z$. As a consequence, one often needs to resort to numerical algorithms to compute [eq18]. For example, the Matlab command gamma(z)returns the value of the Gamma function at the point z.

For a thorough discussion of a number of algorithms that can be employed to compute numerical approximations of [eq19] see Abramowitz and Stegun (1965).

Lower incomplete Gamma function

The definition of the Gamma function:[eq20]can be generalized by substituting the upper bound of integration ($x=infty $) with a variable ($x=y$):[eq21]The function [eq22] thus obtained is called lower incomplete Gamma function.

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

Compute the following ratio:[eq23]

Solution

We need to repeatedly apply the recursive formula[eq24]to the numerator of the ratio:[eq25]

Exercise 2

Compute[eq26]

Solution

We need to use the relation of the Gamma function to the factorial function: [eq27]which, for $n=5$, becomes[eq28]

Exercise 3

Express the following integral in terms of the Gamma function:[eq29]

Solution

This is accomplished as follows:[eq30]where in the last step we have just used the definition of Gamma function.

References

Abramowitz, M. and I. A. Stegun (1965) Hanbook of mathematical functions: with formulas, graphs, and mathematical tables, Courier Dover Publications.

The book

Most learning materials found on this website are now available in a traditional textbook format.