Opens in a new tab

METHOD GUIDE

Chi-Square Test in SPSS
Expected Counts, the Fisher Fallback and Goodness of Fit

SPSS prints a Pearson statistic whether or not its approximation holds, and the footnote under the table is what decides. Settle which chi-square question you are asking, and check the expected counts before any p-value is quoted.

IN SHORT

Which Chi-Square Question and Which Checks Come First

A chi-square test compares observed counts with the counts expected under a stated hypothesis, either that two categorical variables are unrelated or that one variable follows given proportions. It fits counts of independent cases, not percentages and not repeated measurements on the same participants. To run the chi-square test in SPSS for two variables, open Analyze, Descriptive Statistics, Crosstabs, tick Chi-square under Statistics and Expected under Cells, and read the footnote on expected counts before the statistic. For one variable against given proportions, a goodness-of-fit dialog is used instead. OnlineSPSS, a specialist statistical consultancy for academic, clinical and professional research, carries out and reviews this analysis through an in-house PhD-level statistician.

ANALYSIS SUPPORT

Analysis Support for This Method

Sound setup decides what the table can support. When sparse cells rule out the approximation, the exact test replaces the Pearson statistic rather than adjusting it.

Chi-Square Test

The chi-square analysis carried out within your study design, with the checks on the counts, the choice between the approximate and an exact test and the reporting agreed for your data.

Explore Chi-Square Test
Fisher's Exact Test

An exact analysis of a contingency table, for sparse tables where the large-sample approximation cannot be trusted and the counts themselves decide the choice.

Explore Fisher's Exact Test

BEFORE YOU RUN IT

Questions the Counts Must Answer First

Four checks settle whether a chi-square statistic can be reported at all, and only the check on expected counts needs SPSS to answer it.

Which Chi-Square Question Two variables in a table ask about association, and one variable against proportions you specify asks about fit. The dialogs and hypotheses differ, so the wording of the hypothesis is fixed first.

Counts, Not Percentages The test needs counts of cases. Data typed in as a table of counts need a weighting variable applied with Weight Cases, or SPSS reads each row as a single case.

Expected Counts Expected counts in SPSS are requested under Cells. By Cochran's rule of thumb, no cell should fall below 1 and no more than a fifth below 5, otherwise categories are merged on substantive grounds or an exact test is used.

Independent Observations Each case appears once, in one cell. Before and after answers from the same people, or participants clustered in classes, break independence and need McNemar's test or a clustered model.

IN SPSS

How to Run the Chi-Square Test in SPSS

The outline is for IBM SPSS and covers the independence test and the goodness-of-fit test separately, since they use different dialogs and menu labels vary by version.

  1. Confirm what the data are: one row per case, or one row per cell with a count variable used as a weight.
  2. For two variables, open Analyze, Descriptive Statistics, Crosstabs, with one variable in Rows and the other in Columns.
  3. Under Statistics, tick Chi-square, and under Cells, tick Observed and Expected counts.
  4. For a 2×2 table, Fisher’s exact test in SPSS is printed beside Pearson’s, and for larger tables it needs the Exact option where your license has it.
  5. For one variable, open Analyze, Nonparametric Tests, Legacy Dialogs, Chi-square (or Nonparametric Tests, One Sample), and enter the expected proportions.
  6. Read the footnote on expected counts before the Pearson row.

READING THE OUTPUT

Reading the Expected-Count Footnote and the Test Rows

The footnote under the Chi-Square Tests table decides whether the Pearson row can be used, and it is the line researchers most often skip, so it comes first here.

Output element What it tells you What to check
Footnote under Chi-Square Tests The number and percentage of cells with an expected count below 5, and the smallest expected count Whether the guideline is met before any p-value is quoted
Pearson Chi-Square The statistic, degrees of freedom and asymptotic significance That it is used only when the expected counts are adequate, with the weighted N as the sample size
Continuity Correction (2×2 only) A conservative adjustment of the Pearson statistic for 2×2 tables That it is not treated as a substitute for an exact test when counts are small
Fisher’s Exact Test (2×2) Exact significance, two-sided and one-sided, derived from the margins That the exact value is the one reported when expected counts are small
Likelihood Ratio A second approximate test of the same hypothesis That a clear gap from Pearson points to sparse cells
Linear-by-Linear Association A test of a linear trend when both variables are ordered That it is used only when the order of the categories has meaning
Goodness of fit: Observed N, Expected N, Residual The observed counts against the counts the hypothesized proportions imply That the proportions were fixed before the data were examined

