Skip to content
Tutorials Center
My learning

Topics

Lesson 26 of 39 ยท Hypothesis Tests

Correlation Analysis in SPSS: Pearson and Spearman

Measure the link between two variables in SPSS with Bivariate Correlations: Pearson versus Spearman, reading the matrix, scatterplots, r squared and partial correlation.

A correlation describes how strongly two variables move together, on a scale from -1 to +1. Hours studied and exam score. Age and reaction time. SPSS offers three coefficients in one dialog, and a matrix layout that is handy but easy to misread.

The coefficients

  • Pearson's r: the linear relationship between two scale variables. Sensitive to outliers.
  • Spearman's rho: the same idea computed on ranks. Use it for ordinal data, skewed data or curved but steadily rising/falling relations.
  • Kendall's tau-b: another rank coefficient, better with many tied ranks and small samples.

Size guide for |r| (a convention, not a law): .1 weak, .3 moderate, .5 strong. The sign gives direction: positive means both rise together, negative means one rises as the other falls.

Python Stand-in: Pearson, Spearman and the influence of one outlier

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.

One strange case wrecks Pearson far more than Spearman, which is why you draw the scatterplot first.

Always look first: the scatterplot

Graphs > Chart Builder > Scatter/Dot > Simple Scatter, with one variable on each axis (see Chart Builder). Look for a straight band, a curve, clusters or isolated points. Correlation coefficients cannot tell these apart, but your eyes can.

Running Bivariate Correlations

  1. Analyze > Correlate > Bivariate.
  2. Move two or more variables into Variables.
  3. Tick Pearson, Kendall's tau-b and/or Spearman under Correlation Coefficients.
  4. Keep Two-tailed and Flag significant correlations (stars). Under Options choose Means and standard deviations if you want them, and "Exclude cases pairwise" (default) or "listwise".
  5. Paste:
Text
CORRELATIONS
  /VARIABLES=hours score
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE.
NONPAR CORR
  /VARIABLES=hours score
  /PRINT=SPEARMAN TWOTAIL NOSIG
  /MISSING=PAIRWISE.

Reading the matrix

Each cell holds three numbers: Pearson Correlation, Sig. (2-tailed) and N. Points to remember:

  • The diagonal is 1 (a variable with itself) and the matrix is symmetric, so every result appears twice.
  • With k variables you get k(k-1)/2 distinct tests. Ten variables is 45 tests, so some stars will appear by chance; treat exploratory matrices with caution (a Bonferroni-style stricter alpha is common).
  • N can differ between cells under pairwise deletion. Use listwise deletion if you need the same cases everywhere.
  • A footnote says what the stars mean (* at .05, ** at .01).

The proportion of shared variance is r squared: r = .8 means 64% of the variance in one variable is linearly accounted for by the other.

Python Stand-in: a correlation matrix with N per pair

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.

Partial correlation

Two variables may correlate only because both depend on a third. Analyze > Correlate > Partial removes the effect of one or more Controlling for variables. If the correlation between hours and score shrinks a lot after controlling for sleep, sleep was entangled with it. Syntax: PARTIAL CORR /VARIABLES=hours score BY sleep.

Correlation is not causation

A strong correlation can arise from a hidden third variable, reversed direction or coincidence. Ice cream sales and drownings correlate because of summer. Say "associated with", not "causes", unless the design (an experiment) justifies it.

Restricted range and other traps

  • If you only sample part of the range (only high scorers), r shrinks.
  • Mixing two subgroups can create or hide a correlation (check by colouring the scatterplot by group).
  • A correlation of 0 can hide a perfect curve (a U shape).
  • Ordinal items with few categories produce many ties; prefer Kendall's tau-b or Spearman.

Writing it up

"Hours studied and exam score were strongly positively correlated, r(8) = .99, p < .001." The degrees of freedom are N - 2. Add the scatterplot and mention any outliers. Reporting a correlation of a pair of variables is the first step towards simple linear regression, which predicts one variable from the other.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which coefficient suits two ordinal variables or a skewed scale variable?

    Spearman works on ranks, so it does not need normal, linear scale data.
  2. 2. r = -.70 means what?

    The sign shows direction and the square (.49) is the shared variance. Correlation alone says nothing about cause.
  3. 3. In SPSS's matrix output, why does every correlation appear twice?

    Each pair sits above and below the diagonal of 1s.
  4. 4. What should you do before trusting r?

    Outliers, curves and subgroups are visible in a scatterplot but invisible in r.

Summary

  • Analyze > Correlate > Bivariate gives Pearson, Spearman and Kendall in one dialog.
  • Plot first; Pearson is linear and outlier-sensitive, Spearman uses ranks.
  • Read r, Sig. and N in every cell; many pairs mean many chances for false alarms.
  • Partial correlation controls for a third variable; correlation does not prove causation.

Next: Non-Parametric Tests