0% found this document useful (0 votes)
60 views

Chi-Square and Related Distribution

This document discusses the chi-square distribution, a continuous probability distribution defined on the positive real numbers that arises in statistical testing. It has a probability density function that depends on a parameter called degrees of freedom. The chi-square distribution is a special case of the gamma distribution and is related to other distributions. It has useful properties including that the sum of independent chi-square random variables is also chi-square distributed.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Chi-Square and Related Distribution

This document discusses the chi-square distribution, a continuous probability distribution defined on the positive real numbers that arises in statistical testing. It has a probability density function that depends on a parameter called degrees of freedom. The chi-square distribution is a special case of the gamma distribution and is related to other distributions. It has useful properties including that the sum of independent chi-square random variables is also chi-square distributed.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

5.

9: Chi-Square and Related Distribution

In this section we will study a distribution, and some relatives, that have special importance in statistics. In particular, the
chi-square distribution will arise in the study of the sample variance when the underlying distribution is normal and in
goodness of fit tests.

The Chi-Square Distribution


Distribution Functions
For n ∈ (0, ∞) , the gamma distribution with shape parameter n/2 and scale parameter 2 is called the chi-square
distribution with n degrees of freedom. The probability density function f is given by
1 n/2−1 −x/2
f (x) = x e , x ∈ (0, ∞) (5.9.1)
n/2
2 Γ(n/2)

So the chi-square distribution is a continuous distribution on (0, ∞). For reasons that will be clear later, n is usually a
positive integer, although technically this is not a mathematical requirement. When n is a positive integer, the gamma
function in the normalizing constant can be be given explicitly.

If n ∈ N + then
1. Γ(n/2) = (n/2 − 1)! if n is even.
(n−1)! −
2. Γ(n/2) = n−1
√π if n is odd.
2 (n/2−1/2)!

The chi-square distribution has a rich collection of shapes.

The chi-square probability density function with n ∈ (0, ∞) degrees of freedom satisfies the following properties:
1. If 0 < n < 2 , f is decreasing with f (x) → ∞ as x ↓ 0.
2. If n = 2 , f is decreasing with f (0) = . 1

3. If n > 2 , f increases and then decreases with mode at n − 2 .


4. If 0 < n ≤ 2 , f is concave downward.
−−−−−
5. If 2 < n ≤ 4 , f is concave downward and then upward, with inflection point at n − 2 + √2n − 4
6. If n > 4 then f is concave upward then downward and then upward again, with inflection points at
−−−−−
n − 2 ± √2n − 4

In the special distribution simulator, select the chi-square distribution. Vary n with the scroll bar and note the shape of
the probability density function. For selected values of n , run the simulation 1000 times and compare the empirical
density function to the true probability density function.

The distribution function and the quantile function do not have simple, closed-form representations for most values of the
parameter. However, the distribution function can be given in terms of the complete and incomplete gamma functions.

Suppose that X has the chi-square distribution with n ∈ (0, ∞) degrees of freedom. The distribution function F of X
is given by
Γ(n/2, x/2)
F (x) = , x ∈ (0, ∞) (5.9.2)
Γ(n/2)

Approximate values of the distribution and quantile functions can be obtained from the special distribution calculator, and
from most mathematical and statistical software packages.

Kyle Siegrist 5.9.1 1/26/2022 https://stats.libretexts.org/@go/page/10175


In the special distribution calculator, select the chi-square distribution. Vary the parameter and note the shape of the
probability density, distribution, and quantile functions. In each of the following cases, find the median, the first and
third quartiles, and the interquartile range.
1. n = 1
2. n = 2
3. n = 5
4. n = 10

Moments
The mean, variance, moments, and moment generating function of the chi-square distribution can be obtained easily from
general results for the gamma distribution.

If X has the chi-square distribution with n ∈ (0, ∞) degrees of freedom then


1. E(X) = n
2. var(X) = 2n

In the simulation of the special distribution simulator, select the chi-square distribution. Vary n with the scroll bar and
note the size and location of the mean ± standard deviation bar. For selected values of n , run the simulation 1000
times and compare the empirical moments to the distribution moments.

The skewness and kurtosis of the chi-square distribution are given next.

If X has the chi-square distribution with n ∈ (0, ∞) degrees of freedom, then


−−−
1. skew(X) = 2√2/n
2. kurt(X) = 3 + 12/n

Note that skew(X) → 0 and kurt(X) → 3 as n → ∞ . In particular, the excess kurtosis kurt(X) − 3 → 0 as n → ∞ .

