Skip to content

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

Spearman Correlation

Spearman Correlation measures the strength of a monotonic relationship between variables using ranks rather than raw values. Use Spearman when your data is ordinal, non-normal, or has a non-linear but consistently increasing or decreasing pattern.

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 should have a strong positive monotonic relationship. Class Rank is inversely related (a lower rank number means a better position), so expect a strong negative correlation with Hours Studied and Test Score.

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 Correlation.

  3. Select your data

    Select cells A1:C11 (the header row plus all 10 data rows across all three columns).

  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: Strong positive correlation (close to 1). Students who study more tend to score higher.
  • Hours Studied vs. Class Rank: Strong negative correlation (close to -1). More study hours are associated with better (lower) class rank numbers.
  • Test Score vs. Class Rank: Strong negative correlation (close to -1). Higher test scores correspond to better class rank.

All three p-values should be very small and highlighted in red, indicating statistical significance.

Spearman vs. Pearson

Spearman ranks each value before computing correlations, which makes it robust to outliers and suitable for monotonic but non-linear relationships. Pearson, in contrast, measures only linear relationships using raw values.