REPORTING

What to Record From the Checks

The wording of the results sentence belongs to the write-up. The checks leave five facts that belong in the methods section or the table note.

Record which question was asked, independence or goodness of fit, and, for goodness of fit, what the hypothesized proportions were and where they came from. Record the share of cells with expected counts below 5 and the smallest expected count, and state whether Pearson’s test, an exact test or merged categories were used because of it. Record the number of cases analyzed and any excluded for missing values, and note that weights were applied when counts were entered as a summary table. The effect size and the results sentence are reported after the test, and the table of counts with percentages is set out in the direction of the explanatory variable.

Question AskedExpected-Count CheckTest Version UsedCases AnalyzedWeights Applied

COMMON MISTAKES

Setup Errors That Undermine a Chi-Square Result

Most queries about a chi-square result trace back to the setup, and these six can be found in the data file and the first two tables.

Summary Rows Read as Cases A table of counts typed in as rows is read as one case per row unless a weighting variable is applied. The statistic then reflects the number of rows, not the number of participants.

Sparse Cells Ignored A table with several empty or near-empty cells can give a statistic that does not follow the chi-square distribution. The p-value is then unreliable, however clean the output looks.

Equal Proportions by Default The goodness-of-fit dialog assumes equal expected proportions unless told otherwise. A hypothesis of unequal proportions, such as a known population distribution, must be entered explicitly.

Merging After the Fact Collapsing categories until the expected counts pass is a data-driven choice. Merges are decided on substantive grounds, stated in the text, and ideally planned before the outcome is seen.

Correction Treated as Exact Test The continuity correction does not make a sparse 2×2 table exact. With small expected counts the exact test is the proper tool, and the correction is not reported as a remedy.

Same People Counted Twice Before and after responses from the same participants, entered as two groups, break independence. The pairing calls for McNemar's test, and a clustered design for a model that allows for the clusters.

Already run this analysis? Independent Statistical Review checks the expected-count decision, the choice of test and the table before you submit.

Request an Assessment

FREQUENTLY ASKED QUESTIONS

Questions About Setting Up the Chi-Square Test

Unequal expected proportions, a table of counts without raw data and the choice between the continuity correction and the Pearson row are the questions the setup raises, along with a check of the test choice.

Use the goodness-of-fit dialog and enter the hypothesized proportions as expected values, because the default assumes equal proportions. Values are entered in the order of the category codes. The proportions must come from theory or a population source and be fixed before the sample is examined, since proportions taken from the same sample make the test meaningless.

Yes: enter one row per cell with a variable holding the count, and apply it with Weight Cases before running Crosstabs. Check that the weighted N equals the total of the table. Weighting stays in effect, and is saved with the data file, until it is turned off, so check that it is off before any analysis that should count each row once.

With adequate expected counts the uncorrected Pearson statistic is the usual choice, because the correction tends to be conservative, and whichever row is used should be named. Neither replaces an exact test when counts are small, and the choice is made before the output is seen, not after comparing the two p-values.

Yes. An in-house PhD-level statistician can review the data setup, the expected-count decision and the choice between Pearson and an exact test in your output, or carry out the analysis on your data. For the tables and the write-up, Results Reporting & Interpretation covers that stage. The interpretation and conclusions remain yours.

Your data and project details are handled confidentially, and project information is not published. Researcher names and institutions are not used publicly without permission. An NDA is available where required and can be arranged before sensitive materials are shared. Read more about confidentiality and data security.

You share your research question, design and relevant materials, such as the dataset or the output you have, and a statistically trained Research Coordinator reviews the request and responds the same day. The analysis, deliverables, timeline and one fixed project fee are then confirmed before any work begins, so the timeline follows from the agreed scope.

Still have a question? Find more answers in our full FAQ.

View All FAQs →

NEXT STEP

Does Your Table Pass
the Expected-Count Check?

Describe how the variables were coded, whether the table has sparse cells and the output you have. Which test fits, and how the checks are recorded, is agreed with you before any work begins.

No Commitment Required

Strictly Confidential

Fixed Project Fee

In-House PhD-Level Statisticians

Same-Day Response

Serving Researchers Since 2014