Before you can calculate a Spearman’s rho or Kendall’s tau, there’s one non-negotiable step you must complete first: ranking your data. This process – converting raw scores into ordered positions – is the backbone of non-parametric correlation analysis. Get it right, and your correlation results will be valid and reliable. Get it wrong, and everything downstream falls apart. This guide walks you through exactly how to rank data for non-parametric correlation, including how to handle the tricky situation where two or more values are identical.

Table of Contents

Why ranking is necessary in non-parametric statistics

Parametric tests like Pearson’s correlation work directly with raw numerical values and assume the data follows a normal distribution. But in psychology research, data often violates these assumptions – it might be skewed, contain outliers, or be measured on an ordinal scale (like Likert ratings or ranked preferences). This is where non-parametric methods become essential.

Spearman’s rank-order correlation is the most widely used non-parametric alternative to Pearson’s correlation. Rather than analyzing the raw data values themselves, it focuses on the monotonic relationship between the ranks of paired observations. Similarly, Kendall’s tau uses ranks to measure the strength of association between two variables. In both cases, ranking transforms your raw scores into a common, comparable format that these tests can work with – regardless of whether the original data was normally distributed.

As a result, ranking is not just a preliminary task – it is the core data transformation that makes non-parametric correlation possible.

The basic rules for ranking data

The process of ranking follows a clear set of conventions. According to the Introduction to Applied Statistics for Psychology Students, there are two fundamental rules to keep in mind:

  • Assign ranks from the lowest score to the highest score. The smallest value in your dataset receives rank 1, the next smallest receives rank 2, and so on.
  • If there are ties, assign the average rank to all tied values. This ensures no value is unfairly ranked above another when they are equal.

It is also worth noting that the direction of ranking – whether you start from the lowest or highest value – does not affect the final correlation, as long as you apply the same ranking direction consistently to both sets of data.

Step-by-step: how to rank a dataset

Let’s walk through the ranking process with a clear, practical example. Suppose you collected anxiety scores for 6 participants:

Raw scores: 14, 9, 22, 9, 17, 22

Here is how you rank them:

Step 1 – Sort the data from lowest to highest

Arrange all values in ascending order. This makes the ranking positions easier to see:

9, 9, 14, 17, 22, 22

Step 2 – Assign initial rank positions

Temporarily label each value by its position in the sorted list:

  • Position 1: 9
  • Position 2: 9
  • Position 3: 14
  • Position 4: 17
  • Position 5: 22
  • Position 6: 22

Step 3 – Handle tied values by averaging their ranks

Notice that the value 9 appears in positions 1 and 2, and the value 22 appears in positions 5 and 6. If there are any values that tie, each of the tied values gets the average of the corresponding ranks.

  • The two 9s would occupy ranks 1 and 2, so each receives: (1 + 2) / 2 = 1.5
  • The value 14 is in position 3: rank = 3
  • The value 17 is in position 4: rank = 4
  • The two 22s would occupy ranks 5 and 6, so each receives: (5 + 6) / 2 = 5.5

Step 4 – Assign the final ranks back to the original dataset

Go back to the original, unsorted dataset and apply the ranks you calculated:

Participant Raw Score Rank
1 14 3
2 9 1.5
3 22 5.5
4 9 1.5
5 17 4
6 22 5.5

Understanding tied ranks and why the average method matters

The average rank method for handling ties is not arbitrary – it has a solid statistical rationale. Assigning tied values the average of the ranks they would have occupied is advantageous in statistical tests because it preserves the sum of the ranks. This is important because several non-parametric tests rely on the total sum of ranks being consistent and predictable.

To illustrate: in a dataset of 6 values with no ties, the ranks would be 1, 2, 3, 4, 5, 6, and their sum would be 21. In the tied example above, the ranks are 1.5, 1.5, 3, 4, 5.5, 5.5 – and their sum is still 21. The average method keeps this sum intact, maintaining the mathematical integrity of subsequent correlation calculations.

There are actually multiple methods for handling tied ranks (such as assigning the minimum rank or the maximum rank to tied values), but the most common way is to assign the average rank of the tied values – and this is the standard approach used in Spearman’s rho and Kendall’s tau calculations.

Verifying your rankings: the sum check

One simple but effective way to verify that you’ve ranked your data correctly is to check the sum of the ranks. For a dataset of n values, the expected sum of all ranks is always:

