Chi-square distribution - Values

In this lecture we discuss how to compute the values of the Chi-square distribution function, using Chi-square distribution tables or computer programs (in particular Matlab or Excel). For an introduction to the Chi-square distribution, see the lecture entitled Chi-square distribution.

Let X_n be a Chi-square random variable with n degrees of freedom and denote its distribution function by [eq1]

As we have discussed in the lecture entitled Chi-square distribution, there is no simple analytical expression for [eq2] and its values are usually looked up in a table or computed with a computer algorithm.

This lecture discusses the practical problem of computing numerically the values of [eq3] when x is a specific number (e.g. [eq4]).

Chi-square distribution tables

In the past, when computers were not widely available, people used to look up the values of [eq5] in Chi-square distribution tables.

A Chi-square distribution table is a table where some critical values of [eq6] are tabulated for several values of the degrees of freedom parameter n. A Chi-square distribution table looks something like this:Chi-square distribution table

For example, at the intersection of the row corresponding to $5$ degrees of freedom and the column corresponding to a value of the distribution function of [eq7], we read the value $11.07$. This means that:[eq8]In other words, the probability that a Chi-square random variable with $5$ degrees of freedom is less than $11.07$ is [eq9].

If we are searching for a value of x that does not correspond to one of the critical values in the first row, then a Chi-square distribution table is not of any help. In this case, we need to use a computer algorithm (see below).

Chi-square distribution values in Excel

To compute the values of the Chi-square distribution function [eq10], we can use the built-in Excel function CHISQ.DIST(). For example, if we need to compute [eq11] and the value 1 is stored in cell A1, we can type in another cell:

=CHISQ.DIST(A1,5)

Chi-square distribution values in Matlab

To compute the values of the Chi-square distribution function [eq12], we can use the Matlab function chi2cdf(), which takes the value x as its first argument and the number of degrees of freedom n as its second argument. For example, if we need to compute [eq13], we can input the following command:

chi2cdf(1,5)

Solved exercises

At the end of the lecture entitled Chi-square distribution, you can find some solved exercises that also require the computation of Chi-square distribution values.

by
About | Contacts | Privacy and terms of use | Sitemap