Calculating a Chi-Square Statistic in SPSS

Calculating a Chi-Square Statistic in SPSS
Chi-square is a versatile statistical test used to examine the significance of relationships
between two (or more) nominal-level variables. In the following example, the two
nominal-level variables are “treatment type” and “problem type.” The research question
is whether one type of treatment was used differentially more or less often, depending on
the presenting problem of the client.
Note that in order to perform a chi-square test, all data need to be coded as numbers in
SPSS, even though these numbers actually represent groups – not something measured on
a scale. The variables should be coded as “Nominal”-level in the Variable View tab. You
can enter labels to remind you what the numbers mean, in the “values” column of the
Variable View.
To calculate a chi-square, go to the “Analyze” menu. Here, you have two options:
• Select “Nonparametric Tests,” then select “Chi Square,” or …
• Select “Descriptive Statistics” then select “Crosstabs.”
The second option is a bit easier (and not every user will have the nonparametric tests in
their version of SPSS), so that is the one shown in this example.
In the “Crosstabs” dialog box, select the nominal-level variables that you want to test for
an association between. Enter one of them as “rows” and the other one as “columns” (you
can also enter more than one variable in each of these boxes if necessary).
Click on the “Statistics” button, and select “chi-square.” You can also choose other
statistics here, like a phi correlation coefficient (a measure of effect size):
Click on “OK” in the main dialog box to run the analysis. The output shows you a
standard crosstabulation table (as described in the material on how to calculate
descriptive statistics in SPSS), plus the following extra calculations:
Chi-Square Tests
Pearson Chi-Square
Likelihood Ratio
Linear-by-Linear
Association
N of Valid Cases
Value
.400(a)
.403
2
2
Asymp. Sig.
(2-sided)
.819
.818
1
.770
df
.086
16
a 6 cells (100.0%) have expected count less than 5. The minimum expected count is 2.50.
This test shows you that there is no significant difference between the patient diagnostic
groups in terms of which type of treatment they received (chi square = .40, p = .819). The
same result can also be interpreted to mean that there was no significant difference
between treatments in terms of which diagnoses patients had. In other words, the IV and
DV are not specified in advance for a chi-square. Which variable functions as an IV and
which one functions as a DV in your analysis is dependent on what your research design
was, not on the way you input the data into SPSS for analysis.
Because I selected “phi coefficient,” I also got the following printout. Phi is interpretable
as a nonparametric correlation coefficient, and means just the same thing as the Pearson r
in terms of the strength and direction of the relationship between these two variables.
Symmetric Measures
Nominal by
Nominal
N of Valid Cases
Phi
Cramer's V
Value
.158
.158
16
Approx. Sig.
.819
.819
a. Not assuming the null hypothesis.
b. Using the asymptotic standard error assuming the null
hypothesis.
In this case, phi = .158, which is a weak positive relationship between the two variables.
Notice that this correlation is flagged as nonsignificant, with the same p-value that was
given for the chi square test.