Mostly Harmless StatisticsXYZ Homework Edition

⇩ Download ▾

10.1 Chi-Square Distribution

A χ2\chi^{2} -distribution (chi-square, pronounced “ki-square”) is another special type of distribution for a continuous random variable. For an independent random sample of size nn from a normal population, (n−1)S2/σ2(n-1)S^2/\sigma^2 follows a chi-square distribution with n−1n-1 degrees of freedom. The sample variance is a scaled chi-square variable; the sample standard deviation itself is not chi-square.

# Figure 10-1: the chi-square family for df = 2, 4, 10, 30
curve(dchisq(x, 2), 0, 50, ylim = c(0, 0.5), xlab = "chi-square", ylab = "density")
curve(dchisq(x, 4),  add = TRUE, col = 2)
curve(dchisq(x, 10), add = TRUE, col = 3)
curve(dchisq(x, 30), add = TRUE, col = 4)   # mean = df; for these df, the mode is df - 2
legend("topright", c("df=2", "df=4", "df=10", "df=30"), col = 1:4, lwd = 1)
# Support is x >= 0. For df=2 the density is largest at the boundary x=0.
# Raise df above 50 and re-run: relative skew decreases, giving a normal
# approximation after suitable centering/scaling; finite-df curves remain skewed.

Properties of the χ2\chi^{2} -distribution density curve:

  1. Right skewed starting at zero.
  2. The center and spread of a χ2\chi^{2} -distribution are determined by the degrees of freedom with a mean = df and standard deviation = 2df\sqrt{2df}.
  3. Chi-square variables cannot be negative.
  4. As the degrees of freedom increase, the χ2\chi^{2} -distribution becomes more nearly normal as the degrees of freedom increase; this is an approximation, not exact normality at any finite df. Figure 10-1 shows χ2\chi^{2} -distributions for df of 2, 4, 10, and 30.
  5. The total area under the curve is equal to 1, or 100%.
Line graph titled Figure 10-1: The Chi-Square Family for df = 2, 4, 10, 30 showing four chi-square density curves on one set of axes, chi-square 0 to 50 across and density 0 to 0.5 up: the df = 2 curve (solid) starts at 0.5 and falls steeply; df = 4 (dashed) peaks near 2, df = 10 (dash-dot) near 8, and df = 30 (dotted) near 28, each lower, more spread out, and more symmetric than the last.
Figure 10-1

We will use the χ2\chi^{2} -distribution for hypothesis testing later in this chapter. For now, we are just learning how to find a critical value χα2\chi_{\alpha}^{2}.

The symbol χα2\chi_{\alpha}^{2} is the critical value on the χ2\chi^{2} -distribution curve with area 1 – α\alpha below the critical value and area α\alpha above the critical value, as shown below in Figure 10-2.

Right-skewed chi-square distribution curve with the body labeled 1 − α and the right tail shaded green and labeled α; the boundary between them on the axis is the critical value χ²α.
Figure 10-2

Use technology to compute the critical value for the χ2\chi^{2} -distribution.

TI-84: Use the INVCHI2 program downloaded at Rachel Webb’s website: http://MostlyHarmlessStatistics.com. The target cutoff has right-tail area α\alpha. Follow the custom program’s specified tail convention: if it requests a right-tail area, enter α\alpha; if it requests a cumulative left-tail area, enter 1−α1-\alpha. Enter the stated df and check the tail of the resulting cutoff.

TI-89: Go to the [Apps] Stat/List Editor, then select F5 [DISTR]. This will get you a menu of probability distributions. Arrow down to Inverse > Inverse Chi-Square and press [ENTER]. Enter the area 1 – α\alpha to the left of the χ\chi value and the df into each cell. Press [ENTER].

Excel: =CHISQ.INV(1 – α\alpha, df) or =CHISQ.INV.RT(α\alpha, df)

Alternatively, use the following online calculator: https://homepage.divms.uiowa.edu/~mbognar/applets/chisq.html.

Adapted from Mostly Harmless Statistics by Rachel Webb (Portland State University, https://mostlyharmlessstat.wixsite.com/webpage), © Rachel Webb, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.