To run a chi square test of independence in SPSS, go to Analyze > Descriptive Statistics > Crosstabs, move your first categorical variable into Row(s) and your second into Column(s), then tick Chi-square in the Statistics dialog. Read the answer on the Pearson Chi-Square row of the output. The whole procedure takes about two minutes once your variables are set up correctly.
That menu path is the entire answer, and it is the same in every recent release of IBM SPSS Statistics. What trips people up is everything around it: whether their variables count as categorical, why their expected counts are tiny, and what they are actually supposed to write in their write-up. This guide covers the clicks, the output, and the reporting.
Table of Contents
- 1What You Need
- 2Step-by-Step: How to Run a Chi Square Test of Independence in SPSS
- 3Step 1: Check and Prepare the Data
- 4Step 2: Open the Chi-Square Dialog Box
- 5Step 3: Assign the Row and Column Variables
- 6Step 4: Select Statistics and Run the Test
- 7Step 5: Read the Output Tables
- 8Step 6: Check Expected Frequencies
- 9How to Interpret the Results
- 10How to Report the Result in APA
- 11Common Mistakes
- 12Frequently Asked Questions
- 13What type of variables can I use in a chi square test of independence in SPSS?
- 14Why are my expected frequencies low in the SPSS chi-square output?
- 15Should I use Pearson chi-square or Fisher’s exact test?
- 16What does a significant chi-square result mean?
- 17How do I report a chi-square result in APA?
- 18Can I run this test when one variable is ordinal and the other is nominal?
- 19Conclusion
What You Need
A chi square test of independence answers one question: are two categorical variables associated with each other? Everything else in the setup follows from that. You need exactly two variables, both categorical, with one case per row.
Nominal variables have no natural order: screen choice, gender, programme of study, whether someone clicked an ad. Ordinal variables have a meaningful order but uneven spacing: agreement on a five-point scale, age bands, income brackets. Both work. SPSS treats them the same way, which is why the test is also called a test of association.
What does not work is a continuous variable such as age in years or exam score, unless you first group it into bands and accept that you are testing the bands, not the original values.
Your categories have to be stored as numbers with value labels, so SPSS knows which label belongs to which code. Open Variable View and confirm that both variables have a Measure setting of Nominal or Ordinal, and that the Values column maps each number to its label. Text that was typed straight into cells often lands as a string variable, and a string variable will not appear in the Row(s) or Column(s) list until you recode it with Transform > Automatic Recode.
Finally, check the bottom tab of the data editor, the Missing Values view. A code like 99 left in the data without being declared missing will be treated as a real category and quietly distort every count in your table.
Step-by-Step: How to Run a Chi Square Test of Independence in SPSS
Step 1: Check and Prepare the Data
Open the data file and run Analyze > Descriptive Statistics > Frequencies on each of your two variables separately, one at a time. You are looking for three things: that the value labels are readable, that no category is empty, and that the Valid and Missing counts add up to the number of cases you expect.
If a case is blank on one variable but present on the other, SPSS drops it from the crosstab. That is the single most common reason a reader finds a smaller N in the output than the N quoted in their methods section.
Step 2: Open the Chi-Square Dialog Box
Go to Analyze > Descriptive Statistics > Crosstabs. The Crosstabs dialog opens with an empty Row(s) and Column(s) box on the left, and a source list of your variables to the right of the panel.
If you do not see the dialog, your window is likely too narrow, and the lower buttons are cut off. Widen the SPSS window before you start.
Step 3: Assign the Row and Column Variables
Select the first categorical variable in the source list, click the arrow, and it lands in Row(s). Do the same with the second variable into Column(s). You can swap them with the small curved-arrow button between the boxes, and nothing about the test changes mathematically.
The distinction matters for reading, not for the result. SPSS computes Row %, Column %, and Total based on whichever variable you put where, and the asymmetric measures in the Statistics dialog follow the same convention. If your research question is framed as a proportion of one group by category of the other, put the grouping variable in Row(s) so that Row % reads the way you intend.
If SPSS offers a third variable, leave the Layer box empty. Stacking a layer variable runs a separate test within each layer, which is a different analysis from the one you probably want.
Step 4: Select Statistics and Run the Test
Click Statistics. In the Chi-Square section, tick Chi-square. For a standard test of independence on a nominal pair, that single box is all you need.
Two more boxes are worth knowing. Yates’ Correction for Continuity applies a continuity correction and is only appropriate for a 2 by 2 table, and only then usually with Fisher’s exact test instead. Linear-by-Linear Association is for two ordinal variables measured on the same scale, and adds a trend test to the output that the chi square itself does not provide.
To report an effect size, also tick Phi or Cramer’s V under Nominal measures. Phi is really only interpretable on a 2 by 2 table; Cramer’s V is the general case and is the one APA style asks for by default.
Then click Cells. Tick Observed and Expected, and add Row % or Column % if you plan to describe the pattern in words. Expected counts are the ones you will be auditing in Step 6, so request them now rather than re-running later.
Click OK, then OK again. The Output Viewer opens behind the editor.
Step 5: Read the Output Tables
The procedure produces three tables, and only one of them carries your answer. Knowing which is which saves a lot of scrolling.
The Case Processing Summary reports how many cases went in, how many were valid, and how many were excluded as missing. Check the Valid count here before you report anything.
The Crosstab table is your contingency table, showing each cell’s observed count, expected count, and percentages. The Chi-Square Tests table holds the statistics, with the Pearson Chi-Square row at the top carrying the value, the degrees of freedom, and the Asymp. Sig. (2-sided) value that is your p value.
Note that the Pearson Chi-Square table often lists four rows: Pearson Chi-Square, Likelihood Ratio, Linear-by-Linear Association, and the number of cases. Report the Pearson row for a test of independence. The others answer different questions and quoting them under the chi square label is one of the most common errors in student write-ups.
Step 6: Check Expected Frequencies
The chi square approximation depends on the expected counts being large enough for the sampling distribution of the statistic to behave. The usual rule is that no more than 20 percent of cells should have an expected count below 5, and no cell should be below 1. For a 2 by 2 table, many texts ask that all four expected counts reach 5.
Read them straight off the crosstab, bottom row. If the rule is breached, the p value SPSS prints can be too small, making a weak result look significant. The fix is one of three things: combine categories that are conceptually close, use Fisher’s exact test, or report the result with a clear caveat about the approximation.
How to Interpret the Results
Three numbers do the work, all on the Pearson Chi-Square row.
The chi square value is the size of the gap between what you observed and what independence would predict. Zero means the table looks exactly like chance, large values mean the two variables track each other. It has no minimum and no units, which is also why it cannot be compared across studies on its own.
The df is derived from the table shape, as (rows minus 1) multiplied by (columns minus 1). A 3 by 2 table gives df = 2. Report it every time, because a chi square without its df is an incomplete result.
The p value appears as Asymp. Sig. (2-sided), rounded to three decimals. Compare it with your chosen alpha, usually 0.05. Below 0.05 means you reject the null hypothesis of independence and the variables are associated. At or above 0.05 means the data do not give you enough evidence to reject independence, which is not proof that the variables are unrelated, only that this sample did not reveal a relationship.
Add Cramer’s V to describe the strength of that association. Conventionally, 0.10 is a small effect, 0.30 medium, and 0.50 large, though those benchmarks apply most cleanly to a central Pearson phi value. Report the value itself rather than the label.
One more thing worth knowing: the test says nothing about direction. It cannot tell you which group screens more often, only that the pattern is uneven. Use Row % and Column % to describe the direction in words.
How to Report the Result in APA
APA style for a chi square test of independence gives four required elements, in this order: the test name and the value of the statistic, the degrees of freedom in brackets, the p value, and the effect size.
Start from this template and fill in the blanks:
A chi square test of independence showed that [Variable A] and [Variable B] were significantly associated, χ2(df = [df], N = [N], p = [.000 or the exact value]) = [value], Cramer’s V = [value].
A filled example using a hypothetical class of 184 students crossed by programme and dominant screen choice:
A chi square test of independence showed that programme of study and dominant screen choice were significantly associated, χ2(3, N = 184, p < .001) = 16.42, Cramer’s V = .21.
Two habits keep this clean. Report p as p < .001 rather than p = .000, because SPSS can never return a true zero. And if your result is not significant, say so with the same four elements rather than dropping the test from the paper.
Add a sentence describing the pattern if it matters, using the percentages from the crosstab: a similar percentage of design and engineering students selected a large screen, while a higher percentage of business students selected a tablet.
Common Mistakes
Opening the wrong dialog. Many searchers run a chi square from Analyze > Nonparametric Tests, which is the goodness of fit procedure for one categorical variable against an expected distribution. A test of independence needs two variables, so it lives in Crosstabs. If you are comparing one variable against an expected set of proportions, you have the other test.
Treating an ordinal variable as nominal. It is legal, and SPSS will happily run it, but you throw away information. When both variables are ordinal and use compatible scales, also tick Linear-by-Linear Association and report that trend test alongside the chi square.
Ignoring the expected counts. Small cells are not a formatting problem, they are an assumption breach that can distort the p value. Check them every run.
Reading significance as strength. A significant chi square on a large sample can describe a relationship too small to matter in practice. That is what the effect size is for.
Stating independence rather than failing to reject it. A p value above 0.05 does not prove the variables are independent. Write it as no significant association was found.
Forgetting the valid case count. If the Case Processing Summary shows excluded cases, report the N that was actually analysed, and say why the others were excluded.
One practical tip: run the same analysis from syntax so you can reproduce it later. Paste this into a new syntax window, adjust the variable names, and run it.
CROSSTABS
/VAR=programme screentype
/STATISTICS=CHISQ PHI VMIN
/CELLS=COUNT EXPECTED ROW COLUMN
/MISSING=LISTWISE.
The CROSSTABS command mirrors the dialogs one to one. VAR takes the row and column variables, STATISTICS takes the boxes you ticked in the Statistics dialog, and CELLS takes the counts and percentages you asked for in the Cells dialog. Run the syntax and the dialog side by side once and the mapping never has to be looked up again.
If your data is already a summary frequency table rather than one row per respondent, you need a different setup. Enter the categories as rows with their counts, then use Data > Weight Cases and select Weight cases by the count variable before running Crosstabs. Without that step SPSS treats each summary row as a single case and every count comes out wrong.
Frequently Asked Questions
What type of variables can I use in a chi square test of independence in SPSS?
Both variables must be categorical. Nominal variables such as gender or screen choice work, and so do ordinal variables such as agreement ratings or age bands. Continuous variables such as age in years or a test score do not, unless you first group them into bands. In SPSS, open Variable View and set Measure to Nominal or Ordinal, with value labels mapping each number to its category, before moving the variable into Row(s) or Column(s).
Why are my expected frequencies low in the SPSS chi-square output?
Low expected counts usually mean your sample is small for the size of the table, or one of your categories holds very few cases. The rule of thumb is that no more than 20 percent of cells should have an expected count under 5, and none below 1. When it is breached, the chi square approximation is unreliable and the p value can read as smaller than it is. Combine conceptually similar categories, run Fisher’s exact test, or report the result with a caveat.
Should I use Pearson chi-square or Fisher’s exact test?
Use Pearson chi-square when your expected counts are large enough, which in practice means most tables with samples in the low hundreds. Use Fisher’s exact test for a 2 by 2 table with small expected counts, typically under 5, because it calculates exact probabilities rather than relying on an approximation. For any larger table with thin cells, combining categories to reduce the number of cells is usually the better fix than falling back on an exact test.
What does a significant chi-square result mean?
It means the observed counts differ from what you would expect if the two variables were independent, by more than your chosen alpha level, usually 0.05. In practice it means the two categorical variables are statistically associated in your sample. It does not tell you which group differs, only that the pattern is uneven, so pair it with your Row % and Column % figures and an effect size such as Cramer’s V to describe strength and direction.
How do I report a chi-square result in APA?
Report four elements in order: the test name and value, the degrees of freedom in parentheses, the p value, and the effect size. A full example reads: a chi square test of independence showed that programme and screen choice were significantly associated, chi-square(3, N = 184, p less than .001) = 16.42, Cramer’s V = .21. Write p as less than .001 rather than .000, and include the same four elements when the result is not significant.
Can I run this test when one variable is ordinal and the other is nominal?
Yes, SPSS does not care about the combination. The chi square test works with any two categorical variables, mixed types included. The result is a general test of association with no direction attached, so report it alongside the percentages from the crosstab. If both variables happen to be ordinal and measured on compatible scales, also tick Linear-by-Linear Association in the Statistics dialog to get a trend test that uses the ordering.
Conclusion
Three things first. Check that both variables are categorical, labelled and coded as numbers, with stray missing values declared as missing rather than left as a category. Then run the procedure: Analyze > Descriptive Statistics > Crosstabs, one variable in Row(s), one in Column(s), Chi-square ticked in Statistics, and Observed and Expected ticked in Cells. Finally, look at the expected counts before you read anything into the p value.
Once that passes, your result lives on one row of one table: the Pearson Chi-Square line, with its df, its Asymp. Sig. (2-sided) value, and a Cramer’s V if you asked for one. Compare the p value with 0.05, report all four elements, and describe the direction with the row and column percentages.