Sum = n(n + 1) / 2

For a dataset of 6 values: 6 ร— 7 / 2 = 21

If your ranks add up to a different number, you’ve made an error somewhere. This simple check acts as a built-in accuracy test before you proceed to calculate your correlation coefficient. Errors in ranking – even small ones – can meaningfully distort your results, so this verification step is always worth doing.

Ranking two variables for correlation

When calculating a rank-order correlation like Spearman’s rho, you’ll be working with two variables measured on the same participants. Each variable needs to be ranked independently using the exact same procedure described above.

For example, suppose you want to examine whether anxiety scores and sleep quality ratings are related. You would rank the anxiety scores (Variable X) and the sleep quality ratings (Variable Y) separately – each from lowest to highest – handling any ties within each variable independently. Once both variables are ranked, those ranked values are what feed into the Spearman or Kendall formula.

Spearman’s correlation measures the strength and direction of the monotonic association between two ranked variables – meaning it tells you whether, as one variable’s rank increases, the other variable’s rank tends to increase (positive correlation) or decrease (negative correlation).

Ranking as the gateway to Spearman’s rho and Kendall’s tau

Ranking data is the shared foundation for the two most commonly used non-parametric correlation coefficients in psychology research.

Spearman’s rho (ฯ)

Spearman’s rank-order correlation coefficient is a nonparametric measure of the strength and direction of association that exists between two variables measured on at least an ordinal scale. Once both variables are ranked, Spearman’s rho uses the difference between each pair of ranks (d) to compute the correlation. It is particularly well-suited when your data contains outliers, is skewed, or doesn’t meet parametric assumptions.

Kendall’s tau (ฯ„)

Kendall’s tau is another rank-based correlation coefficient that works slightly differently – rather than using rank differences, it counts the number of concordant and discordant pairs in the data. It is particularly useful when there are a large number of tied ranks in your data, making it a strong complement to Spearman’s rho in datasets where ties are common.

Both methods depend entirely on the quality of your rankings. If you’ve ranked your data accurately – including handling ties correctly – these correlation coefficients will produce valid, interpretable results.

Common mistakes to avoid when ranking

Even experienced researchers can make errors in the ranking process. Here are the most frequent ones to watch out for:

  • Forgetting to identify all ties. A quick sort of the data before ranking helps surface duplicates that might otherwise be missed.
  • Ranking each variable in a different direction. If you rank Variable X from lowest to highest, you must rank Variable Y from lowest to highest too. Inconsistent direction will distort the correlation.
  • Skipping the sum check. Always verify your ranks sum to n(n+1)/2 before moving forward. This catches arithmetic errors early.
  • Treating tied ranks as distinct. Assigning different ranks to identical values – say, giving one a rank of 3 and another a rank of 4 when both should be 3.5 – introduces bias into the analysis.

A note on software and manual ranking

Statistical software packages like SPSS, R, and SAS can handle ranking automatically. In SPSS, for instance, running a Spearman’s correlation will rank the data in the background before computing the coefficient – you don’t need to manually create a ranked variable. However, understanding the manual process is critical. It helps you catch data entry errors, interpret what the software is doing, and make informed decisions about how to handle unusual data structures like large numbers of ties.

As the University of Texas statistics resources explain, Spearman’s correlation is simply the Pearson correlation calculated on the ranked versions of the data – a reminder that the quality of your ranks directly determines the quality of your correlation output.

What do you think? When you look at real-world psychological data – such as personality scores or wellbeing ratings – how often do you expect to encounter tied values, and how might that affect the choice between Spearman’s rho and Kendall’s tau? If two datasets have the same Spearman’s rho but were ranked with different methods for handling ties, would you trust their results equally?

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

References
  1. https://statistics.laerd.com/statistical-guides/spearmans-rank-order-correlation-statistical-guide.php
  2. https://scales.arabpsychology.com/stats/spearmans-rho/
  3. https://www.saskoer.ca/introtoappliedstatsforpsych/chapter/16-1-how-to-rank-data/
  4. https://explorable.com/spearman-rank-correlation-coefficient
  5. https://stats.libretexts.org/Courses/Colby_College/EC225:_Research_Methods_and_Statistics_for_Economics/New_Page/13:_Nonparametric_Tests_(not_covered_in_EC225)/13.03:_Ranking_Data
  6. https://blogs.sas.com/content/iml/2021/04/19/tied-ranks.html
  7. https://statistics.laerd.com/spss-tutorials/spearmans-rank-order-correlation-using-spss-statistics.php
  8. https://sites.utexas.edu/sos/guided/inferential/numeric/bivariate/rankcor/

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Statistics in Psychology

