Gamma
Gamma
We call (p) the Gamma function and it appears in many of the formulæ of density functions
for continuous random variables such as the Gamma distribution, Beta distribution, Chi-
squared distribution, t distribution, and F distribution.
The first thing that should be checked is that the integral defining (p) is convergent for
p > 0. For now, we will assume that it is true that the Gamma function is well-defined. This
will allow us to derive some of its important properties and show its utility for statistics.
The Gamma function may be viewed as a generalization of the factorial function as this first
result shows.
Proof. This is proved using integration by parts from first-year calculus. Indeed,
Z 1 Z 1 1 Z 1
p+1 1 u p u p u
(p + 1) = u e du = u e du = u e + pup 1 e u du = 0 + p (p).
0 0 0 0
To
R do the integration
R by parts, let w = up , dw = pup 1 , dv = e u
,v= e u
and recall that
w dv = wv v dw.
However, Z Z
1 1 1
0 u u u
(1) = ue du = e du = e =1 (1)
0 0 0
and so
(n) = (n 1)(n 2) · · · 2 · 1 = (n 1)!
as required.
The next proposition shows us how to calculate (p) for certain fractional values of p.
9–1
p
Proposition 3. (1/2) = ⇡.
Proof. By definition, Z 1
1/2 u
(1/2) = u e du.
0
2
where the last equality follows since e v is an even function. We now recognize this as the
density function of a N (0, 1/2) random variable. That is,
Z 1
1 v2
p e 2 2 dv = 1
2⇡ 1
and so Z 1
v2 p
e 2 2 dv = 2⇡.
1
2
Choosing = 1/2 gives Z 1 p
v2
e dv = ⇡
1
p
and so we conclude that (1/2) = ⇡ as claimed.
This proposition can be combined with Proposition 1 to show, for example, that
p
⇡
(3/2) = (1/2 + 1) = 1/2 · (1/2) =
2
and p
3 ⇡
(5/2) = (3/2 + 1) = 3/2 · (3/2) = .
4
For students, though, perhaps the most powerful use of the Gamma function is to compute
integrals such as the following.
Example 4. Suppose that Y ⇠ Exp(✓). Use Gamma functions to quickly compute E(Y 2 ).
Solution. By definition, we have
Z 1 Z 1
1
E(Y ) =
2 2
y fY (y) dy = y2e y/✓
dy.
1 ✓ 0
9–2
Example 5. If Y ⇠ Exp(✓), then this method can be applied to compute E(Y k ) for any
positive integer k. Indeed,
Z Z
1 1 k y/✓ 1 1 k k u
E(Y ) =
k
y e dy = ✓ u e ✓ du = ✓k (k + 1) = k! ✓k .
✓ 0 ✓ 0
FY (y) = P {Y y} = P {X 2 y}.
and so
p 1 p 1 1 p p
fY (y) = FY0 (y) = fX ( y) · p fX ( y) · p = p [fX ( y) fX ( y)] .
2 y 2 y 2 y
Remark. We will not cover many-to-one functions beyond this example. Therefore, omit
everything following Example 2.6 on page 23 (including Example 2.7 on page 24).
is absolutely convergent.
9–3
We begin with the easiest case. If p = 1, then
Z 1 Z 1 Z N
0 u u u N
u e du = e du = lim e du = lim (1 e ) = 1.
0 0 N !1 0 N !1
For the remaining cases 0 < p < 1 and p > 1 we will consider the integral from 0 to 1 and
the integral from 1 to 1 separately.
If 0 < p < 1, then the integral Z 1
up 1
e u
du
0
is improper. Thus,
Z 1 Z 1 Z 1
p 1 u p 1 u 1 ap 1
u e du = lim u e du lim up 1
du = lim =
0 a!0+ a a!0+ a a!0+ p p
u
since e 1 for 0 u 1.
Furthermore, if 0 < p < 1, then 0 < up 1 1 for u 1 and so
Z 1 Z N Z N
p 1 u p 1 u
u e du = lim u e du lim e u du = lim (1 e N
) = 1.
1 N !1 1 N !1 1 N !1
If p > 1, then up 1
2 [0, 1] and e u 1 for 0 u 1. Thus,
Z 1 Z 1 1
p 1 u up 1
u e du up 1 du = = .
0 0 p 0 p
bpc 1
On the other hand, if p > 1, then notice that p bpc 2 [0, 1) so that 0 < up 1 for
u 1. We then have
Z N Z N Z N
p bpc 1 bpc
p 1 u
u e du = u u
u e du ubpc e u du.
1 1 1
Thus, integration by parts bpc times (the so-called reduction formula) gives
Z N
ubpc e u du
1
N
= e u
ubpc + bpcubpc 1
+ bpc · (bpc 1)ubpc 2
+ · · · + bpc · (bpc 1) · · · 2 · u
1
Z N
u
+ bpc · (bpc 1) · · · 2 · 1 · e du
1
9–4
and so Z N
lim ubpc e u
du = bpc !.
N !1 1
Thus, we can conclude that for p > 1,
Z 1 Z 1 Z 1
p 1 u 1
u e du = up 1 e u
du + up 1
e u
du + bpc ! < 1.
0 0 1 p
That is, this integral is absolutely convergent, and so (p) is well-defined for p > 0.
9–5