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

Chi Square test is SPSS
Figure 1: Chi Square test in SPSS
Chi Square Test in SPSS
Figure 2: 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.

Chi Square Results (Gender)
Table 1: Chi Square Results (Gender)
Chi square results (test stats)
Table 2: Chi square results (test stats)

 Example 2

Chi Square using Cross Tabulation Analysis
Figure 3: Chi square using cross-tabulation analysis

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
Highest educational attainment [degree] and perception of life’s excitement [life]
Table 3: Highest educational attainment [degree] and perception of life’s excitement [life]

From the row %, you see that the % of people who find life exciting is not exactly the same in the 5-degree groups, although it is fairly similar for the 1st 2-degree groups.  Slightly less than half of those with less than a high school education or with a high school education find life exciting.  However, you see that there is a substantial difference between those with some exposure to college and those with a post-graduate degree.  Of those respondents, almost 2/3 find that life is exciting.

Interpretations

We use the chi-square test within cross-tabulation. This determines if your observed results are unlikely that the 2 variables are independent in the population.  2 variables are independent if knowing the value of one variable tells nothing about the value of the other variable. The level of education one attains and one’s perception of life are independent if the probability of any level of educational attainment/perception of life combination is the product of the probability of that level of educational attainment times the probability of that perception of life. Since the null hypothesis is false we observe different perceptions about the level of life excitement across people with different degrees. For example in Table 2, we observe 74.4% of excited people with bachelor’s degrees (See Table 3 Encircled in Red).

From the table below, we are only concerned with the Pearson Chi-Square value i.e. 34.750. In addition, we can see that the observed significance level for the Pearson chi-square is 0.000. Therefore so you can reject the null hypothesis that level of educational attainment and perception of life are independent.

Reflecting Observed Significance level
Table 4: Reflecting observed significance level
NOTES

Discuss