# 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; gender of sample population which could be either male or female.

## When to apply chi square test?

If the researcher thinks that 2 variables are related, the null hypothesis that would 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 Gender of a person is related to his/her income

### Chi square test in SPSS

When we click on “OPTION” dialog box shown on the right hand side appears, where the researcher has that option to choose “Descriptive” under “Statistics” which would reflect mean and standard deviation. The researcher can both insert specific values for expected range as were as expected value. However, no range or value is specified then it is taken from the data itself, which is 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 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 99% probability that there are 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 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 are 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 highest degree attained and level of excitement in life
• Alternative hypothesis: There is a link between highest degree attained and level of excitement in life