Guides  /  chi square test spss

How to run a chi-square test in SPSS

Crosstabs will produce a chi-square in about thirty seconds, but three of the settings you need are switched off by default — including the one that tells you whether the test is valid at all. This covers the click path, the output, and the interpretation.

Written and reviewed by Hafiz Ahmad Tariq, Senior Biostatistician
Updated 2 September 20267 min read
How do you run a chi-square test in SPSS?

Go to Analyze > Descriptive Statistics > Crosstabs, put one categorical variable in Rows and the other in Columns. Click Statistics and tick Chi-square and Phi and Cramer's V. Click Cells and tick Observed, Expected and Adjusted standardized residuals. Click OK. Read the Pearson Chi-Square row of the output, and check the footnote confirming no expected counts fall below 5.

Step by step

The click path

The click path AnalyzeDescriptive StatisticsCrosstabs Two dialogs you must open Statistics → tick Chi-square and Phi and Cramer's V Cells → tick Observed, Expected, and Adjusted standardized residuals Without the Cells settings you cannot check the assumption or find which cells drove the result. Chi-square is off by default. So is Cramer's V. Both need ticking every time.
Analyze → Descriptive Statistics → Crosstabs, then open both the Statistics and Cells dialogs.
Analyze → Descriptive Statistics → Crosstabs

Both variables must be categorical. If one is continuous you want a different test entirely.

Put one variable in Row(s) and the other in Column(s)

It makes no difference to the chi-square which goes where. It does affect how the percentages read, so put the grouping variable in Rows if you want row percentages.

Statistics → tick Chi-square and Phi and Cramer's V

Chi-square is not on by default. Neither is the effect size. Tick both.

Cells → tick Observed, Expected, and Adjusted standardized residuals

Expected counts let you verify the assumption. Adjusted residuals tell you which cells drove a significant result. Both are off by default.

Continue → OK

SPSS produces the crosstabulation, the Chi-Square Tests table and the symmetric measures.

If your data are already counts

Crosstabs expects one row per case. If your dataset holds a summary table instead — a column of frequencies — use Data → Weight Cases and weight by the frequency variable first, or SPSS will treat each row as a single observation.

Output

Reading the output

Chi-Square Tests — the two things to read  ValuedfAsymp. Sig. (2-sided) Pearson Chi-SquareLikelihood Ratio 8.942.011 9.022.011 a. 0 cells (0.0%) have expected count less than 5. The minimum expected count is 17.66. Read the Pearson row — and read footnote (a) before you trust it. If any cell falls below 5, the test is not valid as reported.
The Chi-Square Tests table. Read the Pearson row, then read the footnote beneath it.

SPSS prints several rows. For a standard test of independence you want the Pearson Chi-Square row and nothing else. Likelihood Ratio is an alternative statistic that almost always agrees; Linear-by-Linear Association tests a trend and only makes sense if both variables are ordered.

Row in the outputUse it when
Pearson Chi-SquareThe standard test — this is the one to report
Continuity CorrectionOnly appears for 2×2 tables. Conservative; see below
Fisher's Exact Test2×2 tables with small expected counts
Likelihood RatioAn alternative; rarely reported in preference
Linear-by-Linear AssociationBoth variables ordered and you want a trend test
The 2×2 continuity correction question

For 2×2 tables SPSS reports Yates' continuity correction by default, which shrinks the statistic and raises the p-value. It is contested and often too conservative. The common position is to use Fisher's exact test when expected counts are small and the uncorrected Pearson value when they are comfortably above 5 — but whichever row you quote, say which one it was.

Assumptions

The expected-count check

Beneath the Chi-Square Tests table SPSS prints a footnote like: 0 cells (0.0%) have expected count less than 5. The minimum expected count is 17.66. Read it every time.

The rule is that all expected counts should be 5 or more — or, more leniently, at least 80% of cells at 5 or above with none below 1. Note that this applies to expected counts, not observed ones. A cell can contain zero observations and still be fine.

Footnote saysDo this
0 cells below 5Proceed and report the minimum expected count
Some cells below 5, table is 2×2Report Fisher's exact test instead
Some cells below 5, larger tableMerge sparse categories on substantive grounds, or use an exact test
Independence is the assumption nobody checks

Chi-square requires each participant to contribute exactly one observation to exactly one cell. If you asked 60 people three questions each and cross-tabulated all 180 responses, the test treats them as 180 independent people. The statistic is then inflated and no correction fixes it — you need one response per person, or a model that handles the repeated measurements.

Not sure chi-square is the right test for your data?

Send your variables and how they were measured. A named statistician confirms the test, runs it, checks the assumptions and returns annotated SPSS output.

Get a fixed quote

Effect size

Getting an effect size

Chi-square scales with sample size. Multiply every count in your table by ten and the statistic multiplies by ten too, while the underlying pattern is unchanged. With a large enough sample, trivial associations become significant — which is why the effect size is not optional.

Ticking Phi and Cramer's V in the Statistics dialog produces a Symmetric Measures table.

