PSPP for Beginners

Chi-square Test of Independence

The Chi-square test can also be used for more complicated classification schemes. When discussing the crosstabs command we found that frequency data (nominal scale) that might be categorized by two variables in some situations. For example, we could compare the frequencies of males and females who identify as either Democrats or Republicans. Each person is classified on two variables to form four separate groups in this example: Male Democrats, male Republicans, female Democrats, and female Republicans.

This contingency table shows how two levels of sex (male and female) and two levels of political party (Democrats and Republicans) create four possible groups.

In this context the Chi-square test is sometimes called a test of independence. The data need to be coded to show each person's membership in two variables, as described for the crosstabs data. The data are available in this cross tabs formatted data file.

For Chi-square, run the crosstabs command from Analyze, Descriptive Statistics, Crosstabs.

The cross tab dialog box with the statistics options.

The two different classification variables, Sex and PoliticalParty in this example, must be moved to the row or column fields.

The statistics button from the Crosstabs dialog box reveals many different test possibilities. The Chi-square test is represented as "Chisq". Checking this box will yield a Chi-square test on the categories.

The cross tab output showing the chi square test results.

The Pearson chi-square row shows the chi-square test of independence results. This result would be statistically significant because it has a p value < .05. The other rows represent less commonly used forms of the chi-square test.

In APA style, this result would be reported as χ2 (degrees of freedom, n = sample size) = chi square score, p = p value. For this example, it would be χ2 (1, n = 30) = 4.82, p = .028 in proper APA formatting.

Index | Next - Closing and credits

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License that allows sharing, adapting, and remixing.