Order ready-to-submit essays. No Plagiarism Guarantee!
Note: All our papers are written from scratch by human writers to ensure authenticity and originality.
The Chi-Square (x2) Goodness-of-Fit test: What It Is and What It Does
Check your essay before you submit. See exactly what your professor sees.
See your AI and plagiarism results before your instructor does.Get the exact same report your professor uses. Trusted by 50,000+ students worldwide.
The chi-square (x2) goodness-of-fit test is used for comparing categorical information against what we would expect based on previous knowledge. As such, it tests what are called observed frequencies (the frequency with which participants fall into a category) against expected frequencies (the frequency expected in a category if the sample data represent the population). It is a nondirectional test, meaning that the alternative hypothesis is neither one-tailed nor two-tailed. The alternative hypothesis for a x2 goodness-of-fit test is that the observed data do not fit the expected frequencies for the population, and the null hypothesis is that they do fit the expected frequencies for the population. There is no conventional way to write these hypotheses in symbols, as we have done with the previous statistical tests. To illustrate the x2 goodness-of-fit test, let’s look at a situation in which its use would be appropriate.
chi-square (x2) goodness-of-fit test A nonparametric inferential procedure that determines how well an observed frequency distribution fits an expected distribution.
observed frequencies The frequency with which participants fall into a category.
expected frequencies The frequency expected in a category if the sample data represent the population.
Calculations for the x2 Goodness-of-Fit Test
Suppose that a researcher is interested in determining whether the teenage pregnancy rate at a particular high school is different from the rate statewide. Assume that the rate statewide is 17%. A random sample of 80 female students is selected from the target high school. Seven of the students are either pregnant now or have been pregnant previously. The χ2goodness-of-fit test measures the observed frequencies against the expected frequencies. The observed and expected frequencies are presented in Table 21.1.
TABLE 21.1 Observed and expected frequencies for χ2 goodness-of-fit example
| FREQUENCIES | PREGNANT | NOT PREGNANT |
| Observed | 7 | 73 |
| Expected | 14 | 66 |
As can be seen in the table, the observed frequencies represent the number of high school females in the sample of 80 who were pregnant versus not pregnant. The expected frequencies represent what we would expect based on chance, given what is known about the population. In this case, we would expect 17% of the females to be pregnant because this is the rate statewide. If we take 17% of 80 (.17 × 80 = 14), we would expect 14 of the students to be pregnant. By the same token, we would expect 83% of the students (.83 × 80 = 66) to be not pregnant. If the calculated expected frequencies are correct, when summed they should equal the sample size (14 + 66 = 80).
Once the observed and expected frequencies have been determined, we can calculate χ2 using the following formula:
χ2=Σ(O−E)2Eχ2=Σ(O − E)2E
where O is the observed frequency, E is the expected frequency, and Σ indicates that we must sum the indicated fraction for each category in the study (in this case, for the pregnant and not-pregnant groups). Using this formula with the present example, we have
χ2=(7−14)214+(73−66)266=(−7)214+(7)266=4914+4966=3.5+0.74=4.24χ2=(7−14)214+(73−66)266=(−7)214+(7)266=4914+4966=3.5+0.74=4.24
Interpreting the χ2 Goodness-of-Fit Test
The null hypothesis is rejected if the χ2obtχobt2 is greater than the χ2CVχCV2. The χ2CVχCV2 is found in the x2 table in Appendix A at the back of the book (Table A.7). In order to use the table, you need to know the degrees of freedom for the x2 test. This is the number of categories minus 1. In our example, we have two categories (pregnant and not pregnant); thus, we have 1 degree of freedom. At α =.05, then,χ2CVχCV2= 3.84, according to Table A.7. Ourχ2obtχobt2of 4.24 is larger than the critical value, so we can reject the null hypothesis and conclude that the observed frequency of pregnancy is significantly lower than expected by chance. In other words, the female teens at the target high school have a significantly lower pregnancy rate than would be expected based on the statewide rate. In APA style, this would be reported as x2 (1, N = 80) = 4.24, p <.05. You can see how to use SPSS or the TI-84 calculator to conduct this statistical test in the Statistical Software Resources section at the end of this chapter.
Assumptions and Appropriate Use of the χ2 Goodness-of-Fit Test
Although the χ2 goodness-of-fit test is a nonparametric test and therefore less restrictive than a parametric test, it does have its own assumptions. First, the test is appropriate for nominal (categorical) data. If data are measured on a higher scale of measurement, they can be transformed to a nominal scale. Second, the frequencies in each cell should not be too small. If the frequency in any cell is too small (<5), then the χ2 test should not be conducted. Lastly, to be generalizable to the population, the sample should be randomly selected and the observations must be independent. In other words, each observation must be based on the score of a different subject.
Chi-Square (x2) test of Independence: What It Is and What It Does
The logic of the chi-square χ2 test of independence is the same as for any χ2 statistic—we are comparing how well an observed breakdown of people over various categories fits some expected breakdown (such as an equal breakdown). In other words, a χ2 test compares an observed frequency distribution to an expected frequency distribution. If we observe a difference, we determine whether the difference is greater than what would be expected based on chance. The difference between the χ2 test of independence and the χ2 goodness-of-fit test is that the goodness-of-fit test compares how well an observed frequency distribution of one nominal variable fits some expected pattern of frequencies, whereas the test of independence compares how well an observed frequency distribution of two nominal variables fits some expected pattern of frequencies. The formula we use is the same as for the χ2goodness-of-fit test described previously:
chi-square χ2 test of independence A non-parametric inferential test used when frequency data have been collected to determine how well an observed breakdown of people over various categories fits some expected breakdown.
χ2=Σ(O−E)2Eχ2=Σ(O−E)2E
The null hypothesis and the alternative hypothesis are similar to those used with the t tests. The null hypothesis is that there are no observed differences in frequency between the groups we are comparing; the alternative hypothesis is that there are differences in frequency between the groups and that the differences are greater than we would expect based on chance.