MeasureUse forInterpretation
Phi2×2 tables onlySame scale as a correlation
Cramer's VAny size table.10 small, .30 medium, .50 large

Read Cramer's V for anything larger than 2×2. Phi can exceed 1 on bigger tables, which is why SPSS reports both and why V is the safer default.

Follow-up

Which cells caused the result

A significant chi-square on a table bigger than 2×2 tells you an association exists somewhere. It does not say where, and stopping there leaves the analysis unfinished.

That is what the adjusted standardized residuals are for. They appear inside each cell of the crosstabulation if you ticked the box, and they read like z-scores:

Beyond ±1.96 — that cell differs significantly from expectation at p < .05
Beyond ±2.58 — p < .01
Positive — more observations than independence would predict
Negative — fewer than expected
Correct for the number of cells

You are inspecting several cells at once, so apply a Bonferroni correction: divide .05 by the number of cells. For a 2×3 table that gives .0083, corresponding to a residual beyond roughly ±2.64 rather than ±1.96.

The other chi-square

Goodness of fit instead

If you have one categorical variable rather than two — testing whether observed frequencies match an expected distribution — Crosstabs is the wrong dialog.

Analyze → Nonparametric Tests → Legacy Dialogs → Chi-square

This is the goodness-of-fit test, not the test of independence.

Move your variable into Test Variable List

One variable only.

Choose the expected values

All categories equal tests against a uniform split. Values lets you enter expected proportions in category order — use this if national figures or a theoretical distribution apply.

Say where your expected distribution came from

If you tested against anything other than an equal split, state the source of those proportions in your write-up. An examiner will ask.

Pitfalls

Five mistakes

1. Running it on percentages

Chi-square needs raw counts. Percentages make the result depend on an arbitrary base of 100 rather than your actual sample.

2. Ignoring the expected-count footnote

It is the only thing telling you whether the test is valid. Read it, and report the minimum expected count.

3. Forgetting to tick Cramer's V

Significance without an effect size says nothing about whether the association matters.

4. Using it on paired data

Before-and-after measurements on the same people are not independent. Use McNemar's test, available in the Crosstabs Statistics dialog.

5. Stopping at the overall p-value

For tables larger than 2×2, examine the adjusted residuals so you can say which groups differ and in which direction.

Reporting

How to report it

SituationHow to write it
Significantχ²(2, N = 167) = 8.94, p = .011, Cramer's V = .23
Not significantχ²(2, N = 167) = 4.96, p = .084, Cramer's V = .17
Fisher's exactFisher's exact test, p = .043
Very small pp < .001 — SPSS prints .000, which you must never copy across
Put N inside the parentheses with df — this convention is specific to chi-square
Report the minimum expected count so the reader can judge validity
Give Cramer's V for every test
Include the crosstabulation with counts and percentages
State the direction of any significant association in words
Never write p = .000

SPSS rounds to three decimals and prints .000 when the p-value is smaller than that. A p-value is never exactly zero. Write p < .001.

Have your categorical analysis checked before submission

Send your dataset and draft results. A named statistician verifies expected counts, confirms the test suits your design, and returns APA tables you can use directly.

See SPSS data analysis

Answers

Frequently asked questions

How do I do a chi-square test in SPSS?

Analyze > Descriptive Statistics > Crosstabs. Put one categorical variable in Rows and the other in Columns, click Statistics and tick Chi-square plus Phi and Cramer's V, then click Cells and tick Observed, Expected and Adjusted standardized residuals. Click OK and read the Pearson Chi-Square row.

Which row of the SPSS chi-square output should I read?

Pearson Chi-Square for a standard test of independence. Continuity Correction only appears for 2x2 tables and is conservative. Use Fisher's Exact Test when expected counts are small. Likelihood Ratio is an alternative that almost always agrees and is rarely reported instead.

What does the footnote about expected counts mean?

It tells you whether the test is valid. All expected counts should be 5 or more, or at least 80% of cells at 5 or above with none below 1. If cells fall below 5 in a 2x2 table, report Fisher's exact test instead; in a larger table, merge sparse categories or use an exact test.

Why does SPSS show p = .000 for my chi-square?

Because it rounds to three decimal places and your p-value is smaller than .001. A p-value is never exactly zero. Report it as p < .001, never as p = .000.

How do I get an effect size for chi-square in SPSS?

Tick 'Phi and Cramer's V' in the Statistics dialog. Read Cramer's V for any table larger than 2x2, where roughly .10 is small, .30 medium and .50 large. Phi is only appropriate for 2x2 tables since it can exceed 1 on larger ones.

How do I know which cells caused a significant chi-square?

Tick 'Adjusted standardized residuals' in the Cells dialog. They appear in each cell of the crosstabulation and read like z-scores: beyond plus or minus 1.96 is significant at .05. Apply a Bonferroni correction for the number of cells you are inspecting.

Can I run a chi-square test on paired data in SPSS?

No. Chi-square requires independent observations, so it cannot be used when the same participants are measured twice. Use McNemar's test, which is available as a checkbox in the same Crosstabs Statistics dialog.