Chi-Square Goodness-of-Fit Test definition
A chi-square goodness-of-fit test compares observed counts in categories with counts expected under a specified distribution.
Chi-Square Goodness-of-Fit Test in a picture
How it works
Multiply the sample size by each hypothesized category probability to find its expected count. Add (observed − expected)²/expected across the categories. With k categories and fully specified probabilities, the usual reference uses k − 1 degrees of freedom, assuming independent observations and sufficiently large expected counts.
Worked examples
Under an equal-share null across 5 categories, find each expected count for 50 observations.
50/5 = 10.
If one category has observed count 24 and expected count 20, find its contribution.
(24 − 20)²/20 = 16/20 = 0.8.
Find the degrees of freedom for 6 categories with fully specified probabilities.
6 − 1 = 5.
Common mistake
Use the null probabilities to calculate expected counts. Fitting parameters from the data can change the reference degrees of freedom.
Quick check
What is tested with a goodness-of-fit test?
Show answer
Whether one categorical distribution matches specified probabilities.
Which tail is used for the usual chi-square goodness-of-fit p-value?
Show answer
The right tail, where discrepancies are larger.
Sources
Flashcard
Chi-Square Goodness-of-Fit Test
Reveal the definition
A chi-square goodness-of-fit test compares observed counts in categories with counts expected under a specified distribution.
Effortless Math. “Chi-Square Goodness-of-Fit Test.” Math Dictionary.



