Skip to main content icon/video/no-internet

Goodness-of-Fit Tests

Goodness-of-fit tests include various tests that measure how well a statistical model (which is built from theory) fits the observed data. Depending on the types of distributions and the nature of the variables being examined, different goodness-of-fit tests are used. Commonly used tests include Pearson’s chi-square (χ2) test and R2 measure of goodness of fit. This entry describes the rationale of each test and the steps taken to conduct each test.

Pearson’s χ2 Test

Pearson’s χ2 test is a goodness-of-fit test used in the context of discrete distributions (i.e., the data are categorical in nature). Introduced by Karl Pearson in 1900, Pearson’s χ2 test evaluates whether the frequency of observations in each category statistically differs from the theoretical prediction. A “good fit” model indicates we can reasonably suggest that the observed data have come from the theoretically predicted distribution. It uses the null hypothesis statistical significance testing procedure based on the χ2 distribution.

Pearson’s χ2 test follows these steps:

  • State the null hypothesis: The frequency of observed values in the sample is statistically similar to the frequency predicted theoretically.
  • Select statistical significance level.
  • Calculate the χ2 test statistic using the following formula:

    χ2=[(OiEi)2/Ei],

where Oi is the observed frequency count for the ith level of the categorical variable and Ei is the expected (theoretical) frequency count for the ith level of the categorical variable.

In the extreme case, if the observed data and the expected values are identical, χ2 would be zero. This indicates that the theoretical prediction and observed data match perfectly. As the predicted values deviate farther from the observed data, the χ2 statistic will increase until it reaches a critical point where it is deemed that the theoretical model and the observed data come from two different distributions. To find out this critical point, we move on to the next steps.

  • Determine the degrees of freedom, which is the number of categories minus 1.
  • Compare the calculated χ2 statistic to the critical value from the χ2 distribution.
  • Make a decision on the null hypothesis. If the calculated χ2 statistic is greater than the critical value of χ2, the null hypothesis is rejected. At this point, the difference between the frequency of the observed data and the predicted model is so large that they are most likely from different distributions. If the calculated χ2 statistic is smaller than the critical value of χ2, we fail to reject the null hypothesis. This means there is not sufficient evidence to suggest that the observed frequency distribution and the expected frequency distribution belong to different distributions. Therefore, it is reasonable to conclude the observed data have come from the predicted distribution.

To use Pearson’s χ2 test, three assumptions must be met. First, expected frequency numbers in each cell (cell counts) should be adequate. The rule of thumb is at least five data points in each cell. Second, the overall sample size should be large enough. Although there isn’t any agreed upon rule of thumb for sample size in χ2 tests, small samples can lead to Type II error. Lastly, all observations should be independent of each other.

...

  • Loading...
locked icon

Sign in to access this content

Get a 30 day FREE TRIAL

  • Watch videos from a variety of sources bringing classroom topics to life
  • Read modern, diverse business cases
  • Explore hundreds of books and reference titles

Sage Recommends

We found other relevant content for you on other Sage platforms.

Loading