Introduction to Chi-Square Goodness-of-Fit
Introduces the chi-square goodness-of-fit test for assessing whether observed categorical counts are consistent with a hypothesized probability distribution. Covers the test statistic, degrees of freedom, and the critical-value decision rule for both uniform and non-uniform null distributions.
Tutorial
The Chi-Square Goodness-of-Fit Statistic
We often want to test whether observed counts in categories are consistent with a hypothesized probability distribution. The chi-square goodness-of-fit test compares observed counts to expected counts predicted under the hypothesized distribution.
If the hypothesized distribution assigns probability to category and the sample has total size then the expected count for category is
The chi-square goodness-of-fit statistic is
Each term measures the squared deviation of an observed count from its expected count, scaled by that expected count. A large value of indicates poor agreement between the data and the hypothesized distribution.
To illustrate, suppose we toss a coin times and observe heads and tails. Under the hypothesis that the coin is fair, the expected counts are
The test statistic is