Mostly Harmless StatisticsXYZ Homework Edition

⇩ Download ▾

Chapter 10: Chi-Square Tests

A χ2\chi^{2} -distribution (chi-square, pronounced “ki-square”) is another special type of distribution for a continuous random variable. The sampling distribution for a variance and standard deviation follows a chi-square distribution.

# 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, so the peak walks right
legend("topright", c("df=2", "df=4", "df=10", "df=30"), col = 1:4, lwd = 1)
# Every curve starts at zero and is skewed right. Raise a df above 50 and re-run:
# the skew disappears and the curve becomes normal, exactly as property 4 says.

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

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 ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.