Understand the idea
Take a standard normal value, square it, and add up several such squared values: the total follows a chi-square distribution. Because everything being summed is squared, chi-square values are never negative and the distribution is right-skewed, especially with few terms.
It shows up whenever a test statistic is built from summed squared deviations: chi-square tests compare observed counts to expected counts, squaring and summing the discrepancies across categories, so a large total chi-square value means the observed table looks very different from what was expected under the null.
Like the t distribution, chi-square has one setting (degrees of freedom) which here roughly equals the number of independent squared terms being summed. More degrees of freedom shifts the distribution's center and spread rightward and wider, which is why the same chi-square VALUE means something different depending on how many categories or cells the table has.
The Pearson chi-square statistic, the one used for most tables of counts, follows this distribution approximately when the expected counts are large enough.
Practitioner explanation
If Z_1,...,Z_k are independent standard normals, then sum(Z_i^2) ~ chi-square_k, with mean k and variance 2k; this is the distribution of the Pearson goodness-of-fit statistic sum((O-E)^2/E) under the null, and (for an r x c contingency table) has df = (r-1)(c-1) after accounting for the marginal constraints used to estimate the expected counts.
The chi-square approximation to the true (discrete, multinomial) sampling distribution of the test statistic degrades with small expected counts, which is the basis of Cochran's rule; Yates' continuity correction and Fisher's exact test are the standard responses for small 2x2 tables specifically. Chi-square is also the reference distribution for a sample variance under normality (via (n-1)*s^2/sigma^2 ~ chi-square_{n-1}), which underlies confidence intervals for a single variance.
KernelStats' chi-square independence and goodness-of-fit cards report the statistic, df, and p together with min_expected and a flagged count of cells below 5, and Cramer's V (independence) or Cohen's w (goodness-of-fit) as the accompanying effect size, since the chi-square statistic alone grows with sample size and table size and is not itself a measure of association strength.
When to use it
Consider it when
As the reference distribution for tests of categorical association, goodness-of-fit, and inference about a single variance.
Use caution when
As an effect-size measure by itself: the chi-square statistic grows mechanically with sample size and with the number of cells, so it cannot be compared across tables of different sizes or used alone to judge how STRONG an association is.
Formulas and symbols
Pearson chi-square statistic
O_i observed counts, E_i expected counts under the null model, summed over all cells/categories.
Common misconceptions
Misconception
A larger chi-square statistic always means a stronger association.
Correction
The chi-square statistic is driven up by sample size and by the number of cells in the table, not only by the strength of association. A normalized effect size is needed to compare association strength across differently sized tables.
References
- NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.6 Chi-square distribution, NIST/SEMATECH (2012), §1.3.6.6.6.
