By Anthony M. Wanjohi:
Chi square is a non-parametric test commonly used to test either goodness of fit or association between two categorical variables (test of independence). Categorical variables are grouped as nominal (names), ordinal (ordered) or dichotomous (binary). The purpose of this article is to illustrate chi square test for goodness of fit commonly used to analyze whether a frequency distribution for a categorical variable is consistent with expectations.
In order to apply the chi-square for goodness of fit test, the following are computed: Observed frequencies (Observed N), expected frequencies (Expected N), residual and test statistics.
Observed frequencies are the number of occurrences, expected frequencies are the frequencies expected if the null hypothesis is true (no difference) and residual is the difference between the observed and expected frequencies (Lund Research, 2013). Test statistics provide the probability value for determination of statistical significance.
For the purpose of illustration, chi square for goodness of fit test for marital status (nominal variable) is computed. The output based on SPSS aided computation are shown by Tables 1 and 2.
Table 1: Marital status
|Observed N||Expected N||Residual|
Table 2: Test Statistics
a 0 cells (.0%) have expected frequencies less than 5.
The minimum expected cell frequency is 37.3.
As illustrated by Table 2, test Statistics are statistically significant. Therefore, the null hypothesis is rejected and concluded that there is a statistical significant difference in marital status with more people being divorced/ separated as compared to single (52), married (21) and widowed (6).
Lund Research (2013). Chi-Square Goodness-of-Fit Test in SPSS. Retrieved from https://statistics.laerd.com/spss-tutorials/chi-square-goodness-of-fit-test-in-spss-statistics.php