To run a chi-square test in SPSS, you open Analyze > Descriptive Statistics > Crosstabs, put one categorical variable in the rows and the other in the columns, request Chi-square under Statistics, and read the Pearson Chi-Square row against an alpha of .05. The test that holds up, though, depends on checking the expected count assumption, reading the right row for a small table, and reporting a Cramer's V effect size. This guide covers the test of independence end to end.
What the chi-square test of independence does
The chi-square test of independence asks whether two categorical variables are associated, by comparing the observed counts in a contingency table against the expected counts you would see if the variables were unrelated. It is the natural choice when both variables are nominal, such as testing whether treatment group is associated with recovery status. It does not measure the strength or direction of a relationship between ranked or continuous measures; for those you would reach for a correlation in SPSS instead. Matching the test to the variable types is the logic in choosing a statistical test.
The expected-count assumption that decides validity
The chi-square test rests on an assumption about expected frequencies, not about normality. The standard rule is that no more than twenty percent of cells should have an expected count below five, and no cell should fall below one. This matters because the test statistic approximates a chi-square distribution only when counts are reasonably large. To check it, tick Expected under Cells in the Crosstabs dialog, then read the footnote beneath the Chi-Square Tests table, which states how many cells breached the rule. When a small table fails this check, you switch to an exact test rather than trusting the asymptotic p-value.
Running the test and the syntax to keep
Open Analyze > Descriptive Statistics > Crosstabs, move one variable into Row(s) and the other into Column(s). Under Statistics, tick Chi-square and Phi and Cramer's V. Under Cells, tick Observed, Expected, column percentages, and Adjusted standardized residuals. The reproducible syntax is:
CROSSTABS
/TABLES=treatment BY outcome
/STATISTICS=CHISQ PHI
/CELLS=COUNT EXPECTED COLUMN ASRESID
/COUNT ROUND CELL.For a small two-by-two table, add /METHOD=EXACT or click Exact in the dialog to obtain Fisher's Exact Test.
Reading the chi-square output correctly
SPSS returns the crosstabulation first; read the column percentages here to describe the pattern. The Chi-Square Tests table is the inferential core. For a table larger than two by two, read the Pearson Chi-Square row for the statistic, its degrees of freedom, and the asymptotic significance. For a two-by-two table where counts are small, read Fisher's Exact Test instead, and note that SPSS also prints a continuity correction (Yates) row designed for that case. Always check the footnote for the expected-count warning before you trust any of these. Reading SPSS tables in general is covered in interpreting SPSS output.
The effect size: phi and Cramer's V
A significant chi-square says the two variables are associated, but not how strongly. For a two-by-two table, phi gives the strength of association; for any larger table, Cramer's V is the correct measure because it adjusts for the number of rows and columns. Both run from 0 to 1, and you read them from the Symmetric Measures table that appears when you request them. Quoting an effect size beside the test is expected in a serious analysis, since a large sample can make a trivial association statistically significant.
Locating the association with residuals
A significant result on a table bigger than two by two does not tell you which cells drive the association. The adjusted standardized residuals you requested do that work: a residual beyond roughly plus or minus 2 marks a cell where the observed count departs notably from what independence would predict. This is the contingency-table equivalent of a post hoc test, and it turns a global verdict into a specific, reportable finding about where the groups differ.
Reporting a chi-square test in APA style
Report the test as chi-square with the degrees of freedom and sample size in parentheses, then the statistic, the exact p-value, and the effect size. A clean sentence reads: a chi-square test of independence showed a significant association between treatment group and recovery, chi-square(1, N = 180) = 8.94, p = .003, phi = .22. When you relied on Fisher's exact test because of small cells, say so explicitly. For a one-variable goodness-of-fit test against expected proportions, use Analyze > Nonparametric Tests > Legacy Dialogs > Chi-square instead. The exact format is covered in APA rules for reporting a test result, and the broader question of when categorical tests apply is in parametric versus nonparametric tests.