liveBook · Manning

Goodness-of-fit test

As explained in Effective Data Analysis

A goodness-of-fit test is a chi-square test that compares observed category frequencies in one sample with expected frequencies.

A goodness-of-fit test is a chi-square test that compares observed category frequencies in one sample with expected frequencies. It asks whether the observed distribution differs from an expected distribution. section 5.2.3

Use it to identify disproportionality against fixed expectations or relative proportions. Distinguish it from tests of independence, which compare two categorical variables, and tests for trend, which examine patterns across time or groups. section 5.2.3

Interpret the comparison by considering:

  • Observed frequencies: the category counts or proportions collected from the sample. section 5.2.3
  • Expected frequencies: the counts or proportions predicted under the null hypothesis of no differences between categories. section 5.2.3
  • Sample size: larger samples detect smaller differences more readily, while smaller samples make differences harder to detect. section 5.2.3
Figure 5.12 Breakdown of the equation for the X2 (chi-square) test
figure

Use the chi-square equation breakdown to connect each category’s observed and expected frequency difference to the overall test statistic. section 5.2.3

How Effective Data Analysis covers it

How deep it goes
Explains the observed-versus-expected comparison, test variants, and sample-size sensitivity.
Examples
Uses category counts or dataset proportions as the observed and expected inputs.
What it assumes
Assumes categorical frequencies and a null expectation of no differences between categories.
What you can do after
Evaluate whether one sample’s categorical distribution differs from its expected distribution.
How it connects
Connects expected frequencies and null hypotheses with chi-square tests of independence and tests for trend.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Data Analysis. The section links point to the parts of the book it draws on.