Spearman correlation
Estimates the sample size required to detect a specified monotonic association between two variables using Spearman's rank correlation, based on the anticipated correlation, significance level, and statistical power.
Key takeaways
- What is calculated: Determine the smallest n at which the rank correlation can be distinguished from zero with the target power.
- Quantities you must supply: Expected Spearman ρ; Significance level; Power.
- Type of calculation: Power-based: it answers how much data is needed to detect a stated effect. Power 0.80 at α = 0.05 is the usual target; confirmatory studies use 0.90.
When to use
Use when the primary objective is to determine whether a specified monotonic association between two variables can be detected with adequate statistical power.
Sample size
Awaiting inputs
—
Set the parameters and calculate.
Methodology — Spearman rank correlation — Fisher's z with the Bonett-Wright inflation
Formula used Spearman rank correlation — Fisher's z with the Bonett-Wright inflation
- Two-sided alternative selected: α is split between both tails, so the larger quantile is used and the requirement rises
where —
- ρ_s
- Spearman rank correlation to detect. Must be non-zero
- α
- Probability of rejecting a true null hypothesis (Type I error). 0.0001 – 0.5; conventionally 0.05, or 0.025 one-sided for regulatory non-inferiority
- 1 − β
- Probability of rejecting the null hypothesis when the specified alternative is true. 0.50 – 0.9999; conventionally 0.80 or 0.90
- ℓ
- Expected proportion of enrolled units lost before analysis. 0 – 0.95
How this method works
Spearman's coefficient is computed on ranks, which costs efficiency relative to Pearson when the underlying relationship is bivariate normal. Bonett and Wright showed the Fisher transformation still applies with an inflation factor of approximately (1 + rho²/2).
Rank-based estimation costs some efficiency when the underlying relationship is bivariate normal. Bonett and Wright showed the Fisher transformation still applies with a variance inflation factor.
The penalty is modest — under 15% for correlations up to 0.5 — and usually worth paying for ordinal, skewed or outlier-prone data.
Null hypothesis. H0: rho_s = 0.
Alternative hypothesis. Two-sided H1: rho_s != 0. One-sided H1: rho_s > 0 or rho_s < 0.
Calculation procedure
- State the rank correlation worth detecting.
- Apply Fisher's transformation as for the Pearson correlation, .
- Evaluate the Pearson requirement .
- Inflate it by the efficiency factor for working with ranks, about , which is the price of not assuming normality.
- Round up, then inflate for dropout.
Exact or approximate
Approximate — a normal approximation with an empirically derived inflation factor.
The formula shown always matches what was computed: when a one-sided test is selected the rendered quantile changes from z1−α/2 to z1−α, and where several methods exist, the formula follows the method selected in the calculator.
Advantages & limitations
Advantages
- Robust to outliers and non-linear monotone relationships.
- Valid for ordinal data.
- The penalty relative to Pearson is modest, under 15% for correlations up to 0.5.
Limitations
- Less efficient than Pearson when the data are genuinely bivariate normal.
- The inflation factor is itself an approximation.
- Heavy ties degrade the method.
Assumptions
- Pairs of observations are independent.
- The relationship is monotonic.
- Ties are infrequent enough not to distort the ranks.
- The inflation factor derived under bivariate normality is a reasonable approximation.
Applicable adjustments
Supports dropout inflation.
Conclusion
Report n with the assumed rank correlation. Where the data are well behaved, compare against the Pearson figure before accepting the larger sample.
References
- Bonett DG, Wright TA. Sample size requirements for estimating Pearson, Kendall and Spearman correlations. Psychometrika. 2000;65(1):23–28. Link
- Zar JH. Biostatistical Analysis. 5th ed. Upper Saddle River: Prentice Hall; 2010.
- Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale: Lawrence Erlbaum; 1988.