In the simulation of the special distribution simulator, select the chi-square distribution. Increase n with the scroll bar
and note the shape of the probability density function in light of the previous results on skewness and kurtosis. For
selected values of n , run the simulation 1000 times and compare the empirical density function to the true probability
density function.

The next result gives the general moments of the chi-square distribution.

If X has the chi-square distribution with n ∈ (0, ∞) degrees of freedom, then for k > −n/2 ,
Γ(n/2 + k)
k k
E (X ) =2 (5.9.3)
Γ(n/2)

In particular, if k ∈ N+ then
k k
n n n
E (X ) =2 ( )( + 1) ⋯ ( + k − 1) (5.9.4)
2 2 2

Note also E (X k
) =∞ if k ≤ −n/2 .

If X has the chi-square distribution with n ∈ (0, ∞) degrees of freedom, then X has moment generating function

tX
1 1
E (e ) = , t < (5.9.5)
n/2 2
(1 − 2t)

Kyle Siegrist 5.9.2 1/26/2022 https://stats.libretexts.org/@go/page/10175


Relations
The chi-square distribution is connected to a number of other special distributions. Of course, the most important
relationship is the definition—the chi-square distribution with n degrees of freedom is a special case of the gamma
distribution, corresponding to shape parameter n/2 and scale parameter 2. On the other hand, any gamma distributed
variable can be re-scaled into a variable with a chi-square distribution.

If X has the gamma distribution with shape parameter k ∈ (0, ∞) and scale parameter b ∈ (0, ∞) then Y =
2

b
X has
the chi-square distribution with 2k degrees of freedom.
Proof

The chi-square distribution with 2 degrees of freedom is the exponential distribution with scale parameter 2.
Proof

If Z has the standard normal distribution then X = Z has the chi-square distribution with 1 degree of freedom.
2

Proof

Recall that if we add independent gamma variables with a common scale parameter, the resulting random variable also has
a gamma distribution, with the common scale parameter and with shape parameter that is the sum of the shape parameters
of the terms. Specializing to the chi-square distribution, we have the following important result:

If has the chi-square distribution with m ∈ (0, ∞) degrees of freedom, Y has the chi-square distribution with
X

n ∈ (0, ∞) degrees of freedom, and X and Y are independent, then X + Y has the chi-square distribution with
m + n degrees of freedom.

The last two results lead to the following theorem, which is fundamentally important in statistics.

Suppose that n ∈ N + and that (Z1 , Z2 , … , Zn ) is a sequence of independent standard normal variables. Then the
sum of the squares
n

2
V = ∑Z (5.9.8)
i

i=1

has the chi-square distribution with n degrees of freedom:

This theorem is the reason that the chi-square distribution deserves a name of its own, and the reason that the degrees of
freedom parameter is usually a positive integer. Sums of squares of independent normal variables occur frequently in
statistics.
From the central limit theorem, and previous results for the gamma distribution, it follows that if n is large, the chi-square
distribution with n degrees of freedom can be approximated by the normal distribution with mean n and variance 2n. Here
is the precise statement:

If X has the chi-square distribution with n ∈ (0, ∞) degrees of freedom, then the distribution of the standard score
n

Xn − n
Zn = −− (5.9.9)
√2n

converges to the standard normal distribution as n → ∞ .

In the simulation of the special distribution simulator, select the chi-square distribution. Start with n = 1 and increase
n . Note the shape of the probability density function in light of the previous theorem. For selected values of n , run the

experiment 1000 times and compare the empirical density function to the true density function.

Like the gamma distribution, the chi-square distribution is infinitely divisible:

Kyle Siegrist 5.9.3 1/26/2022 https://stats.libretexts.org/@go/page/10175


Suppose that X has the chi-square distribution with n ∈ (0, ∞) degrees of freedom. For k ∈ N , X has the same +

k
distribution as ∑ X , where (X , X , … , X ) is a sequence of independent random variables, each with the chi-
i=1 i 1 2 k

square distribution with n/k degrees of freedom.

Also like the gamma distribution, the chi-square distribution is a member of the general exponential family of
distributions:

The chi-square distribution with with n ∈ (0, ∞) degrees of freedom is a one-parameter exponential family with
natural parameter n/2 − 1 , and natural statistic ln X .
Proof

The Chi Distribution


The chi distribution, appropriately enough, is the distribution of the square root of a variable with the chi-square
distribution


Suppose that X has the chi-square distribution with n ∈ (0, ∞) degrees of freedom. Then U = √X has the chi
distribution with n degrees of freedom.

