Skip to content

Home / Statistical Tools / Analysis Tools / Correlation and Covariance / How-To / Spearman Correlation

Spearman Correlation

Spearman Correlation computes the correlation between variables from the ranks of their values rather than from the raw values.

Goal

Measure rank-based correlations between hours studied, test scores, and class rank for a group of students.

Sample Data

Press Copy for Excel, then paste the table into a blank worksheet.

Hours Studied Test Score Class Rank
2 62 25
4 68 19
6 72 14
8 81 11
10 85 7
3 71 16
5 70 18
7 79 8
9 83 9
11 89 4

Each row represents one student. Hours Studied and Test Score rise together. Class Rank runs the other way, so its correlations with the other two columns come out negative.

Steps

  1. Put the data in Excel

    Press Copy for Excel above the table, click cell A1 in a blank worksheet, and press Ctrl+V. The header row lands in row 1 and the 10 data rows in rows 2 through 11.

  2. Launch the analysis

    From the Excel ribbon, select QXL Stat Tools → Analysis Tools → Correlation and Covariance → Spearman's Correlation (Non-normal).

  3. Select your data

    In the Data Selection window, select cells A1:C11 (the header row plus all 10 data rows across all three columns). Make sure Data in Columns and First Row/Column is Header are selected, then click Next >.

  4. Configure the analysis

    In the Correlation dialog:

    • Data Columns: "Hours Studied", "Test Score", and "Class Rank" should all be checked

    Click Finish to generate the correlation matrix.

Result

Quantum XL creates a 3×3 Spearman correlation matrix with p-values for each pair:

  • Hours Studied vs. Test Score: coefficient 0.963636.
  • Hours Studied vs. Class Rank: coefficient -0.927273.
  • Test Score vs. Class Rank: coefficient -0.963636.

All three p-values are very small. p-values at or below 0.05 are shown in bold red.

Spearman and Pearson

Spearman ranks each value before computing the correlation. Pearson computes it from the raw values.