Chi-Square and Related Distribution
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.
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 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
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.
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.
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.
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)
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
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
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.
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
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
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 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
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
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 λ .
Proof
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 λ .
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, ∞).
Proof
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λ)
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.
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