Categorical Data Analysis in SPSS: Crosstabs, Chi-Square, Effect Size and APA Reporting
Categorical data analysis in SPSS converts category labels into frequency tables, cross-tabulations, percentages, expected counts, chi-square tests, residual diagnostics and measures of association. The worked analysis below examines whether school is associated with four final-grade categories in a verified sample of 649 students.
2 × 4 Crosstabs table
Pearson χ²(3) = 59.534
p < .001
Cramer's V = 0.303
Categorical Data Analysis in SPSS Model Overview
Purpose of the Analysis
The analysis compares a two-category school variable with an ordered four-category G3 grade-band variable. SPSS Crosstabs produces the observed table, percentages, expected counts, Pearson chi-square, likelihood-ratio chi-square, residuals and association measures in one workflow.
The research question is whether GP and MS have the same final-grade distribution or whether the category profile differs by school.
Worked Statistical Conclusion
Pearson's chi-square test is 59.534045 with 3 degrees of freedom and p = 7.392e-13. The null hypothesis of independence is rejected.
Cramer's V is 0.302873, showing a meaningful association. The largest departures occur in the Low-grade category.
Variables
Row variable: school, coded GP and MS.
Column variable: G3 grade band, coded Low, Medium, High and Very high.
Primary SPSS Procedure
Analyze → Descriptive Statistics → Crosstabs. The Statistics dialog requests Chi-square and nominal association measures; the Cells dialog requests observed, expected, row, column and residual values.
Interpretive Priority
The result is not explained by p alone. The useful interpretation combines χ² = 59.53, Cramer's V = 0.303, adequate expected counts and the adjusted residual pattern.
Null and Alternative Hypotheses
Quick Answer: SPSS Crosstabs Result
Decision
- Reject the null hypothesis of independence.
- School and G3 grade band are associated.
- No expected count is below 5.
- The Low-grade cells dominate the chi-square result.
Plain-Language Meaning
- GP Low: 32 observed versus 65.18 expected.
- MS Low: 68 observed versus 34.82 expected.
- GP Low adjusted residual: -7.57.
- MS Low adjusted residual: 7.57.
Table of Contents
What Is Categorical Data Analysis in SPSS?
Definition
Categorical data analysis in SPSS examines variables whose values represent categories rather than unrestricted numerical measurements. Common examples include school, treatment group, pass status, response category, disease class and occupation.
SPSS summarizes these variables with frequencies and Crosstabs, then evaluates association with chi-square tests, exact procedures, residuals and effect-size measures.
Why SPSS Is Useful
The graphical menu system makes category coding, frequency inspection, cross-tabulation and output review accessible. Syntax can reproduce the same analysis exactly and is preferable when results must be repeated or audited.
The output viewer keeps the case-processing summary, contingency table, chi-square tests and association measures together.
Descriptive and Inferential Components
Counts, percentages, valid percentages and cumulative percentages for one categorical variable.
Observed counts and conditional percentages for two categorical variables.
Pearson and likelihood-ratio evidence against independence.
Cell-level direction and magnitude of observed-minus-expected differences.
Phi, Cramer's V and contingency coefficient for magnitude.
Binary, multinomial or ordinal models when adjusted prediction is required.
What the Procedure Does Not Establish
A significant Crosstabs result shows association, not causation. It does not identify a mechanism, control all confounding variables or prove that school produced the observed grade distribution.
Types of Categorical Variables in SPSS
Binary
Two categories, such as Pass and Fail. Binary outcomes support proportions, odds ratios and logistic regression.
Nominal
Unordered categories, such as school or region. Numeric codes are labels rather than quantities.
Ordinal
Ordered categories, such as Low, Medium, High and Very high. Order matters even when distances are not equal.
Derived Category
A quantitative variable can be grouped into bands. Cutpoints must be justified because categorization discards information.
Measurement Level in Variable View
SPSS Variable View allows Nominal, Ordinal and Scale measurement labels. These labels guide menus and presentation, but they do not automatically prevent an inappropriate analysis. The analyst must still select a method consistent with the data and research question.
Worked Variable Types
school is nominal with GP and MS categories. grade_band_g3 is ordinal with four categories. Pearson chi-square treats the four grade bands categorically and does not use their order, while Linear-by-Linear Association uses ordered scoring.
See Variables in Statistics for additional distinctions among nominal, ordinal and quantitative variables.
Research Question, Hypotheses and Table Design
Research Question
Does the distribution of G3 grade bands differ between GP and MS?
Null Hypothesis
The four grade-band proportions are the same at both schools.
Alternative Hypothesis
At least one grade-band proportion differs between the schools.
Table Dimensions
The table has two school rows and four grade-band columns. Every student contributes to exactly one of the eight cells.
Sampling Units and Independence
The chi-square test assumes independent records. Repeated measurements, matched observations or clustered samples require a method that accounts for dependence rather than ordinary Crosstabs inference.
Direction of Percentages
Row percentages answer “What grade distribution occurs within each school?” Column percentages answer “What share of each grade category comes from each school?” The research question determines which percentages receive primary emphasis.
Preparing Categorical Variables in SPSS
Inspect Original Values
Use Frequencies to check category labels, unexpected values and missing-data codes. String differences such as extra spaces can create unintended categories.
Create the Grade-Band Variable
Recode G3 into Low below 10, Medium from 10 through 13, High from 14 through 16 and Very high at 17 or above.
Transform Menu Path
Recommended Coding
| Numeric code | Label | G3 rule | Role |
|---|---|---|---|
| 1 | Low | Lowest through 9 | Lowest ordered category |
| 2 | Medium | 10 through 13 | Second ordered category |
| 3 | High | 14 through 16 | Third ordered category |
| 4 | Very high | 17 through Highest | Highest ordered category |
Missing Values
Rows missing school or G3 grade band should be excluded from this Crosstabs analysis, and the valid-case count should be reported. The worked table contains 649 valid records.
Why Recode Into a New Variable
Keeping the original G3 variable protects the quantitative information and allows the category definition to be audited. Recode into Different Variables is safer than overwriting the source field.
Variables and Data Dictionary
| Variable | Role | Measurement | Coding | Valid N | Interpretation |
|---|---|---|---|---|---|
| school | Grouping variable | Nominal | GP, MS | 649 | Defines Crosstabs rows. |
| G3 | Source outcome | Scale | Final grade | 649 | Original quantitative measure. |
| grade_band_g3 | Categorical outcome | Ordinal | 1 Low, 2 Medium, 3 High, 4 Very high | 649 | Defines Crosstabs columns. |
GP
423 students (65.18%).
MS
226 students (34.82%).
Low Grade
100 students (15.41%).
Non-Low Grades
549 students (84.59%).
Observed SPSS Crosstabs Table
| School | Low (<10) | Medium (10-13) | High (14-16) | Very high (17+) | Total |
|---|---|---|---|---|---|
| GP | 32 | 245 | 112 | 34 | 423 |
| MS | 68 | 110 | 36 | 12 | 226 |
| Total | 100 | 355 | 148 | 46 | 649 |
Initial Count Pattern
GP has more students overall, so its Medium, High and Very high counts are larger. MS nevertheless has more Low-grade students, 68 versus 32.
Why Counts Need Percentages
Different school totals make raw counts insufficient for comparing distributions. Within-school percentages place GP and MS on the same 100% scale.
See Cross-Tabulation and Frequency Distribution for additional table-reading guidance.
Row and Column Percentages in SPSS
Within-School Row Percentages
| School | Low | Medium | High | Very high | Total |
|---|---|---|---|---|---|
| GP | 7.57% | 57.92% | 26.48% | 8.04% | 100.00% |
| MS | 30.09% | 48.67% | 15.93% | 5.31% | 100.00% |
Within-Grade Column Percentages
| School | Low | Medium | High | Very high |
|---|---|---|---|---|
| GP | 32.00% | 69.01% | 75.68% | 73.91% |
| MS | 68.00% | 30.99% | 24.32% | 26.09% |
Most Important Percentage Contrast
Low grades represent 7.57% of GP students and 30.09% of MS students, a difference of 22.52 percentage points. This is the clearest descriptive feature of the table.
Expected Counts and Chi-Square Assumptions
| School | Low expected | Medium expected | High expected | Very high expected |
|---|---|---|---|---|
| GP | 65.177196 | 231.379045 | 96.462250 | 29.981510 |
| MS | 34.822804 | 123.620955 | 51.537750 | 16.018490 |
Minimum Expected Count
16.018490, occurring in MS × Very high.
Expected Cells Below Five
0 of 8 cells.
Approximation Decision
The Pearson chi-square approximation is appropriate.
Expected-Count Formula
For GP × Low, the expected value is 423 × 100 / 649 = 65.177. Only 32 cases are observed, producing a large negative residual.
Independence Assumption
Adequate expected counts do not compensate for dependent records. Each student should appear once, and the sampling design should support independence.
SPSS Chi-Square Tests Table
| Test | Value | df | Asymptotic significance | Interpretation |
|---|---|---|---|---|
| Pearson Chi-Square | 59.534045213 | 3 | 7.392451635e-13 | Reject independence. |
| Likelihood Ratio | 57.075209233 | 3 | 2.476613204e-12 | Confirms the association. |
| Linear-by-Linear Association | 35.263263887 | 1 | 2.880138434e-09 | Significant ordered trend. |
| N of Valid Cases | 649 | — | — | Complete records used. |
Pearson Test
χ²(3) = 59.534, p < .001. This is the primary independence test.
Likelihood Ratio
G²(3) = 57.075, p < .001. The conclusion agrees with Pearson.
Linear Trend
χ²(1) = 35.263, p < .001. Higher ordered grade bands are relatively more common at GP.
Pearson Chi-Square Formula
Correct Significance Reporting
SPSS may show .000 in the significance column because the value is smaller than three-decimal display precision. Statistical reports should use p < .001 rather than p = .000.
SPSS Residuals and Cell Contributions
| Cell | Observed | Expected | Pearson residual | Adjusted residual | Contribution | Share of χ² |
|---|---|---|---|---|---|---|
| GP × Low | 32 | 65.177 | -4.110 | -7.572 | 16.888 | 28.37% |
| GP × Medium | 245 | 231.379 | 0.895 | 2.255 | 0.802 | 1.35% |
| GP × High | 112 | 96.462 | 1.582 | 3.051 | 2.503 | 4.20% |
| GP × Very high | 34 | 29.982 | 0.734 | 1.290 | 0.539 | 0.90% |
| MS × Low | 68 | 34.823 | 5.622 | 7.572 | 31.609 | 53.09% |
| MS × Medium | 110 | 123.621 | -1.225 | -2.255 | 1.501 | 2.52% |
| MS × High | 36 | 51.538 | -2.164 | -3.051 | 4.684 | 7.87% |
| MS × Very high | 12 | 16.018 | -1.004 | -1.290 | 1.008 | 1.69% |
Dominant Low-Grade Cells
GP × Low has an adjusted residual of -7.57; MS × Low has 7.57. Together they contribute 81.46% of total chi-square.
Secondary High-Grade Cells
GP × High is above expectation and MS × High is below expectation. Their adjusted residual magnitudes are 3.05.
Residual Interpretation
A positive residual means the observed count exceeds the independence expectation. A negative residual means the observed count is lower than expected. Adjusted residual magnitudes near or above 1.96 indicate cells that deserve attention, subject to multiple-comparison caution.
Phi, Cramer's V and Contingency Coefficient
| Measure | Value | Approximate significance | Interpretation |
|---|---|---|---|
| Phi | 0.302872853 | 7.392451635e-13 | Same numerical value as V in this 2 × 4 table. |
| Cramer's V | 0.302872853 | 7.392451635e-13 | Preferred general association measure. |
| Contingency Coefficient | 0.289869376 | 7.392451635e-13 | Alternative bounded measure. |
| N of Valid Cases | 649 | — | Complete cases used. |
Phi
Phi = 0.303. Phi is most naturally interpreted for 2 × 2 tables, although SPSS prints it here.
Cramer's V
V = 0.303. This is the preferred overall magnitude measure for the 2 × 4 table.
Contingency Coefficient
C = 0.290. Its maximum depends on table dimensions, limiting direct comparison.
Effect Size Versus Statistical Significance
The p-value evaluates evidence against independence. Cramer's V describes magnitude. A large sample can make a small association significant, so both quantities belong in the interpretation.
See Cramer's V, Phi Coefficient, Contingency Coefficient and Effect Size.
SPSS Syntax for the Complete Analysis
Create the G3 grade-band variable
RECODE G3
(LOWEST THRU 9 = 1)
(10 THRU 13 = 2)
(14 THRU 16 = 3)
(17 THRU HIGHEST = 4)
INTO grade_band_g3.
VARIABLE LABELS
grade_band_g3
"G3 final-grade category".
VALUE LABELS grade_band_g3
1 "Low (<10)"
2 "Medium (10-13)"
3 "High (14-16)"
4 "Very high (17+)".
VARIABLE LEVEL grade_band_g3 (ORDINAL).
EXECUTE.Inspect frequencies before Crosstabs
FREQUENCIES VARIABLES=
school grade_band_g3
/ORDER=ANALYSIS.Run Crosstabs with complete diagnostics
CROSSTABS
/TABLES=school BY grade_band_g3
/FORMAT=AVALUE TABLES
/STATISTICS=CHISQ PHI CC
/CELLS=
COUNT EXPECTED
ROW COLUMN TOTAL
RESID SRESID ASRESID
/COUNT ROUND CELL.Save output to PDF
OUTPUT EXPORT
/CONTENTS EXPORT=ALL
/PDF DOCUMENTFILE=
"categorical_data_analysis_spss_output.pdf".Save the prepared SPSS dataset
SAVE OUTFILE=
"categorical_data_analysis_prepared.sav"
/COMPRESSED.Add a clustered bar chart through syntax
GRAPH
/BAR(GROUPED)=COUNT BY
grade_band_g3 BY school
/TITLE=
"Grade category counts by school".How to Read the SPSS Output
Case Processing Summary
Valid Cases
The analysis uses 649 complete records. The valid-case count should match the observed table total.
Missing Cases
Missing school or grade-band values would be excluded listwise from this table. The number and percentage should be reported when nonzero.
Crosstabulation Table
Count and Expected Count
Compare observed counts with the independence expectation. Large differences identify the main structure.
Row Percentage
Use row percentages to compare the grade distribution within GP and MS.
Chi-Square Tests
Pearson Chi-Square
This is the primary test of independence when expected-count assumptions are adequate.
Likelihood Ratio
The likelihood-ratio statistic provides a model-based alternative and supports the same conclusion.
Symmetric Measures
Cramer's V
Use Cramer's V as the main overall association magnitude for the 2 × 4 table.
Contingency Coefficient
The coefficient confirms nonzero association but has a table-dependent upper limit.
Assumptions, Diagnostics and Limitations
Independent Cases
Every student contributes to one cell only.
Mutually Exclusive Categories
School and grade-band categories cannot overlap within a variable.
Adequate Expected Counts
The minimum expected count is 16.02; none are below 5.
Independent observations
Ordinary Crosstabs inference assumes independent records. Repeated, matched or clustered observations require another method.
Expected-count guideline
The worked table satisfies the conventional guideline because all eight expected counts exceed 5.
Category definition
The G3 cutpoints determine the result. They should be justified before testing and not changed merely to improve significance.
Missing data
Listwise exclusion can bias the table when missingness is related to school or grade. Report the case-processing summary.
Ordinal information
Pearson chi-square ignores the order of grade bands. The Linear-by-Linear Association test uses an ordered score but assumes a specific monotonic structure.
Multiple residuals
Adjusted residuals identify important cells, but interpreting many cells as separate tests raises multiplicity concerns.
Effect-size context
Cramer's V should be interpreted with educational context rather than universal labels alone.
Causal limitations
The observed association does not establish that school causes the grade distribution.
Original quantitative outcome
Categorizing G3 discards within-band grade differences. A complementary analysis of the original score can preserve more information.
Sample representativeness
The validity of population generalization depends on the sampling design, not only the SPSS output.
Advanced Categorical Data Analysis in SPSS Topics
Analysis of Categorical Data in SPSS
A complete analysis combines Frequencies, Crosstabs, chi-square tests, expected counts, residuals, association measures and an interpretation tied to conditional percentages.
Cluster Analysis for Categorical Data in SPSS
Cluster analysis groups cases rather than testing association in a contingency table. Arbitrary numeric codes should not be treated as continuous distances. A suitable categorical similarity measure or two-step clustering approach is needed.
Factor Analysis for Categorical Data in SPSS
Conventional factor analysis assumes quantitative correlations and is not automatically appropriate for nominal categories. Ordinal items may require polychoric correlations or specialized categorical factor methods.
Binary Logistic Regression
When the response has two categories and adjustment is required, binary logistic regression estimates adjusted odds ratios and predicted probabilities.
Multinomial Logistic Regression
A nominal outcome with more than two categories can be modelled directly with multiple predictors rather than summarized only through a two-way table.
Ordinal Logistic Regression
Ordered outcomes such as Low, Medium, High and Very high can be analysed with an ordinal model that uses category order and tests proportional-odds assumptions.
Exact Tests
Sparse tables can require exact or Monte Carlo inference. The Exact Tests module, when available, expands options beyond asymptotic chi-square calculations.
Complex Samples
Survey weights, clusters and strata require Complex Samples procedures rather than ordinary Crosstabs significance tests.
Three-Way Crosstabs
A layer variable can produce separate two-way tables within categories of a third variable. Conditional associations should be compared carefully.
Mantel-Haenszel Analysis
For stratified 2 × 2 tables, the Cochran-Mantel-Haenszel procedure estimates and tests a common association under appropriate homogeneity conditions.
Mosaic and Bar Displays
Plots help communicate conditional percentages and departures from independence, but they should be interpreted with the statistical tables.
Category Collapsing
Combining categories changes the research question. The rule should be substantive and defined before examining p-values.
APA Reporting for Categorical Data Analysis in SPSS
Full Worked APA Result
A Pearson chi-square test of independence showed a significant association between school and G3 grade category, χ²(3, N = 649) = 59.53, p < .001, Cramer's V = 0.303. All expected cell counts exceeded 5; the minimum expected count was 16.02. Low grades were overrepresented at MS (68 observed, 34.82 expected, adjusted residual = 7.57) and underrepresented at GP (32 observed, 65.18 expected, adjusted residual = -7.57).
Concise APA Result
School was associated with G3 grade category, χ²(3, N = 649) = 59.53, p < .001, Cramer's V = 0.303. The largest difference occurred in the Low-grade category.
APA-Style Methods Sentence
School and G3 grade band were analysed in a 2 × 4 Crosstabs table using Pearson chi-square, likelihood-ratio chi-square, adjusted residuals and Cramer's V.
APA Results Table
| Measure | Complete value | APA presentation |
|---|---|---|
| Valid N | 649 | N = 649 |
| Pearson chi-square | 59.534045213 | χ² = 59.53 |
| Degrees of freedom | 3 | df = 3 |
| Pearson significance | 7.392451635e-13 | p < .001 |
| Likelihood ratio | 57.075209233 | G² = 57.08 |
| Linear-by-linear association | 35.263263887 | χ²(1) = 35.26 |
| Phi | 0.302872853 | φ = 0.303 |
| Cramer's V | 0.302872853 | V = 0.303 |
| Contingency coefficient | 0.289869376 | C = 0.290 |
Reusable APA Templates
Significant Association
A Pearson chi-square test evaluated the association between variable 1 and variable 2, N = N.
The association was significant, χ²(df) = statistic, p = p-value, Cramer's V = effect size.
The largest departures occurred in cells, adjusted residuals = values.
Add expected-count adequacy and conditional percentages.
No Detected Association
A chi-square test examined variable 1 and variable 2.
The association was not significant, χ²(df, N = N) = statistic, p = p-value.
The analysis did not provide sufficient evidence of association; independence was not proved.
Report effect size even when the result is nonsignificant.
Linear-by-Linear Trend
The ordered categories were scored as scores.
The linear-by-linear association was significant/nonsignificant, χ²(1) = statistic, p = p-value.
The ordered category distribution showed a direction trend across groups.
Use this only when the ordered scores have substantive meaning.
APA Language Rules
| Avoid | Use instead | Reason |
|---|---|---|
| p = .000 | p < .001 | The probability is not exactly zero. |
| The variables were correlated. | The categorical variables were associated. | Association is the appropriate table-based term. |
| School caused lower grades. | Low grades were overrepresented at MS. | The design does not establish causation. |
| The chi-square effect was large. | Report Cramer's V and contextual meaning. | The chi-square value depends on sample size. |
Common Mistakes and Statistical Reporting Checklist
Common Mistakes
| Mistake | Correction |
|---|---|
| Treating category codes as scale values | Assign correct value labels and measurement levels. |
| Reporting only the significance value | Add counts, percentages, expected counts, residuals and Cramer's V. |
| Writing p = .000 | Report p < .001. |
| Ignoring expected counts | Review the footnote and minimum expected count. |
| Using raw counts as group percentages | Choose row or column percentages based on the question. |
| Interpreting all residuals as separate tests | Use the global test first and acknowledge multiplicity. |
| Collapsing categories after seeing the result | Define grouping rules before testing. |
| Claiming causation | Use association and overrepresentation language. |
Statistical Reporting Checklist
- Define both categorical variables and category order.
- State the valid sample size and missing-data rule.
- Show the complete observed table.
- Report row or column percentages.
- Report Pearson χ², df and p.
- Check expected-count adequacy.
- Report Cramer's V.
- Interpret important adjusted residuals.
- Distinguish association from causation.
- Preserve the SPSS syntax and output file.
SPSS Output Download
Frequently Asked Questions About Categorical Data Analysis in SPSS
What is categorical data analysis in SPSS?
It is the use of SPSS to summarize, test and interpret variables represented by categories.
Which SPSS procedure is used here?
Analyze > Descriptive Statistics > Crosstabs.
What is the worked table?
A 2 × 4 school-by-G3-grade-band contingency table.
What is the Pearson chi-square statistic?
It is 59.534045.
What are the degrees of freedom?
There are 3 degrees of freedom.
What is the p-value?
The exact calculated value is 7.392451635e-13; report p < .001.
What is the likelihood-ratio statistic?
G² = 57.075209.
What is the linear-by-linear statistic?
It is 35.263264 with 1 degree of freedom.
What is Cramer's V?
Cramer's V is 0.302873.
What is Phi?
Phi is 0.302873.
What is the contingency coefficient?
It is 0.289869.
Were expected-count assumptions satisfied?
Yes. The minimum expected count is 16.02, and no cell is below 5.
Which cells drive the result?
The GP × Low and MS × Low cells provide most of the chi-square statistic.
What is the GP Low percentage?
It is 7.57% within GP.
What is the MS Low percentage?
It is 30.09% within MS.
What does a positive adjusted residual mean?
The cell count is higher than expected under independence.
What does a negative adjusted residual mean?
The cell count is lower than expected under independence.
Why should I not report p = .000?
SPSS rounds very small values to .000; the probability is not exactly zero.
When should I use exact tests?
Use exact or Monte Carlo methods when expected counts are sparse or asymptotic assumptions are doubtful.
Can SPSS analyse ordinal categories?
Yes. Linear-by-Linear Association and ordinal regression use ordered information.
Can cluster analysis use categorical data in SPSS?
Yes, but an appropriate categorical method or similarity measure is required; ordinary Crosstabs answers a different question.
Can factor analysis use categorical data in SPSS?
Conventional factor analysis is not automatically suitable for nominal categories; ordinal items may require specialized correlation methods.
When is binary logistic regression preferable?
Use it when the outcome is binary and adjusted predictor effects are required.
When is multinomial logistic regression preferable?
Use it when the outcome has more than two unordered categories.
When is ordinal logistic regression preferable?
Use it when the ordered category outcome should be modelled directly.
What should APA reporting include?
Variables, N, chi-square, df, p-value, Cramer's V, assumption check and important residuals.
Does a significant chi-square test prove causation?
No. It identifies association only.
How do I save SPSS output?
Use File > Export in the Output Viewer or OUTPUT EXPORT syntax.
What is the main conclusion?
The G3 grade-band distribution differs significantly between GP and MS.
Categorical Data Analysis in SPSS Conclusion
Statistical Conclusion
Pearson's chi-square test produced χ²(3) = 59.534045, p = 7.392e-13. The null hypothesis of independence was rejected.
Substantive Conclusion
Low grades were much more common at MS (30.09%) than at GP (7.57%). Cramer's V = 0.303 indicates a meaningful association.
A complete categorical data analysis in SPSS moves from category preparation and frequencies to Crosstabs, percentages, expected counts, chi-square tests, residual diagnostics, effect size and an accurate APA interpretation. The global test establishes association, while the cell results explain where the distribution differs.
