Chi-Square Goodness of Fit

Test whether observed frequencies match expected frequencies from a theoretical distribution.

Please verify you are human to use the calculator.

About the Chi-Square Goodness of Fit

The chi-square goodness-of-fit test assesses whether the observed frequency distribution of a categorical variable matches a hypothesised distribution. Typical applications include testing whether a die is fair, whether birth frequencies are uniform across days of the week, or whether survey responses follow a predicted pattern.

The test requires that data be in the form of counts across mutually exclusive categories obtained through random sampling. For two categories each expected frequency should be at least 5; for three or more categories each expected frequency should be at least 1, with no more than 20% falling below 5. When expected counts are too small, categories can sometimes be combined to satisfy the requirement.

An important caveat is that when continuous data is grouped into bins for the test, the choice of bin boundaries can influence the result. Different binning schemes may lead to different conclusions. The test is appropriate only for categorical data; for testing whether continuous data follows a particular distribution, use the Kolmogorov-Smirnov or Shapiro-Wilk test instead.

A test result carries weight only when the hypothesis, the sample size and the decision rule were fixed before the data arrived. Every pilot we scope is built the same way, with success criteria and kill gates agreed in advance. That work is described under AI pilot design.

Related calculations

  • Chi-square independence test: Use independence testing for an association between two categorical variables.
  • Chi squared: Inspect the reference distribution and the role of degrees of freedom.
  • One-proportion z-test: For two categories, compare a one-proportion test against a specified reference probability.

Related Tools

Stay in the loop

Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.

Chi-Square Goodness of Fit FAQ

Common questions about the chi-square goodness of fit