Professional Documents
Culture Documents
The Chi-Square Distribution: B.1. The Gamma Function
The Chi-Square Distribution: B.1. The Gamma Function
∞
Γ( p ) = ∫ x p −1e − x dx , p > 0 (B.1)
0
∞
Γ( p) = −e − x x p −1 | ∞0 − ∫ [−e − x ( p − 1) x p −2 dx]
0
∞
= 0 + ( p − 1) ∫ e − x x p −2 dx (B.2)
0
= ( p − 1)Γ( p − 1)
By this way, we can demonstrate that the Gamma function obeys an interesting
recurrence relation. If p is a positive integer, then applying equation (B.2) repetitively we
obtain [21]
Γ( p ) = ( p − 1)Γ( p − 1)
= ( p − 1)( p − 2)Γ( p − 2) = K = ( p − 1)( p − 2) K Γ(1) (B.3)
But,
∞
Γ(1) = ∫ e − x dx = 1 (B.4)
0
Γ( p ) = ( p − 1)! (B.5)
1 ∞
Γ = ∫ x −1 2 e − x dx = π (B.6)
2 0
Y = aX 2 + b , a > 0 (B.7)
fY ( y) =
fX [ ( y − b) / a ]+ f [−
X ( y − b) / a ] (B.8)
2a [( y − b) / a ] 2a [( y − b) / a ]
Using the results above we can now derive the pdf of a chi-square random
variable with one degree of freedom. We will take X to be gaussian-distributed with zero
mean and variance σ 2 . As was mentioned previously we have Y=X2 which implies that
a=1 and b=0 in (B.7). Using (B.8) we obtain as the pdf of Y the following expression
∞
ψ Y ( jω ) = ∫ e jωy f Y ( y )dy
−∞
1 (B.10)
= 1
(1 − j 2ωσ 2 ) 2
n
Y = ∑ X i2 (B.11)
i =1
gaussian random variables with zero mean and variance σ 2 . Thus we obtain the
characteristic function of Y as [31]
1
ψ Y ( jω ) = (B.12)
(1 − j 2ωσ 2 ) n 2
Taking the inverse transform of (B.12) we get the pdf of Y as
1 2σ 2
fY ( y) = y ( n 2) −1e − y , for y ≥ 0 (B.13)
1
σ 2
n n2
Γ n
2
This pdf is called a chi-square pdf with n degrees of freedom. Figures B.1 to B.4 illustrate
this pdf, for purpose of illustration we assumed σ 2 = 1 . An important point to notice is
that when n=2, we obtain an exponential distribution.
+∞
M X ( s ) = ∫ e sx f ( x)dx (B.14)
−∞
By comparing equations (B.10) and (B.14) it can be seen that the Moment
Generating Function and the Characteristic Function are directly related. The
Characteristic Function is obtained when the s parameter in the MGF is substituted by jω .
The Moment Generating Function has the following properties [21,32]:
M ’ ( 0) = E ( X )
M " ( 0) = E ( X 2 )
M
M ( n ) ( 0) = E ( X n )
Thus we obtain:
For the chi-square distribution with n degrees of freedom, the MGF is given
by[21]:
−n
M Y ( s ) = (1 − 2σ 2 s ) 2
(B.16)
The mean and variance of the chi-square distribution, which can be extracted
from the MGF, are thus:
σ Y2 = 2nσ 4 (B.18)