# 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.

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 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 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.