Skip to content
Tutorials Center
My learning

Topics

Lesson 21 of 39 ยท Hypothesis Tests

Choosing the Right Statistical Test in SPSS

Pick the correct SPSS test from your variables: measurement level, number of groups, paired or independent data, and assumptions, with a decision table and a checker.

SPSS will happily run any test on any variable, whether or not the test makes sense. Choosing the right procedure is your job. The choice rests on a few questions you can answer before opening a menu, and this lesson turns them into a decision guide you can reuse for every project.

The questions to ask

  1. What is the measurement level of the outcome? Scale (interval or ratio, such as score or income), ordinal (ranks, Likert items) or nominal (categories such as yes/no). You set this in Variable View.
  2. What is the predictor? Categorical groups, or another scale variable?
  3. How many groups or conditions? Two, or three and more?
  4. Independent or related data? Different people in each group, or the same people measured twice (or matched pairs)?
  5. Are the assumptions reasonable? Roughly normal outcome in each group, similar spread, no extreme outliers. If not, choose the non-parametric twin.

The decision table

Outcome Predictor / design Parametric test SPSS menu Non-parametric twin
Scale One sample vs a known value One-sample t Compare Means > One-Sample T Test Wilcoxon signed-rank (one sample)
Scale 2 independent groups Independent t Compare Means > Independent-Samples T Test Mann-Whitney U
Scale 2 related measurements Paired t Compare Means > Paired-Samples T Test Wilcoxon signed-rank
Scale 3+ independent groups One-way ANOVA Compare Means > One-Way ANOVA Kruskal-Wallis
Scale 3+ repeated measures Repeated-measures ANOVA General Linear Model > Repeated Measures Friedman
Scale Another scale variable Pearson correlation / linear regression Correlate > Bivariate / Regression > Linear Spearman correlation
Nominal Nominal Chi-square test of independence Descriptive Statistics > Crosstabs Fisher exact (small counts)
Binary Any predictors Binary logistic regression Regression > Binary Logistic none (it is already assumption-light)

Keep this table near your desk. Each test has its own lesson in this chapter or the next one.

flowchart TD
    A["Outcome type?"] -->|"Scale"| B["Groups or a second scale variable?"]
    A -->|"Nominal"| C["Crosstabs + chi-square"]
    B -->|"Second scale variable"| D["Correlation / regression"]
    B -->|"Groups"| E["How many groups?"]
    E -->|"2"| F["Independent or paired t test"]
    E -->|"3 or more"| G["One-way ANOVA"]

A short route through the most common choices. Ordinal outcomes or violated assumptions send you to the non-parametric tests.

Assumptions in one list

  • Independence of observations (no person counted twice in independent tests). This is about design; no test can repair it.
  • Normality of the outcome within each group, or of the paired differences. Matters mostly for small samples; with about 30+ per group the t test and ANOVA are fairly robust.
  • Homogeneity of variance across groups. SPSS tests it with Levene's test and offers corrected versions (Welch).
  • Linearity and no extreme outliers for correlation and regression.

Always draw the data first (a histogram or boxplot per group). Plots show outliers and skew that a p value hides. Charts are covered in the Chart Builder lesson.

A runnable decision helper

The function below encodes the table above. It is a teaching stand-in, not part of SPSS, but writing the rules as code shows how mechanical the choice is.

Python Stand-in: a test chooser

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Checking assumptions with numbers

SPSS reports Shapiro-Wilk and Kolmogorov-Smirnov normality tests under Analyze > Descriptive Statistics > Explore > Plots > Normality plots with tests. A small p there suggests non-normality, but with large samples even trivial departures are flagged, so judge by the histogram and Q-Q plot too.

Python Stand-in: a normality check on two small samples

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The skewed sample gets a clearly small p. In SPSS you would then use a non-parametric test or transform the variable (for example a log transform, see data steps in syntax).

Common mistakes

  • Using a t test on three groups (run ANOVA instead; many t tests inflate false alarms).
  • Treating a Likert item as scale without thinking. Single items are ordinal; summed scales often pass as scale.
  • Using an independent test on before/after data from the same people.
  • Choosing the test after seeing which gives p < .05.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. You compare exam scores of the same students before and after a course. Which test fits?

    The same people are measured twice, so the data are related and a paired test is needed.
  2. 2. Three independent groups, a scale outcome, roughly normal. Which procedure?

    One-way ANOVA compares 3+ means in one test; separate t tests inflate the Type I error rate.
  3. 3. Both variables are nominal (gender and preferred product). What do you run?

    Two categorical variables call for a contingency-table test of independence.
  4. 4. What does Levene's test check?

    Levene's test compares the spread of the groups, which matters for t tests and ANOVA.

Summary

  • Decide from the outcome type, the predictor, the number of groups and whether data are paired.
  • Every parametric test has a non-parametric twin for ordinal data or violated assumptions.
  • Check assumptions with plots first, then with tests such as Levene and Shapiro-Wilk.
  • Never pick a test because it gives the smallest p.

Next: One-Sample t Test