COLLEGE STATISTICS • COMMON DISTRIBUTIONS

Chi-Square Distribution

The right-skewed distribution that underpins inference about variances, goodness-of-fit, and categorical independence.

Historical Context & Motivation

Statistical inference in the nineteenth century was largely built on the assumption that data followed a normal distribution, but practitioners quickly realized they needed tools to test whether that assumption—and others like it—actually held. The chi-square (χ²) distribution arose from this need: a probability model that describes how squared deviations from expectation behave when summed together. Its development was intertwined with the birth of modern hypothesis testing and the professionalization of statistics as a discipline distinct from pure mathematics. Understanding the chi-square distribution is essential because it serves as the sampling distribution for variance estimators, for goodness-of-fit tests, and for tests of independence in contingency tables—three pillars of applied statistics that appear across the natural sciences, social sciences, and engineering.

1875
Helmert's Discovery
Friedrich Robert Helmert derived the distribution of the sum of squared standard normal variables while studying geodetic measurement errors, effectively establishing the chi-square distribution decades before it received its modern name.
1900
Pearson's χ² Test
Karl Pearson published his landmark paper introducing the chi-square goodness-of-fit test, providing the first systematic method for comparing observed categorical frequencies against theoretical expectations.
1922
Fisher's Refinement
Ronald A. Fisher corrected Pearson's degrees-of-freedom calculation for the goodness-of-fit test when parameters are estimated from data, and connected the chi-square distribution to the sampling distribution of the sample variance.
1954
Modern Textbook Standardization
Foundational statistics textbooks by Mood, Graybill, and others codified the chi-square distribution's role in ANOVA, regression diagnostics, and multivariate analysis, cementing it as a core distribution taught in every statistics curriculum.

The central question the chi-square distribution answers is deceptively simple: if you square independent standard normal random variables and add them up, what distribution does the resulting sum follow? This question is far from academic—every time you compute a sample variance, run a goodness-of-fit test, or evaluate a contingency table, the chi-square distribution governs the probabilistic behavior of your test statistic.

Core Principles & Definitions

The chi-square distribution is a continuous probability distribution that arises naturally from the sum of squared independent standard normal random variables. If Z₁, Z₂, …, Zₖ are independent standard normal variables (each with mean 0 and variance 1), then the random variable Q = Z₁² + Z₂² + ⋯ + Zₖ² follows a chi-square distribution with k degrees of freedom, written Q ~ χ²(k). The degrees-of-freedom parameter k is the sole shape parameter, making the chi-square a one-parameter family of distributions.

1

Non-Negative Support

Because the chi-square variable is a sum of squares, it can only take values on [0, ∞). There is zero probability of observing a negative chi-square value, which distinguishes it from symmetric distributions like the normal.
2

Right Skewness

For small degrees of freedom the distribution is sharply right-skewed, with a long tail extending to the right. As k increases, the distribution becomes more symmetric, approaching normality by the Central Limit Theorem.
3

Degrees of Freedom as Shape

The single parameter k controls both the center (mean = k) and the spread (variance = 2k). Increasing k shifts the distribution rightward and reduces its relative skewness.
4

Additivity Property

If Q₁ ~ χ²(k₁) and Q₂ ~ χ²(k₂) are independent, then Q₁ + Q₂ ~ χ²(k₁ + k₂). This reproductive property is fundamental to decomposing sums of squares in ANOVA.
5

Connection to Gamma Family

The χ²(k) distribution is a special case of the Gamma distribution with shape α = k/2 and scale β = 2. This connection provides access to a rich set of theoretical results from the Gamma family.
KEY TAKEAWAY
Think of the chi-square distribution as a measuring tape for variability. Just as an engineer might measure how far multiple rivets deviate from their target diameter and then square and sum those deviations to get a single quality metric, the chi-square distribution tells you the probability of getting any particular value of that summed-squared-deviation metric if the manufacturing process is running correctly. A small chi-square value means the rivets are close to spec; a large value signals something is off.

Visual Explanation — Shape & Degrees of Freedom