1 Introduction to Statistics

  1. Meaning of Statistics
  2. Types of Statistics
  3. Scope and Use of Statistics
  4. Limitations of Statistics
  5. Distrust and Misuse of Statistics

2 Descriptive Statistics

  1. Organising Data
  2. Summarising Data
  3. Use of Descriptive Statistics

3 Inferential Statistics

  1. Concept and Meaning of Inferential Statistics
  2. Inferential Procedures
  3. Hypothesis Testing
  4. General Procedure for Testing Hypothesis

4 Frequency Distribution and Graphical Presentation

  1. Arrangement of Data
  2. Tabulation of Data
  3. Graphical Presentation of Data
  4. Diagrammatic Presentation of Data

5 Concept of Central Tendency

  1. Meaning of Measures of Central Tendency
  2. Functions of Measures of Central Tendency
  3. Types of Measures of Central Tendency
  4. Characteristics of a Good Measures of Central Tendency

6 Mean, Median and Mode

  1. Symbols Used in Calculation of Measures of Central Tendency
  2. The Arithmetic Mean
  3. The Median
  4. The Mode
  5. When to Use the Various Measures of Central Tendency

7 Concept of Dispersion

  1. Concept of Dispersion
  2. Functions of Dispersion
  3. Measures of Dispersion
  4. Significance of Measures of Dispersion
  5. Types of Measures of Variability/Dispersion

8 Range, MD, SD and QD

  1. Range
  2. Quartile Deviation
  3. The Average Deviation
  4. The Standard Deviation
  5. When to Use Different Measures of Dispersion

9 Introduction to Parametric Correlation

  1. Introduction to Correlation
  2. Scatter Diagram
  3. Correlation: Linear and Non-Linear Relationship
  4. Direction of Correlation: Positive and Negative
  5. Correlation: The Strength of Relationship
  6. Measurements of Correlation
  7. Correlation and Causality
  8. Uses of Correlation

10 Product Moment Coefficient of Correlation

  1. Building Blocks of Correlation
  2. Pearsonโ€™s Product Moment Coefficient of Correlation
  3. Interpretation of Correlation
  4. Using Raw Score Method for Calculating r
  5. Significance Testing of r
  6. Other Types of Pearsonโ€™s Correlation

11 Introduction to Non-Parametric Correlation

  1. Parameter Estimation
  2. Parametric and Non-parametric Statistics
  3. Scales of Measurement
  4. Conditions for Rank Order Correlations
  5. Ranking of the Data
  6. Rank Correlations

12 Rank Correlation (rho and Kendall Rank Correlation

  1. Rank-Order Correlations
  2. Spearmanโ€™s rho (rs)
  3. Kendallโ€™s tau (ฯ„)

13 Significance of the Difference of Frequency- Chi-Square

  1. Parametric and Non-Parametric Statistics Tests
  2. Chi-square Test: Definitions
  3. Assumptions for the Application of x2 Test
  4. Properties of the Chi-square Distribution
  5. Application of Chi-square Test
  6. Precautions about Using the Chi-square Test

14 Concept and Calculation of Chi-Square

  1. Application of Chi-square Test
  2. The Chi-square Test when Table Entries are Small (Yateโ€™s Correction)
  3. Chi-square as a Test of Independence
  4. 2 ร— 2 Fold Contingency Tables

15 Significance of the Differences between Means (T-value)

  1. Need and Importance of the Significance of the Difference between Means
  2. Fundamental Concepts in Determining the Significance of the Difference between Means
  3. Methods to Test the Significance of Difference between the Means of Two Independent Groups (t-test)
  4. Significance of the Difference Between two Correlated Means

16 Normal Distribution- Definition, Characteristics and Properties

  1. Definitions of Probability
  2. The Normal Distribution
  3. Deviation from the Normality
  4. Characteristics of a Normal Curve
  5. Properties of the Normal Distribution
  6. Application of the Normal Curve