Chi-Square goodness of fit test is a non-parametric test that is used to find out how the observed value of a given phenomena is significantly different from the expected value. In Chi-Square goodness of fit test, the term goodness of fit is used to compare the observed sample distribution with the expected probability distribution. Chi-Square goodness of fit test determines how well theoretical distribution (such as normal, binomial, or Poisson) fits the empirical distribution. In Chi-Square goodness of fit test, sample data is divided into intervals. Then the numbers of points that fall into the interval are compared, with the expected numbers of points in each interval.
Procedure for Chi-Square goodness of fit test:
- Set up the hypothesis for Chi-Square goodness of fit test:
a. Null hypothesis: In Chi-Square goodness of fit test, the null hypothesis assumes that there is no significant difference between the observed and the expected value.
b. Alternative hypothesis: In Chi-Square goodness of fit test, the alternative hypothesis assumes that there is a significant difference between the observed and the expected value.
- Compute the value of Chi-Square goodness of fit test using the following formula:

Where,
= Chi-Square goodness of fit test
O= observed value
E= expected value
- Degree of freedom: In Chi-Square goodness of fit test, the degree of freedom depends on the distribution of the sample. The following table shows the distribution and an associated degree of freedom:
| Type of distribution | No of constraints | Degree of freedom |
| Binominal distribution | 1 | n-1 |
| Poisson distribution | 2 | n-2 |
| Normal distribution | 3 | n-3 |
- Hypothesis testing: Hypothesis testing in Chi-Square goodness of fit test is the same as in other tests, like t-test, ANOVA, etc. The calculated value of Chi-Square goodness of fit test is compared with the table value. If the calculated value of Chi-Square goodness of fit test is greater than the table value, we will reject the null hypothesis and conclude that there is a significant difference between the observed and the expected frequency. If the calculated value of Chi-Square goodness of fit test is less than the table value, we will accept the null hypothesis and conclude that there is no significant difference between the observed and expected value.
Chi-Square goodness of fit test and SPSS:
Like other statistical tests, Chi-Square goodness of fit test can also be performed in SPSS. To calculate the value of Chi-Square goodness of fit test in SPSS, we have to follow the following steps:
1. Open “SPSS” from the start menu.
2. Click on the “open data” icon and select the data.
3. Click on the “analysis” menu and select “nonparametric test.”
4. Select “chi-square test” from the nonparametric option. As we click on the chi-square test, the following window will appear in front of us, called the chi-square test window:

From this window, select the variables and insert them into the variable list. Click on “option” and select “descriptive statistics” from there. Then, click the “ok” button. The results of the Chi-Square goodness of fit test will appear. From the result window, the table below will be used.
Descriptive statistics table for Chi-Square goodness of fit test: This table will show the total number in the sample, the mean of the series, the SD, the minimum and the maximum value of the sample. The following table will be the descriptive statistics in SPSS:
![]()
Frequency table for Chi-Square goodness of fit test: In the frequency table, it will show the observed value, the expected value and the residual part. The following table is in SPSS:

Test statistics table for Chi-Square goodness of fit test: In this table, the calculated value of chi-square test, DF and the associated significance are presented. By using the significance value, we will make a statistical decision as to whether or not we will accept the null hypothesis. The following table is the test the statistics table in SPSS for the Chi-Square goodness of fit test:



