Robust Spearman Correlation

Statistics
Introduced by
Rand R. Wilcox (robust extensions); Charles Spearman (base method, 1904)
Year
1990s–2000s
Type
Robust nonparametric correlation
Family
Classical statistics

What does it do?

Robust Spearman correlation is a rank-based measure of monotonic association between two variables, computed after Winsorizing the most extreme raw values of each variable.

It is intended for data with outliers or heavy tails. Because the Winsorizing step is applied before ranking, its practical effect is confined to ties among the most extreme values, so its advantage over ordinary Spearman rho may be modest and should be checked on the data.

The intuition behind the method

Spearman's rho replaces each value by its rank and then computes a Pearson-type correlation on the ranks, so it already limits the leverage of extreme values compared with Pearson r. Robust Spearman adds a Winsorizing step, in which the lowest and highest g values of each variable are pulled in to the nearest remaining order statistic. This clipping is monotone, so the order of the observations is preserved. What changes is that the g most extreme values on each side become tied and receive average ranks. The protective effect over ordinary rho may therefore be limited, and users should compare the result with ordinary rho on their own data rather than assume the two differ in a meaningful way.

History

Spearman's rank correlation was introduced by Charles Spearman in 1904. Rand R. Wilcox's 1994 paper introduced the percentage-bend correlation coefficient, a distinct estimator motivated by the nonrobustness of the usual correlation coefficient; it is discussed here only as a related method. The Winsorized-rank variant described on this page does not have a documented originator in the references and should not be credited to a particular author.

When to use it

Consider robust Spearman when you want a rank-based measure of monotonic association between two continuous or ordinal variables and the data contain a few extreme values or heavy tails. It is useful when you need a monotonic rather than linear measure and want to check that conclusions do not depend on a few atypical observations, for example by comparing the result with ordinary Spearman rho. The method assumes paired observations that are independent across cases and an association that is monotonic; the trimming proportion and the tie handling must be fixed before the analysis. Do not use it when the relationship is clearly linear and the data are clean and approximately normal, since Pearson r is then more efficient. It is also not suitable for detecting non-monotonic patterns. In very small samples any correlation estimate is unstable, and trimming removes a large share of the observations, so results should be interpreted with caution.

Limitations and considerations

  • Winsorizing before ranking changes mainly the ties among extreme values, so its added protection over ordinary Spearman rho may be modest; this should be checked on the data rather than assumed.
  • The trimming proportion must be chosen in advance, and the result can vary with it; there is no single correct value.
  • Less efficient than Pearson r when the relationship is linear and the data are clean and normal.
  • The shortcut rho formula is exact only without ties, so tied ranks require computing the correlation from the ranks themselves.
  • Only monotonic association is detected; U-shaped or other non-monotonic relationships can be missed.
  • Implementations differ across software, so the Winsorizing and inference options used should be stated explicitly in the report.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Rank-based, so no linearity assumption is needed; the method measures monotonic association only.
  • Applicable to ordinal data and to continuous variables with non-normal shapes, because only the ordering of values enters the ranking step.
  • The coefficient keeps the Spearman scale from −1 to +1 and its sign convention, so it can be reported alongside ordinary rho.
  • Running the Winsorized and ordinary versions side by side is a simple sensitivity check for influential observations.
  • Bootstrap confidence intervals offer an alternative to the t approximation when the distribution is heavy-tailed.

Applications

  • Survey research: correlating Likert-type scale scores where a few respondents at the scale endpoints may distort ordinary rho.
  • Biomedical measurement: relating assay values to clinical scores when occasional laboratory results are extreme.
  • Educational testing: associating test scores with background ratings in samples that include a few very high or very low scores.
  • Process monitoring: checking monotonic association between process variables when occasional measurement errors create outliers.

How it works

How it works

1

The null hypothesis is that the population Spearman rank correlation is zero, meaning no monotonic association exists between the two variables. The alternative states that a nonzero monotonic relationship is present.

Formula
H_0: \rho_s = 0 \quad H_1: \rho_s \neq 0
2

For each variable, the g smallest values are replaced by the next order statistic above them, and the g largest values are replaced by the next order statistic below them, as given in the formula. The trimming proportion g/n must be fixed before the analysis and justified in the report, because the result depends on it.

Formula
X_{(i)}^W = \min\!\bigl(\max(X_{(i)},\, X_{(g+1)}),\, X_{(n-g)}\bigr)
3

The Winsorized values of each variable are ranked from smallest to largest. Values pulled to the same order statistic become tied and receive average ranks. Because the Winsorizing step depends only on the order of the observations, the resulting ranks depend only on that ordering, not on the units of measurement.

4

Rho is the Pearson correlation between the average ranks of the two Winsorized variables. Without ties, this equals the shortcut 1 − 6Σd²/(n(n²−1)) given in the mechanics. Winsorizing creates ties among the extreme values, so in this procedure the shortcut is only an approximation and the Pearson correlation of the tied ranks should be used.

Formula
r_s = 1 - \frac{6\sum d_i^2}{n(n^2-1)}
5

The mechanics give a t statistic with n − 2 degrees of freedom as an asymptotic approximation for the p-value. This approximation has not been validated for Winsorized data with tied ranks, and it may be less reliable in small samples and under heavy-tailed or skewed conditions. For small samples or heavy-tailed data, a bootstrap confidence interval or bootstrap test is preferable as the primary inference. The primary inference method should be stated before the analysis.

Formula
t = r_s\sqrt{\frac{n-2}{1-r_s^2}}
6

If the p-value is below the chosen significance level (conventionally 0.05), reject the null hypothesis of no monotonic association. Report rho together with its confidence interval, which conveys both the direction and the precision of the estimate. When both the Winsorized and the ordinary Spearman rho are reported with their confidence intervals, a material difference between them indicates that the conclusion depends on the most extreme observations and should be discussed explicitly.

Common pitfalls

  • Applying ordinary Spearman rho when outliers are present and then switching to the robust version after seeing an unwanted result; the trimming proportion must be chosen before the analysis.
  • Confusing robust Spearman with the percentage-bend correlation, which is a related but distinct estimator; results may differ, so the estimator should be named precisely.
  • Reporting only the p-value without the correlation coefficient and its confidence interval, which hides the strength and direction of the association.
  • Using a near-zero rho to conclude that two variables are unrelated; a non-monotonic relationship may still exist.
  • Skipping the Winsorizing step and reporting ordinary Spearman rho as if it were the robust variant.
  • Computing the shortcut formula on data with ties, which gives an approximate rather than exact value.

Frequently asked questions

How is robust Spearman different from standard Spearman rho?

Standard Spearman ranks the raw data and computes a Pearson correlation on the ranks. Robust Spearman first Winsorizes the most extreme raw values, pulling the lowest and highest g values in to the nearest remaining value, and then ranks. Because this clipping preserves order, the difference is confined to ties among the extreme values and their average ranks. The two often give similar results, so comparing both versions is the practical way to judge whether the step matters for your data.

How do I choose the trimming proportion?

Choose it before looking at the correlation and report it with the result. Reporting results for a small set of pre-specified proportions shows how sensitive the conclusion is. The choice should reflect the amount of contamination you expect in the data, not the value that gives a preferred answer.

Should I use bootstrap or the t approximation?

The mechanics give the t approximation with n − 2 degrees of freedom. It has not been validated for Winsorized data with tied ranks, so for small samples or heavy-tailed data a bootstrap confidence interval is preferable as the primary inference. Decide which method will be primary before the analysis, and report the number of bootstrap resamples and the random seed used.

Can I use this with ordinal Likert data?

Yes. The method works on ranks and does not require interval-level measurement. Ties are common in Likert data, and the shortcut formula is only approximate when ties are present, so rho should be computed from the tied ranks.

Is robust Spearman the same as the percentage-bend correlation?

No. The percentage-bend correlation is a distinct estimator described by Wilcox (1994). Robust Spearman applies Winsorizing before ranking. The two can give different values, so the estimator used should be named exactly in the report.

Related methods

Sources

  1. Wilcox, R. R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Academic Press.

    ISBN: 978-0123869838
  2. Wilcox, R. R. (1994). The percentage bend correlation coefficient. Psychometrika, 59(4), 601–616.

    Open DOI reference