SPSS Cheat Sheet
Data Entry · Variable Setup · Descriptives · t-Tests · ANOVA · Regression · Chi-Square · Syntax
Sheet 6 of 6
Stats & Math
Intermediate
Printable
SPSS Interface Overview
Core| View / Window | Purpose |
|---|---|
| Data View | Spreadsheet — rows = cases, columns = variables |
| Variable View | Define variable properties (name, type, labels, measure) |
| Output Viewer | Results tables, charts, and notes from every procedure |
| Syntax Editor | Write, save, and re-run SPSS command syntax |
| Chart Editor | Double-click any chart in Output to edit it |
Tip: Always switch to Variable View first to set up variables correctly before entering data.
Variable View — Properties
Setup| Column | What to Set |
|---|---|
| Name | Short identifier, no spaces, starts with letter (e.g. age) |
| Type | Numeric / String / Date / Currency |
| Width / Decimals | Display width and decimal places |
| Label | Full descriptive name shown in output |
| Values | Code map for categoricals (1=Male, 2=Female) |
| Missing | User-defined missing values (e.g. 99) |
| Measure | Scale / Ordinal / Nominal |
Rule: Set Measure level correctly — SPSS uses it to suggest appropriate charts and analyses.
Measurement Levels
Theory| Level | SPSS Label | Example | Allowed Stats |
|---|---|---|---|
| Nominal | Nominal | Gender, Blood Type | Mode, Frequencies, Chi-Square |
| Ordinal | Ordinal | Likert Scale, Rank | Median, IQR, Spearman r |
| Interval / Ratio | Scale | Age, Income, Score | Mean, SD, t-test, ANOVA, Pearson r |
Memory Aid — NOIR
N · O · I · R
Nominal → Ordinal → Interval → Ratio (each level adds properties)
Descriptive Statistics
AnalyzeMenu: Analyze → Descriptive Statistics → …
| Procedure | Use When | Key Output |
|---|---|---|
| Frequencies | Nominal / Ordinal | Count, %, Bar chart, Pie chart |
| Descriptives | Scale (continuous) | N, Mean, SD, Min, Max, Skewness |
| Explore | Scale — normality check | Stem-leaf, Boxplot, S-W & K-S tests |
| Crosstabs | Two categoricals | Contingency table, Chi-Square, Phi/V |
Syntax — Descriptives
DESCRIPTIVES VARIABLES=age score income /STATISTICS=MEAN STDDEV MIN MAX SKEWNESS KURTOSIS.
Frequencies & Crosstabs Syntax
SyntaxFrequencies with Bar Chart
FREQUENCIES VARIABLES=gender education /BARCHART PERCENT /ORDER=ANALYSIS.
Crosstabs with Chi-Square
CROSSTABS /TABLES=gender BY smoker /STATISTICS=CHISQ PHI /CELLS=COUNT ROW COLUMN EXPECTED.
Chi-Square assumption: Expected cell count ≥ 5 in all cells. Check the footnote in output.
Normality Testing
AssumptionsExplore — Normality Tests
EXAMINE VARIABLES=score /PLOT NORMPLOT /STATISTICS DESCRIPTIVES /CINTERVAL 95 /NOTOTAL.
| Test | Best For | Interpret |
|---|---|---|
| Shapiro-Wilk (S-W) | n < 50 | p > .05 → normal |
| Kolmogorov-Smirnov (K-S) | n ≥ 50 | p > .05 → normal |
| Skewness / Kurtosis | Any n | ±1.0 acceptable; ±2.0 borderline |
| Q-Q Plot | Visual | Points near diagonal → normal |
Independent Samples t-Test
InferenceMenu: Analyze → Compare Means → Independent-Samples T Test
Test Statistic
t = (x̄₁ − x̄₂) / SEdiff
SEdiff = √(s₁²/n₁ + s₂²/n₂) | df = n₁ + n₂ − 2
Syntax
T-TEST GROUPS=gender(1 2) /MISSING=ANALYSIS /VARIABLES=score /CRITERIA=CI(.95).
Levene's Test: Check first. If p < .05 → variances unequal → read "Equal variances not assumed" row.
Paired & One-Sample t-Test
InferencePaired Samples t-Test Syntax
T-TEST PAIRS=pre WITH post (PAIRED) /CRITERIA=CI(.95) /MISSING=ANALYSIS.
One-Sample t-Test Syntax
T-TEST /TESTVAL=100 /MISSING=ANALYSIS /VARIABLES=iq_score /CRITERIA=CI(.95).
Effect Size — Cohen's d
d = (x̄ − μ₀) / s
0.2 = small · 0.5 = medium · 0.8 = large
One-Way ANOVA
InferenceMenu: Analyze → Compare Means → One-Way ANOVA
F Statistic
F = MSbetween / MSwithin
MS = SS / df | SStotal = SSbetween + SSwithin
Syntax with Post Hoc
ONEWAY score BY group /STATISTICS DESCRIPTIVES HOMOGENEITY /PLOT MEANS /MISSING ANALYSIS /POSTHOC=TUKEY BONFERRONI ALPHA(.05).
Assumption: Levene's test for homogeneity of variance. If violated, use Welch's ANOVA or Games-Howell post hoc.
Factorial (Two-Way) ANOVA
InferenceMenu: Analyze → General Linear Model → Univariate
GLM Univariate Syntax
UNIANOVA score BY gender treatment /METHOD=SSTYPE(3) /INTERCEPT=INCLUDE /PRINT=ETASQ HOMOGENEITY DESCRIPTIVE /CRITERIA=ALPHA(.05) /DESIGN=gender treatment gender*treatment.
| Source | Meaning |
|---|---|
| gender | Main effect of gender |
| treatment | Main effect of treatment |
| gender*treatment | Interaction effect |
η² (Eta squared): .01 = small · .06 = medium · .14 = large effect
Simple Linear Regression
RegressionMenu: Analyze → Regression → Linear
Regression Equation
Ŷ = b₀ + b₁X
b₀ = intercept · b₁ = slope (unstandardized) · β = standardized
Syntax
REGRESSION /MISSING LISTWISE /STATISTICS COEFF OUTS R ANOVA /DEPENDENT salary /METHOD=ENTER experience /SCATTERPLOT=(*ZRESID, *ZPRED) /RESIDUALS=DURBIN.
| Output | Meaning |
|---|---|
| R² | Proportion of variance in Y explained by X |
| Adj R² | R² adjusted for number of predictors |
| F (ANOVA) | Overall model significance |
| β (Beta) | Standardized coefficient — comparable across predictors |
| Durbin-Watson | ≈ 2 = no autocorrelation; <1 or >3 = problem |
Multiple Regression
RegressionMultiple Regression Equation
Ŷ = b₀ + b₁X₁ + b₂X₂ + … + bₖXₖ
k = number of predictors · VIF < 10 (no multicollinearity)
Enter Method — Multiple Predictors
REGRESSION /MISSING LISTWISE /STATISTICS COEFF OUTS R ANOVA COLLIN TOL /DEPENDENT salary /METHOD=ENTER age education experience.
| Method | When to Use |
|---|---|
| ENTER | Theory-driven — enter all predictors simultaneously |
| STEPWISE | Exploratory — auto selects predictors by F criterion |
| FORWARD | Adds predictors one at a time (best contribution) |
| BACKWARD | Starts full, removes least significant predictors |
Multicollinearity: Check Tolerance (> 0.1) and VIF (< 10) in Coefficients table.
Correlation Analysis
BivariatePearson r
r = Σ[(xᵢ−x̄)(yᵢ−ȳ)] / √[Σ(xᵢ−x̄)² · Σ(yᵢ−ȳ)²]
Range: −1 to +1 · |r|: .1=small · .3=medium · .5=large
Pearson & Spearman Syntax
/* Pearson (Scale data) */ CORRELATIONS /VARIABLES=age salary score /PRINT=TWOTAIL SIG FULL /MISSING=PAIRWISE. /* Spearman (Ordinal or non-normal) */ NONPAR CORR /VARIABLES=rank satisfaction /PRINT=SPEARMAN TWOTAIL SIG /MISSING=PAIRWISE.
Note: Correlation ≠ Causation. Always report r and p-value together.
Chi-Square Tests
Non-ParametricChi-Square Statistic
χ² = Σ [(O − E)² / E]
O = observed · E = expected · df = (r−1)(c−1)
Goodness-of-Fit Syntax
NPAR TESTS /CHISQUARE=category /EXPECTED=EQUAL. /* or specify proportions */
| Test | Variables | Null Hypothesis |
|---|---|---|
| Goodness-of-Fit | 1 categorical | Observed = expected distribution |
| Independence | 2 categorical | Variables are independent |
| Association Measure | Use When |
|---|---|
| Phi (φ) | 2×2 table |
| Cramér's V | Larger tables (r×c) |
| Lambda | Asymmetric nominal associations |
Non-Parametric Alternatives
Non-Parametric| Parametric Test | Non-Parametric Alternative | SPSS Procedure |
|---|---|---|
| Independent t-test | Mann-Whitney U | Nonparametric → Legacy → 2 Ind. Samples |
| Paired t-test | Wilcoxon Signed-Rank | Nonparametric → Legacy → 2 Related Samples |
| One-Way ANOVA | Kruskal-Wallis H | Nonparametric → Legacy → K Ind. Samples |
| Repeated Measures ANOVA | Friedman Test | Nonparametric → Legacy → K Related Samples |
| Pearson r | Spearman ρ | Nonparametric → Correlations → Spearman |
Mann-Whitney U Syntax
NPAR TESTS /M-W=score BY group(1 2) /MISSING ANALYSIS.
Data Transformation
TransformCompute New Variable
COMPUTE bmi = weight / (height * height). EXECUTE. /* Log transformation for skewed data */ COMPUTE log_income = LN(income). EXECUTE.
Recode Into Different Variable
RECODE age (18 THRU 35=1)(36 THRU 55=2) (56 THRU HIGHEST=3) INTO age_group. VARIABLE LABELS age_group 'Age Group'. VALUE LABELS age_group 1 'Young' 2 'Middle' 3 'Senior'. EXECUTE.
Data Management Commands
ManageSelect Cases
/* Keep only females */ SELECT IF (gender = 2). EXECUTE. /* Reset — all cases */ FILTER OFF. USE ALL. EXECUTE.
Sort & Split File
SORT CASES BY department (A) salary (D). /* Analyze by group separately */ SPLIT FILE SEPARATE BY department. SPLIT FILE OFF. /* Reset */
Aggregate — Mean per Group
AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=department /mean_salary=MEAN(salary).
Missing Data Handling
Data Quality| Strategy | When to Use | SPSS Option |
|---|---|---|
| Listwise deletion | MCAR, small % missing | MISSING=LISTWISE |
| Pairwise deletion | Correlation/regression, preserve n | MISSING=PAIRWISE |
| Mean substitution | Simple continuous replacement | Transform → Replace Missing |
| Multiple Imputation | MCAR / MAR, formal analyses | Analyze → Multiple Imputation |
Replace Missing with Mean
RMV score_imp=SMEAN(score). EXECUTE.
Caution: Mean substitution reduces variance and can distort correlations. Prefer Multiple Imputation for formal research.
Reliability — Cronbach's Alpha
ScaleMenu: Analyze → Scale → Reliability Analysis
Cronbach's Alpha Formula
α = (k / k−1) · [1 − (Σσᵢ²) / σ²ₜ]
k = items · σᵢ² = item variance · σ²ₜ = total scale variance
Reliability Syntax
RELIABILITY /VARIABLES=q1 q2 q3 q4 q5 /SCALE('ALL VARIABLES') ALL /MODEL=ALPHA /STATISTICS=DESCRIPTIVE SCALE /SUMMARY=TOTAL.
| α Value | Interpretation |
|---|---|
| ≥ .90 | Excellent |
| .80 – .89 | Good |
| .70 – .79 | Acceptable |
| .60 – .69 | Questionable |
| < .60 | Unacceptable |
Factor Analysis (EFA)
MultivariateMenu: Analyze → Dimension Reduction → Factor
Principal Components Syntax
FACTOR /VARIABLES q1 q2 q3 q4 q5 q6 /MISSING LISTWISE /ANALYSIS q1 q2 q3 q4 q5 q6 /PRINT KMO EXTRACTION ROTATION /CRITERIA MINEIGEN(1) /EXTRACTION PC /ROTATION VARIMAX /SAVE REG(ALL FAC).
| Diagnostic | Acceptable Value |
|---|---|
| KMO | ≥ 0.60 (sampling adequacy) |
| Bartlett's Test | p < .05 (correlations exist) |
| Communality | ≥ 0.40 per item |
| Factor Loading | ≥ |0.40| for inclusion |
| Eigenvalue Rule | > 1 (Kaiser criterion) |
SPSS Syntax — Essentials & Quick Reference
SyntaxFile Operations
/* Open data file */ GET FILE='/data/survey.sav'. /* Save data file */ SAVE OUTFILE='/data/clean.sav' /COMPRESSED. /* Import CSV */ GET DATA /TYPE=TXT /FILE='/data/data.csv' /DELIMITERS="," /FIRSTCASE=2. /* skip header */
Variable & Value Labels
VARIABLE LABELS gender 'Participant Gender' score 'Test Score (0–100)'. VALUE LABELS gender 1 'Male' 2 'Female' 3 'Non-binary'. MISSING VALUES score (99) gender (9). EXECUTE.
IF / DO IF Logic
/* Conditional compute */ IF (score >= 50) pass=1. IF (score < 50) pass=0. EXECUTE. DO IF (group=1). COMPUTE label=1. ELSE IF (group=2). COMPUTE label=2. ELSE. COMPUTE label=9. END IF. EXECUTE.
| Rule | Detail |
|---|---|
| Commands end with period | Every SPSS syntax command must end with a . (full stop) |
| Subcommands use / | Subcommands within a procedure start with / |
| Strings in quotes | Text values must be in single quotes: 'Male' |
| Case insensitive | Keywords can be upper or lower case — GET FILE = get file |
| Comments | /* comment */ or start line with * |
| EXECUTE | Required after transformation commands to force processing |
Reading SPSS Output
Interpret| Table / Row | What to Report |
|---|---|
| Model Summary | R, R², Adjusted R², Std. Error of estimate |
| ANOVA table | F, df₁, df₂, p-value (model significance) |
| Coefficients | b, SE, β, t, p, 95% CI — one row per predictor |
| Group Statistics | n, Mean, SD per group (t-test) |
| Levene's Test | p > .05 → equal variances assumed |
| Post Hoc Tests | Pairwise p values — which groups differ |
APA Format: t(df) = value, p = .xxx, d = value · F(df₁, df₂) = value, p = .xxx, η² = value
Selecting the Right Test
Decision| Research Question | DV Level | Use |
|---|---|---|
| Compare 2 independent groups | Scale | Independent t-test |
| Compare 2 related measurements | Scale | Paired t-test |
| Compare 3+ independent groups | Scale | One-Way ANOVA |
| 2 factors + interaction | Scale | Factorial ANOVA |
| Predict continuous outcome | Scale | Linear Regression |
| Predict binary outcome | Nominal | Logistic Regression |
| Association between 2 categoricals | Nominal | Chi-Square |
| Linear relationship strength | Scale–Scale | Pearson Correlation |
| Rank-based relationship | Ordinal | Spearman Correlation |
Common SPSS Errors & Fixes
Troubleshoot| Error / Issue | Fix |
|---|---|
| Variable name has spaces | Use underscore: test_score |
| String variable in numeric analysis | Recode to numeric or change Type in Variable View |
| User-missing values included in mean | Define missing values in Variable View |
| Chi-Square warning: expected < 5 | Merge cells, use Fisher's Exact Test (2×2), or collect more data |
| Syntax "End of command expected" | Check for missing period . at end of command |
| Output: "There are no valid cases" | All cases filtered or selected; check SELECT IF / FILTER |
Paste Syntax: In any dialog, use the Paste button instead of OK to send syntax to the editor — great for reproducibility.
SPSS Mastery Checklist
Self-AssessmentInterface & Setup
Navigate Data View and Variable View
Set Name, Type, Label, Values, Missing, and Measure for each variable
Import CSV/Excel files and save .sav files
Use the Output Viewer to interpret results
Open, write, and run commands in Syntax Editor
Data Management
Compute new variables with formulas
Recode variables (same / different variable)
Select and filter cases using SELECT IF
Sort cases and use SPLIT FILE by group
Handle missing data (listwise, pairwise, imputation)
Descriptive & Normality
Run Frequencies for categorical variables
Run Descriptives for continuous variables (mean, SD)
Use Explore to check normality (S-W, K-S, Q-Q plots)
Interpret skewness and kurtosis values
Produce Crosstabs with row/column percentages
Inferential Tests
Conduct and interpret independent samples t-test
Conduct and interpret paired samples t-test
Run One-Way ANOVA with Tukey post hoc
Run Factorial ANOVA and interpret interactions
Choose a non-parametric alternative when needed
Correlation & Regression
Compute Pearson and Spearman correlations
Interpret r, R², and p-values
Run simple and multiple linear regression
Check assumptions (normality, homoscedasticity, multicollinearity)
Report β, t, p, and 95% CI in APA format
Advanced Procedures
Run Chi-Square independence test with Cramér's V
Assess scale reliability with Cronbach's Alpha
Conduct Exploratory Factor Analysis (EFA)
Use Multiple Imputation for missing data
Write reproducible syntax and save .sps files
🎉 You've completed the Statistics & Math series!
Explore more cheat sheets — Rust, JavaScript, Power BI, Tableau, and R Language are coming next.