SPSS Tutorial

How to Run a Chi-Square Test of Independence in SPSS (Step-by-Step)

2026-05-259 min read
chi-square test SPSSchi-square test of independenceSPSS tutorialcategorical data analysiscrosstabulation SPSS

The chi-square test of independence is one of the most commonly used statistical tests in research. It tells you whether there is a statistically significant association between two categorical variables. If you have survey data with questions like gender, education level, preference categories, or yes/no responses, this is the test you need.

When to Use the Chi-Square Test

Use the chi-square test of independence when:

  • Both variables are categorical (nominal or ordinal)
  • You want to test whether there is an association between them
  • Your observations are independent (each participant contributes one data point)

Example research questions:

  • Is there an association between gender and preferred learning style?
  • Does smoking status differ by education level?
  • Is there a relationship between customer satisfaction (satisfied/dissatisfied) and purchase channel (online/in-store)?

Assumptions

Before running the test, verify these assumptions:

  1. Both variables are categorical — not continuous
  2. Expected frequencies — at least 80% of cells should have an expected count of 5 or more. No cell should have an expected count less than 1
  3. Independent observations — each case appears in only one cell of the crosstabulation

If your expected counts are too low, consider combining categories or using Fisher's Exact Test instead.

Step-by-Step in SPSS

Step 1: Set Up Your Data

Your data should have one row per participant and one column per variable. For example:

Participant Gender Learning_Style
1 Male Visual
2 Female Auditory
3 Male Kinesthetic

Step 2: Run the Crosstabulation

  1. Go to Analyze → Descriptive Statistics → Crosstabs
  2. Move one variable to Row(s) and the other to Column(s)
  3. Click Statistics and check:
    • Chi-square
    • Phi and Cramer's V (for effect size)
  4. Click Continue
  5. Click Cells and check:
    • Observed counts
    • Expected counts
    • Row percentages
  6. Click Continue, then OK

Step 3: Check Expected Counts

In the output, look at the crosstabulation table. Below each observed count, you will see the expected count. Verify that no more than 20% of cells have expected counts below 5.

If the assumption is violated, SPSS will note this in a footnote below the chi-square table.

Interpreting the Output

The Chi-Square Tests Table

Look at the row labeled Pearson Chi-Square:

  • Value: The chi-square statistic (χ²)
  • df: Degrees of freedom = (rows – 1) × (columns – 1)
  • Asymptotic Significance (2-sided): The p-value

If p < .05, there is a statistically significant association between the two variables.

Effect Size

The chi-square test tells you whether an association exists, but not how strong it is. For that, use:

  • Phi (φ): For 2×2 tables. Values range from 0 to 1
  • Cramér's V: For larger tables. Interpretation depends on degrees of freedom:
    • df = 1: Small = .10, Medium = .30, Large = .50
    • df = 2: Small = .07, Medium = .21, Large = .35
    • df = 3: Small = .06, Medium = .17, Large = .29

The Crosstabulation Table

Examine the row percentages to understand the pattern of association. Which categories are over- or under-represented compared to what you would expect by chance?

APA Reporting

Here is how to report a chi-square test result in APA format:

A chi-square test of independence was performed to examine the relationship between gender and preferred learning style. The relation between these variables was significant, χ²(2, N = 150) = 8.45, p = .015, Cramér's V = .24, indicating a small-to-medium association.

The format is: χ²(df, N = sample size) = chi-square value, p = p-value, effect size measure = value.

Common Mistakes to Avoid

  1. Using chi-square with continuous variables — The test is only for categorical data. If you have continuous variables, categorize them first or use a different test
  2. Ignoring expected count violations — If expected counts are too low, the test is unreliable. Use Fisher's Exact Test instead
  3. Confusing association with causation — Chi-square tells you variables are related, not that one causes the other
  4. Forgetting effect size — Always report an effect size measure alongside the chi-square statistic
  5. Running multiple chi-square tests without correction — If testing many associations, apply a Bonferroni correction to control for Type I error

When Chi-Square Is Not Appropriate

  • Small samples with low expected counts: Use Fisher's Exact Test
  • Ordinal variables where order matters: Consider the Mantel-Haenszel test for linear association
  • Paired or matched data: Use McNemar's test instead
  • More than two categorical variables: Consider loglinear analysis

What Comes Next?

If you find a significant association, you might want to:

  • Examine standardized residuals to see which cells contribute most to the chi-square
  • Run logistic regression if you want to predict group membership while controlling for other variables
  • Conduct follow-up pairwise comparisons if you have more than two groups in either variable

Need help running a chi-square test or any other statistical analysis? Our team handles the analysis so you can focus on your research. Get a free quote.

Get More Guides Like This

Free tutorials on SPSS, Excel, Python, and research methods delivered to your inbox.

Need Professional Data Analysis Services?

Save time and get accurate results. Our experts provide statistical analysis services using SPSS, Excel, and Python — from hypothesis testing to APA-formatted reports.