The most important visual insight about the chi-square distribution is how the degrees-of-freedom parameter reshapes the probability density function. With only 2 degrees of freedom, the density is a decreasing exponential that peaks at the origin; by k = 5, a distinct interior mode emerges; and by k = 15 or 20, the curve begins to resemble a normal bell curve shifted to the right. The diagram below overlays several chi-square densities on a single axis so you can compare them directly.

Chi-square probability density functions for k = 2 (pink), k = 5 (cyan), k = 8 (violet), and k = 15 (amber). Notice how the mode shifts rightward as k increases—the mode is located at k − 2 for k ≥ 2—and the distribution becomes progressively more symmetric.

Several features of the diagram deserve attention. First, the k = 2 density (pink) is a pure exponential distribution with rate 1/2—this is the only chi-square distribution that achieves its maximum at the origin. For every k > 2 the mode sits at k − 2, which you can verify in the diagram: the cyan curve (k = 5) peaks near 3, the violet curve (k = 8) near 6, and the amber curve (k = 15) near 13. Second, observe how the right tail thins as k grows—because the variance is 2k, the standard deviation grows more slowly than the mean, so the coefficient of variation (σ/μ) shrinks. This is why, for large k, the chi-square distribution is well-approximated by a normal distribution with mean k and variance 2k.

Mathematical Framework

The chi-square distribution can be fully characterized by its probability density function, moment-generating function, and its moments. Each of these representations is useful in different analytic contexts—the PDF for computing probabilities, the MGF for proving the additivity property, and the moments for constructing confidence intervals.

PROBABILITY DENSITY FUNCTION
f(x; k) = [1 / (2^(k/2) · Γ(k/2))] · x^(k/2 − 1) · e^(−x/2), x ≥ 0
Here k is the degrees of freedom (a positive integer), Γ(·) is the gamma function, e is Euler's number, and x is the random variable value. The coefficient 1 / (2k/2 · Γ(k/2)) is a normalizing constant ensuring the density integrates to 1.
MOMENTS
E[X] = k, Var(X) = 2k, Skewness = √(8/k), Kurtosis = 12/k
The mean equals the degrees of freedom, and the variance is always twice the mean. The skewness and excess kurtosis both decrease toward zero as k → ∞, confirming the distribution's convergence to normality.
MOMENT-GENERATING FUNCTION
M_X(t) = (1 − 2t)^(−k/2), t < 1/2
This compact form makes it easy to prove the additivity property: if Q₁ ~ χ²(k₁) and Q₂ ~ χ²(k₂) are independent, then M_{Q₁+Q₂}(t) = (1 − 2t)^(−(k₁+k₂)/2), which is the MGF of a χ²(k₁ + k₂).
SAMPLING DISTRIBUTION OF VARIANCE
(n − 1)S² / σ² ~ χ²(n − 1)
When X₁, …, Xₙ are i.i.d. N(μ, σ²), the sample variance S² satisfies this relationship. This result is the foundation for constructing confidence intervals and hypothesis tests for a population variance.
💡 Why n − 1?
The sample variance uses n − 1 in its denominator because the deviations from the sample mean are subject to one linear constraint (they sum to zero). This reduces the effective number of independent squared standard normals from n to n − 1, giving a chi-square distribution with n − 1 degrees of freedom rather than n.

Major Applications & Test Statistics

The chi-square distribution is the engine behind three of the most widely used procedures in applied statistics: the goodness-of-fit test, the test of independence, and variance inference. Each procedure constructs a test statistic that, under the null hypothesis, follows a chi-square distribution with a specific number of degrees of freedom. The following diagram summarizes the three applications and their corresponding test-statistic formulas.

The three major applications of the chi-square distribution—goodness-of-fit (amber), test of independence (emerald), and variance inference (pink)—along with their test statistics, degrees of freedom, key assumptions, and the common right-tail rejection rule.

