How To Do Chi Square On Spss

6 min read

Running a chi-square test on SPSS is one of the most common tasks in student research, thesis work, and applied statistics, yet it is also one of the easiest to get subtly wrong. This guide walks through how to do chi square on SPSS from data entry to APA-style reporting, covering the Pearson chi-square test of independence, the goodness-of-fit version, assumption checks, effect size interpretation, and the exact fixes SPSS offers when your table is too sparse for the standard test to be trustworthy.

What the Chi-Square Test Actually Tells You

The chi-square (χ²) test answers one question: is the distribution of one categorical variable different across the levels of another categorical variable, beyond what chance would produce? It does not measure strength, direction, or cause. It only tells you whether a relationship is statistically unlikely under the null hypothesis of independence Easy to understand, harder to ignore..

Two flavors live inside SPSS:

  • Test of independence (the default in Crosstabs) — used with two variables measured on the same set of participants, for example gender × study program.
  • Goodness-of-fit — used with one variable, comparing your observed frequencies against an expected distribution, for example testing whether customers are equally spread across four store locations.

Anything numeric in your variables — age, income, Likert scores — must be binned into ordered categories before chi-square applies. Continuous data belongs in a t-test, ANOVA, or correlation instead.

Before You Click: Assumptions That Decide Whether the Test Is Valid

A chi-square result is only as good as the assumptions behind it. Check these first, because no output table will warn you:

  1. Independence of observations. Each participant contributes exactly one count to exactly one cell. Repeated measures on the same people require McNemar's test instead.
  2. Mutually exclusive categories. Every case must fit one and only one level of each variable. Double-coding invalidates the totals.
  3. Categorical (nominal or ordinal) variables. Both variables must be discrete groups, not measurements.
  4. Adequate expected frequencies. The widely used rule: no more than 20% of cells should have an expected count below 5, and no cell should have an expected count below 1. SPSS prints these expected counts for you, so this is easy to verify after the fact.
  5. A reasonable sample size. Roughly 50+ cases is a practical floor for stable results.

Step 1: Getting Your Data Into SPSS Correctly

There are two legitimate data layouts.

Option A — raw case-level data (most common). Each row is one participant. Create two

variables in Variable View: one for each categorical variable, defined under Values as meaningful labels (e.g., 1 = Male, 2 = Female). Enter the raw codes in Data View and let SPSS tally the counts.

Option B — pre-tabulated summary data. If you already have a contingency table, create three variables: two for the categories and one called something like Count holding the frequency for each cell. You then must tell SPSS how to weight the rows: go to Data → Weight Cases, choose Weight cases by, and move Count into the frequency box. Skip this step and every test treats each row as a single case, which silently corrupts your results. This is the single most common summary-data mistake Took long enough..

Step 2: Running the Pearson Chi-Square Test of Independence

  1. Go to Analyze → Descriptive Statistics → Crosstabs.
  2. Move one variable to Row(s) and the other to Column(s).
  3. Click Statistics, tick Chi-square, and (if you want effect size now) tick Phi and Cramer's V and Contingency coefficient.
  4. Click Cells and request Observed, Expected, and either Row or Column percentages so you can describe the pattern later.
  5. Click OK.

SPSS returns a Chi-Square Tests table. With a 2×2 table SPSS also prints Continuity Correction (Yates) and, when a cell is sparse, Fisher's Exact Test — more on that below. Read the row labeled Pearson Chi-Square, then note three things in its footnotes: the value, the degrees of freedom (df), and the Asymptotic Significance (2-sided), which is your p-value. For a 2×2 table, prefer the continuity-corrected value or Fisher's exact; for anything larger, the Pearson row is your headline statistic.

This is the bit that actually matters in practice.

Step 3: Running the Goodness-of-Fit Test

  1. Go to Analyze → Nonparametric Tests → Legacy Dialogs → Chi-square.
  2. Move your single categorical variable into Test Variable List.
  3. Under Expected Values, choose All categories equal for a uniform null, or Values to type your own expected proportions.
  4. Click OK.

The output gives the observed count, expected count, and residual for each category, plus a final Test Statistics line with the χ² value, df (number of categories minus one), and the asymptotic significance The details matter here..

Step 4: Checking the Sparse-Table Problem and the Fixes SPSS Offers

Glance at the Expected Count column and its footnote. If SPSS says "X cells (Y%) have expected count less than 5," apply the rule from the assumptions section: more than 20% of cells under 5, or any cell under 1, means the standard Pearson test is untrustworthy. SPSS doesn't fix this automatically, but it hands you three options:

  • Fisher's Exact Test. Already computed for 2×2 tables — just read the Fisher's Exact Test row instead of Pearson. For larger tables, use Exact in the Crosstabs dialog (or the Exact Tests add-on module) to get an exact or Monte Carlo p-value.
  • Combine categories. Collapse sparsely populated levels into a broader, substantively meaningful group. Do this before analysis in the data, not after peeking at p-values, and report it.
  • Collect more data. The cleanest fix when feasible, since it raises every expected count.

A fourth practical route is switching to an exact or likelihood-based alternative, but Fisher's exact and category collapsing solve most real cases That's the part that actually makes a difference..

Step 5: Reporting Effect Size

Significance is not importance. Report an effect size alongside the test:

  • Phi (φ) for 2×2 tables — ranges 0 to 1.
  • Cramér's V for larger tables — ranges 0 to 1, adjusted for table size.

Benchmarks for df = 1: around 0.Now, 10 = small, 0. 30 = medium, 0.But 50 = large. For larger tables the thresholds shrink as degrees of freedom rise, so treat these as loose guides rather than hard cutoffs.

Step 6: Writing It Up in APA Style

Report the test statistic, degrees of freedom, sample size, p-value, and effect size in one clean sentence. italicize statistical symbols and use the exact p-value unless it falls below .001:

  • Independence: A chi-square test of independence showed a significant association between gender and study program, χ²(2, N = 240) = 12.84, p = .002, Cramér's V = .23.
  • Non-significant: χ²(1, N = 180) = 1.47, p = .225, φ = .09.
  • Goodness-of-fit:
Still Here?

Recently Shared

Worth Exploring Next

A Few Steps Further

Thank you for reading about How To Do Chi Square On Spss. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home