Chi-Square Goodness-of-Fit Test


Chi-Square Goodness-of-Fit (also referred to a Pearson’s Chi-Square Test) is a statistical method for determining how an actual or observed distribution of  categorical variables relates to a theoretical distribution of those same variables. The Chi-Square Test is a non-parametric test meaning that its graph is not expected to approximate a normal distribution curve.  An example of the shape of the graphs is to the right. Negative values for a Chi-Square test are impossible  so Chi-Square test for goodness-of-fit is never a double-tailed test. This Chi-Square test is appropriate for two or more categorical variables with conditions requiring that the observed distribution or population has been randomly collected and that fewer than 1/5 of the categories being compared have fewer than 5 observations and that at least one observation is expected in every category. The degrees of freedom for a chi-square goodness-of-fit test are the number of categories minus 1. For example, if testing a standard die with six sides, there are six possible categories (1-6) so the degrees of freedom associated with this particular test would be 6-1 = 5.

Chi-Squared (X^2) is equal to the sum of the categories Observed minus Expected, squared, and then divided by the expected.


X^2 = (Observed – Expected)^2 / Expected.

This is performed for each category and then the Chi-Squared’s (X^2) are summed together and their significance is found by consulting a chi-square chart, finding the appropriate degrees of freedom row, and then  finding where your summed Chi-Square term falls in the columns. This will provided the p-value for your Chi-Square Goodness-of-Fit Test.

The wikipedia article on the Chi-Square Goodness-of-Fit Test (they refer to it as Pearson’s Chi-Squared Test, it is the same thing) is an exhaustive analysis and explanation but is perhaps too technical for a good introduction or support for new students. This Rice University BioScience Department Website has a much simpler introduction and example that might be more appropriate for new students or those not specializing in mathematics. Another excellent analysis of the Chi-Square Goodness-of-Fit test in step-by-step lecture notes posted online from a University of California-Irvine class may be helpful as well.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s