In each application, the logic is the same: compute a test statistic that measures the discrepancy between what you observe and what you expect under the null hypothesis. Because this discrepancy is built from squared differences, it follows a chi-square distribution (at least approximately). You then compare the observed statistic to the critical value from a chi-square table—or equivalently, compute a p-value—and make your inferential decision. The expected-count assumption (each Eᵢ ≥ 5) is a rule of thumb ensuring the chi-square approximation to the true discrete distribution of the test statistic is adequate; when this condition fails, exact tests or simulation-based alternatives should be used instead.

Worked Example — Goodness-of-Fit Test

A genetics researcher hypothesizes that flower color in a certain plant follows a 9:3:3:1 Mendelian ratio across four phenotypes (purple, red, pink, white). In a sample of 200 plants, she observes 98 purple, 54 red, 36 pink, and 12 white. Does the data support the Mendelian model at the α = 0.05 significance level?

Chi-Square Goodness-of-Fit Test
1
Step 1 — State the HypothesesH₀: The observed frequencies follow the 9:3:3:1 ratio. H₁: The observed frequencies do not follow the 9:3:3:1 ratio. The total number of parts is 9 + 3 + 3 + 1 = 16.
2
Step 2 — Compute Expected CountsExpected counts: E(purple) = 200 × (9/16) = 112.5, E(red) = 200 × (3/16) = 37.5, E(pink) = 200 × (3/16) = 37.5, E(white) = 200 × (1/16) = 12.5. All expected counts exceed 5, so the chi-square approximation is valid.
E = (112.5, 37.5, 37.5, 12.5)
3
Step 3 — Calculate the Test Statisticχ² = (98 − 112.5)²/112.5 + (54 − 37.5)²/37.5 + (36 − 37.5)²/37.5 + (12 − 12.5)²/12.5 = (−14.5)²/112.5 + (16.5)²/37.5 + (−1.5)²/37.5 + (−0.5)²/12.5 = 210.25/112.5 + 272.25/37.5 + 2.25/37.5 + 0.25/12.5 = 1.869 + 7.260 + 0.060 + 0.020.
χ² = 9.209
4
Step 4 — Determine Degrees of Freedom and Critical ValueWith c = 4 categories, the degrees of freedom are df = c − 1 = 3. From the chi-square table, the critical value at α = 0.05 with 3 degrees of freedom is χ²₀.₀₅,₃ = 7.815.
df = 3, χ²_crit = 7.815
5
Step 5 — Make the DecisionSince χ²_obs = 9.209 > χ²_crit = 7.815, we reject H₀ at the 0.05 significance level. The p-value falls between 0.025 and 0.05 (from chi-square tables with 3 df). There is statistically significant evidence that the flower-color distribution departs from the predicted 9:3:3:1 Mendelian ratio—particularly, red flowers appear more frequently than the model predicts.
Reject H₀: data do not fit the 9:3:3:1 ratio (p < 0.05)

Strengths, Limitations & Common Pitfalls

Strengths and limitations of chi-square–based inference
AspectStrengthsLimitations
ApplicabilityWorks for categorical and continuous data; used in GoF tests, independence tests, variance tests, and ANOVA decompositions.Requires sufficiently large expected counts (≥ 5 per cell) for accurate approximation; not suitable for very small samples.
AssumptionsRelatively few assumptions for categorical tests: random sampling and independent observations.Variance inference requires strict normality of the underlying population; chi-square tests for variance are not robust to departures from normality.
InterpretationProvides an omnibus test—detects any departure from the null in a single step.The omnibus nature means a significant result does not identify which category or cell is responsible; post hoc analysis is needed.
Effect SizeEasy to pair with effect-size measures like Cramér's V for independence or φ for 2×2 tables.The raw χ² value is sample-size dependent; large n can produce significant results for trivially small effects.
⚠️ PRACTICAL ADVICE
A statistically significant chi-square test does not mean a practically important difference exists. In large datasets (n > 1,000), even tiny deviations from the null will produce significant p-values. Always report an effect-size measure alongside the chi-square statistic—Cramér's V for contingency tables or the standardized residuals for goodness-of-fit—so that readers can judge the substantive magnitude of the result.

Connection to Related Distributions

