# Chi square test with the help of SPSS

By Priya Chetty on February 4, 2015
Photo by PhotoMIX Ltd from Pexels

A Chi square (X2) statistic is used to investigate whether distributions of categorical variables differ from one another. Categorical variables like; the gender of the sample population could be either male or female.

## When to apply chi square test?

If the researcher thinks that 2 variables are related, the null hypothesis would be that they are not related.  Another way of stating the null hypothesis is that the 2 variables are independent.

For example, if we want to test if the Gender of a person is related to his/her income

### Chi square test in SPSS

When we click on the “OPTION” dialogue box shown on the right-hand side appears, where the researcher has the option to choose “Descriptive” under “Statistics” which would reflect the mean and standard deviation. The researcher can both insert specific values for the expected range as were as the expected values. However, no range or value is specified then it is taken from the data itself, which is an equal percentage division for all the categories.

## Example 1

A simple Chi square test conducted on determining the number of males [H2] and females in the sample population reflected the following results (See Table 1 given below). The software assumes that the no. of people will be equal in both categories (i.e. there will be an equal number of males and females in this group).

“Observed N” represents the actual result, i.e. number of males and females in the group

“Expected N” displays the assumed result (i.e. equal number of males and females in the group).

The confidence interval is set at 99%. This means that there is a 99% probability that there is an unequal number of males and females in the group. Therefore “sig” value should be <0.01.

In table 1 Observed ‘N’ and Expected ‘N’ are reflected and the difference between the two is shown in Residual. The Chi Square value is presented in Table 2 along with sig which was found to be .002. This satisfies our assumption that there is an unequal number of males and females in the group. Therefore the null hypothesis is rejected.

## Example 2

As an example of testing whether 2 variables are independent, look at the table below, a cross-tabulation of highest educational attainment [degree] and perception of life’s excitement [life] based on the data.

• Null Hypothesis: There is no link between the highest degree attained and the level of excitement in life
• Alternative hypothesis: There is a link between the highest degree attained and the level of excitement in life