Chi-Square Goodness of Fit Test

This test determines whether observed frequencies match expected frequencies based on a theoretical distribution (e.g., equal proportions, Mendelian ratios).

When to Use

  • Testing if data follows a specific distribution
  • Comparing observed to theoretically expected proportions
  • One categorical variable with multiple levels

Examples

  • Testing Mendelian inheritance ratios (3:1, 9:3:3:1)
  • Checking if die is fair (equal 1/6 for each face)
  • Testing equal preferences across categories

Null Hypothesis

H₀: Observed frequencies match expected frequencies

Assumptions and fitted parameters

Observations must be independent counts in mutually exclusive categories. Expected counts must be positive and sum to the observed total. Small counts can make the chi-square approximation unreliable.

With probabilities specified in advance, degrees of freedom are categories − 1. For regular models fitted by efficient maximum likelihood to these observations, subtract the number of fitted parameters. The calculator supports this adjustment, but other estimation methods and category selection can require a different null distribution. See the SciPy explanation of assumptions and degrees of freedom.

Think Again app poster showing 10 interactive philosophy experiments, 50 insight cards, and 133,000 plus responses.

New on iPhone

Try Think Again

10 interactive philosophy experiments and 50 insight cards built from 133,000 plus responses.

Download on the App Store
Think Again app banner showing 133,000 plus minds tested and categories including trolley problems, free will, God, personal identity, logic, and moral taboos.