The chi-square distribution does not exist in isolation. It is tightly woven into a network of distributions that appear throughout inferential statistics. Understanding these connections deepens your ability to move fluidly between tests and to recognize when different procedures are, at their core, relying on the same underlying mathematics.

How the chi-square distribution relates to other common distributions
Related DistributionRelationship to χ²(k)Where It Arises
Standard NormalIf Z ~ N(0,1), then Z² ~ χ²(1). The chi-square with 1 df is the distribution of a single squared standard normal.Proportions tests; the z-test statistic squared equals the chi-square statistic for a 2×1 table.
Student's tt = Z / √(V/k), where V ~ χ²(k). The t-distribution is defined as a standard normal divided by an independent chi-square divided by its df.Confidence intervals and hypothesis tests for means when σ is unknown.
F-distributionF = (V₁/k₁) / (V₂/k₂), where V₁ ~ χ²(k₁) and V₂ ~ χ²(k₂) are independent. The F is a ratio of two scaled chi-squares.ANOVA F-tests, tests comparing two variances, overall significance tests in regression.
Gammaχ²(k) = Gamma(k/2, 2). The chi-square is a special case of the Gamma with shape k/2 and scale 2.Bayesian conjugate priors for precision; waiting-time models in queuing theory.
Exponentialχ²(2) = Exponential(1/2). The chi-square with 2 degrees of freedom is precisely an exponential with rate 1/2.Survival analysis; inter-arrival times in Poisson processes.

These relationships are not merely theoretical curiosities—they have direct computational consequences. For instance, because the F-distribution is constructed from two chi-square variables, any F-test (including the overall F-test in multiple regression) is ultimately a comparison of sums of squared standard normals. Similarly, the fact that t² with k degrees of freedom equals F(1, k) means that a two-sided t-test and a one-way ANOVA with two groups produce identical p-values. Recognizing these connections will serve you well in advanced coursework in mathematical statistics, Bayesian inference, and multivariate analysis.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain why the chi-square distribution cannot take negative values. In your answer, relate this property to the definition of the distribution in terms of standard normal random variables.
PROBLEM 2BASIC CALCULATION
A random variable X follows a χ²(10) distribution. Find E[X], Var(X), and the standard deviation of X.
PROBLEM 3INTERMEDIATE
A manufacturer claims that a die is fair. You roll the die 120 times and observe the following counts: 1→25, 2→17, 3→15, 4→23, 5→24, 6→16. Conduct a chi-square goodness-of-fit test at α = 0.05.
PROBLEM 4APPLIED
A quality engineer draws a random sample of n = 25 ball bearings from a production line and computes a sample variance of S² = 0.0014 mm². The process specification requires that the population variance σ² not exceed 0.0010 mm². Test H₀: σ² = 0.0010 vs. H₁: σ² > 0.0010 at the α = 0.01 level. State your conclusion in the context of the manufacturing process.
PROBLEM 5CRITICAL THINKING
Suppose Q₁ ~ χ²(k₁) and Q₂ ~ χ²(k₂) are independent. Using the moment-generating function M_X(t) = (1 − 2t)^(−k/2), prove that Q₁ + Q₂ ~ χ²(k₁ + k₂). Then explain why this result is critical for understanding the decomposition of total sums of squares in one-way ANOVA.

Summary — Chi-Square Distribution

The chi-square distribution with k degrees of freedom is defined as the distribution of the sum of k independent squared standard normal random variables. It has mean k and variance 2k, is right-skewed for small k and approaches normality as k grows, and it supports only non-negative values. Its key additivity property states that the sum of independent chi-square variables is again chi-square.

In practice, the chi-square distribution underlies three major inferential procedures: the goodness-of-fit test (comparing observed vs. expected categorical counts), the test of independence (assessing association in contingency tables), and variance inference (confidence intervals and hypothesis tests for σ²). It is also the foundation of the F-distribution (a ratio of two chi-squares) and connects to Student's t, the Gamma family, and the exponential distribution. Always verify assumptions—particularly the expected-count condition for categorical tests and normality for variance tests—and pair significant results with an effect-size measure to assess practical importance.

Varsity Tutors • College Statistics • Chi-Square Distribution