So like the chi-square distribution, the chi distribution is a continuous distribution on (0, ∞).

Distribution Functions
The distribution function G of the chi distribution with n ∈ (0, ∞) degrees of freedom is given by
2
Γ(n/2, u /2)
G(u) = , u ∈ (0, ∞) (5.9.11)
Γ(n/2)

Proof

The probability density function g of the chi distribution with n ∈ (0, ∞) degrees of freedom is given by
1 2
n−1 −u /2
g(u) = u e , u ∈ (0, ∞) (5.9.13)
n/2−1
2 Γ(n/2)

Proof

The chi probability density function also has a variety of shapes.

The chi probability density function with n ∈ (0, ∞) degrees of freedom satisfies the following properties:
1. If 0 < n < 1 , g is decreasing with g(u) → ∞ as u ↓ 0.
−−−
2. If n = 1 , g is decreasing with g(0) = √2/π as u ↓ 0.
−−−−−
3. If n > 1 , g increases and then decreases with mode u = √n − 1
4. If 0 < n < 1 , g is concave upward.
−−−−−−−−−−−−−−− −
−−−−−
5. If 1 ≤ n ≤ 2 , g is concave downward and then upward with inflection point at u = √ 1

2
[2n − 1 + √8n − 7 ]

6. If n > 2 , g is concave upward then downward then upward again with inflection points at
−−−−−−−−−−−−−−− −
1 −−−−−
u =√ [2n − 1 ± √8n − 7 ]
2

Moments
The raw moments of the chi distribution are easy to comput in terms of the gamma function.

Suppose that U has the chi distribution with n ∈ (0, ∞) degrees of freedom. Then
Γ[(n + k)/2]
k k/2
E(U ) =2 , k ∈ (0, ∞) (5.9.15)
Γ(n/2)

Proof
Kyle Siegrist 5.9.4 1/26/2022 https://stats.libretexts.org/@go/page/10175
Curiously, the second moment is simply the degrees of freedom parameter.

Suppose again that U has the chi distribution with n ∈ (0, ∞) degrees of freedom. Then
Γ[(n+1)/2]
1. E(U ) = 2 1/2

Γ(n/2)

2. E(U 2
) =n
2
Γ [(n+1)/2]
3. var(U ) = n − 2 2
Γ (n/2)

Proof

Relations
The fundamental relationship of course is the one between the chi distribution and the chi-square distribution given in the
definition. In turn, this leads to a fundamental relationship between the chi distribution and the normal distribution.

Suppose that n ∈ N + and that (Z 1, Z2 , … , Zn ) is a sequence of independent variables, each with the standard normal
distribution. Then
−−−−−−−−−−−−−−−−
2 2 2
U =√ Z +Z + ⋯ + Zn (5.9.19)
1 2

has the chi distribution with n degrees of freedom.

Note that the random variable U in the last result is the standard Euclidean norm of (Z , Z , … , Z ), thought of as a
1 2 n

vector in R . Note also that the chi distribution with 1 degree of freedom is the distribution of |Z|, the absolute value of a
n

standard normal variable, which is known as the standard half-normal distribution.

The Non-Central Chi-Square Distribution


Much of the importance of the chi-square distribution stems from the fact that it is the distribution that governs the sum of
squares of independent, standard normal variables. A natural generalization, and one that is important in statistical
applications, is to consider the distribution of a sum of squares of independent normal variables, each with variance 1 but
with different means.

Suppose that n ∈ N and that (X , X , … , X ) is a sequence of independent variables, where X has the normal
+ 1 2 n k

distribution with mean μ ∈ R and variance 1 for k ∈ {1, 2, … , n}. The distribution of Y = ∑
k X is the non- n

k=1
2
k
n
central chi-square distribution with n degrees of freedom and non-centrality parameter λ = ∑ μ . k=1
2
k

Note that the degrees of freedom is a positive integer while the non-centrality parameter λ ∈ [0, ∞) , but we will soon
generalize the degrees of freedom.

Distribution Functions
Like the chi-square and chi distributions, the non-central chi-square distribution is a continuous distribution on (0, ∞).
The probability density function and distribution function do not have simple, closed expressions, but there is a fascinating
connection to the Poisson distribution. To set up the notation, let f and F denote the probability density and distribution
k k

functions of the chi-square distribution with k ∈ (0, ∞) degrees of freedom. Suppose that Y has the non-central chi-
square distribution with n ∈ N degrees of freedom and non-centrality parameter λ ∈ [0, ∞). The following fundamental
+

