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 and Excel).
Let be a Chi-square random variable with degrees of freedom and denote its distribution function by
As we have discussed in the lecture entitled Chi-square distribution, there is no simple analytical expression for and its values are usually looked up in a table or computed with a computer algorithm. The next sections discuss these alternatives in detail.
In the past, when computers were not widely available, people used to look up the values of in Chi-square distribution tables, where some critical values of were tabulated for several values of the degrees of freedom parameter .
A Chi-square distribution table looks something like this:
Degrees of freedom / Probability | 0.01 | 0.05 | 0.10 | 0.90 | 0.95 | 0.99 |
---|---|---|---|---|---|---|
1 | 0.00 | 0.00 | 0.02 | 2.71 | 3.84 | 6.63 |
2 | 0.02 | 0.10 | 0.21 | 4.61 | 5.99 | 9.21 |
3 | 0.11 | 0.35 | 0.58 | 6.25 | 7.81 | 11.34 |
4 | 0.30 | 0.71 | 1.06 | 7.78 | 9.49 | 13.28 |
5 | 0.55 | 1.15 | 1.61 | 9.24 | 11.07 | 15.09 |
6 | 0.87 | 1.64 | 2.20 | 10.64 | 12.59 | 16.81 |
7 | 1.24 | 2.17 | 2.83 | 12.02 | 14.07 | 18.48 |
8 | 1.65 | 2.73 | 3.49 | 13.36 | 15.51 | 20.09 |
9 | 2.09 | 3.33 | 4.17 | 14.68 | 16.92 | 21.67 |
10 | 2.56 | 3.94 | 4.87 | 15.99 | 18.31 | 23.21 |
11 | 3.05 | 4.57 | 5.58 | 17.28 | 19.68 | 24.72 |
12 | 3.57 | 5.23 | 6.30 | 18.55 | 21.03 | 26.22 |
13 | 4.11 | 5.89 | 7.04 | 19.81 | 22.36 | 27.69 |
14 | 4.66 | 6.57 | 7.79 | 21.06 | 23.68 | 29.14 |
15 | 5.23 | 7.26 | 8.55 | 22.31 | 25.00 | 30.58 |
16 | 5.81 | 7.96 | 9.31 | 23.54 | 26.30 | 32.00 |
17 | 6.41 | 8.67 | 10.09 | 24.77 | 27.59 | 33.41 |
18 | 7.01 | 9.39 | 10.86 | 25.99 | 28.87 | 34.81 |
19 | 7.63 | 10.12 | 11.65 | 27.20 | 30.14 | 36.19 |
20 | 8.26 | 10.85 | 12.44 | 28.41 | 31.41 | 37.57 |
21 | 8.90 | 11.59 | 13.24 | 29.62 | 32.67 | 38.93 |
22 | 9.54 | 12.34 | 14.04 | 30.81 | 33.92 | 40.29 |
23 | 10.20 | 13.09 | 14.85 | 32.01 | 35.17 | 41.64 |
24 | 10.86 | 13.85 | 15.66 | 33.20 | 36.42 | 42.98 |
25 | 11.52 | 14.61 | 16.47 | 34.38 | 37.65 | 44.31 |
26 | 12.20 | 15.38 | 17.29 | 35.56 | 38.89 | 45.64 |
27 | 12.88 | 16.15 | 18.11 | 36.74 | 40.11 | 46.96 |
28 | 13.56 | 16.93 | 18.94 | 37.92 | 41.34 | 48.28 |
29 | 14.26 | 17.71 | 19.77 | 39.09 | 42.56 | 49.59 |
30 | 14.95 | 18.49 | 20.60 | 40.26 | 43.77 | 50.89 |
31 | 15.66 | 19.28 | 21.43 | 41.42 | 44.99 | 52.19 |
32 | 16.36 | 20.07 | 22.27 | 42.58 | 46.19 | 53.49 |
33 | 17.07 | 20.87 | 23.11 | 43.75 | 47.40 | 54.78 |
34 | 17.79 | 21.66 | 23.95 | 44.90 | 48.60 | 56.06 |
35 | 18.51 | 22.47 | 24.80 | 46.06 | 49.80 | 57.34 |
36 | 19.23 | 23.27 | 25.64 | 47.21 | 51.00 | 58.62 |
37 | 19.96 | 24.07 | 26.49 | 48.36 | 52.19 | 59.89 |
38 | 20.69 | 24.88 | 27.34 | 49.51 | 53.38 | 61.16 |
39 | 21.43 | 25.70 | 28.20 | 50.66 | 54.57 | 62.43 |
40 | 22.16 | 26.51 | 29.05 | 51.81 | 55.76 | 63.69 |
41 | 22.91 | 27.33 | 29.91 | 52.95 | 56.94 | 64.95 |
42 | 23.65 | 28.14 | 30.77 | 54.09 | 58.12 | 66.21 |
43 | 24.40 | 28.96 | 31.63 | 55.23 | 59.30 | 67.46 |
44 | 25.15 | 29.79 | 32.49 | 56.37 | 60.48 | 68.71 |
45 | 25.90 | 30.61 | 33.35 | 57.51 | 61.66 | 69.96 |
46 | 26.66 | 31.44 | 34.22 | 58.64 | 62.83 | 71.20 |
47 | 27.42 | 32.27 | 35.08 | 59.77 | 64.00 | 72.44 |
48 | 28.18 | 33.10 | 35.95 | 60.91 | 65.17 | 73.68 |
49 | 28.94 | 33.93 | 36.82 | 62.04 | 66.34 | 74.92 |
50 | 29.71 | 34.76 | 37.69 | 63.17 | 67.50 | 76.15 |
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 0.95, we read the value 11.07. This means thatIn other words, the realization of a Chi-square random variable with 5 degrees of freedom will be less than 11.07 with probability 0.95.
If we are searching for a value of 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).
To compute the values of the Chi-square distribution function
,
we can use the built-in Excel function CHISQ.DIST()
.
For example, if we need to compute
and the value
is stored in cell A1
, we can type in another cell:
=CHISQ.DIST(A1,5)
To compute the values of the Chi-square distribution function
,
we can use the Matlab function chi2cdf()
, which takes
the value
as its first argument and the number of degrees of freedom
as its second argument. For example, if we need to compute
,
we can input the following command:
chi2cdf(1,5)
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.
Please cite as:
Taboga, Marco (2021). "Values of the Chi-square distribution", Lectures on probability theory and mathematical statistics. Kindle Direct Publishing. Online appendix. https://www.statlect.com/probability-distributions/chi-square-distribution-values.
Most of the learning materials found on this website are now available in a traditional textbook format.