theorem gives the probability density function of Y as an infinite series, and shows that the distribution does in fact depend
only on n and λ .

The probability density function g of Y is given by


∞ k
(λ/2)
−λ/2
g(y) = ∑ e fn+2k (y), y ∈ (0, ∞) (5.9.20)
k!
k=0

Proof

Kyle Siegrist 5.9.5 1/26/2022 https://stats.libretexts.org/@go/page/10175


k
(λ/2)
The function k ↦ e −λ/2

k!
on N is the probability density function of the Poisson distribution with parameter λ/2. So
it follows that if N has the Poisson distribution with parameter λ/2 and the conditional distribution of Y given N is chi-
square with parameter n + 2N , then Y has the distribution discussed here—non-central chi-square with n degrees of
freedom and non-centrality parameter λ . Moreover, it's clear that g is a valid probability density function for any
n ∈ (0, ∞) , so we can generalize our definition a bit.

For n ∈ (0, ∞) and λ ∈ [0, ∞), the distribution with probability density function g above is the non-central chi-
square distribution with n degrees of freedom and non-centrality parameter λ .

The distribution function G is given by


∞ k
(λ/2)
−λ/2
G(y) = ∑ e Fn+2k (y), y ∈ (0, ∞) (5.9.28)
k!
k=0

Proof

Moments
In this discussion, we assume again that Y has the non-central chi-square distribution with n ∈ (0, ∞) degrees of freedom
and non-centrality parameter λ ∈ [0, ∞).

The moment generating function M of Y is given by


1 λt
tY
M (t) = E (e ) = exp( ), t ∈ (−∞, 1/2) (5.9.29)
n/2 1 − 2t
(1 − 2t)

Proof

The mean and variance of Y are


1. E(Y ) = n + λ
2. var(Y ) = 2(n + 2λ)
Proof

The skewness and kurtosis of Y are


1. skew(Y ) = 2 3/2 n+3λ

3/2
(n+2λ)

2. kurt(Y ) = 3 + 12 n+4λ
2
(n+2λ)

Note that skew(Y ) → 0 as n → ∞ or as λ → ∞ . Note also that the excess kurtosis is kurt(Y ) − 3 = 12
n+4λ
2
. So
(n+2λ)

kurt(Y ) → 3 (the kurtosis of the normal distribution) as n → ∞ or as λ → ∞ .

Relations
Trivially of course, the ordinary chi-square distribution is a special case of the non-central chi-square distribution, with
non-centrality parameter 0. The most important relation is the orignal definition above. The non-central chi-square
distribution with n ∈ N degrees of freedom and non-centrality parameter λ ∈ [0, ∞) is the distribution of the sum of the
+

squares of n independent normal variables with variance 1 and whose means satisfy ∑ μ = λ . The next most
n

k=1
2
k

important relation is the one that arose in the probability density function and was so useful for computing moments. We
state this one again for emphasis.

Suppose that N has the Poisson distribution with parameter λ/2, where λ ∈ (0, ∞) , and that the conditional
distribution of Y given N is chi-square with n + 2N degrees of freedom, where n ∈ (0, ∞) . Then the
(unconditional) distribution of Y is non-central chi-square with n degree of freedom and non-centrality parameter λ .
Proof

As the asymptotic results for the skewness and kurtosis suggest, there is also a central limit theorem.

Kyle Siegrist 5.9.6 1/26/2022 https://stats.libretexts.org/@go/page/10175


Suppose that Y has the non-central chi-square distribution with n ∈ (0, ∞) degrees of freedom and non-centrality
parameter λ ∈ (0, ∞) . Then the distribution of the standard score
Y − (n + λ)
(5.9.33)
− −−−−− −−
√ 2(n + 2λ)

converges to the standard normal distribution as n → ∞ or as λ → ∞ .

Computational Exercises
Suppose that a missile is fired at a target at the origin of a plane coordinate system, with units in meters. The missile
lands at (X, Y ) where X and Y are independent and each has the normal distribution with mean 0 and variance 100.
The missile will destroy the target if it lands within 20 meters of the target. Find the probability of this event.
Answer

Suppose that X has the chi-square distribution with n = 18 degrees of freedom. For each of the following, compute
the true value using the special distribution calculator and then compute the normal approximation. Compare the
results.
1. P(15 < X < 20)
2. The 75th percentile of X.
Answer

Kyle Siegrist 5.9.7 1/26/2022 https://stats.libretexts.org/@go/page/10175

You might also like