Statistical Calculators › Correlation and Regression › Spearman Rank Correlation Sample Size Calculator
← All Calculators

Correlation and Regression

Spearman Rank Correlation Sample Size Calculator

Estimate the sample size required to detect a non-zero Spearman rank correlation with a specified power and significance level. The calculation follows the PASS Spearman's Rank Correlation Tests framework: bivariate normal simulation under the alternative hypothesis, Spearman rank correlation, and the corresponding correlation t-test.

Study Design

Specify the correlation, Type I error rate, desired power, and simulation settings.

Sample Size Result

The calculator searches for the smallest evaluable sample size whose simulated power meets or exceeds the target.
Enter the study assumptions and click Calculate Sample Size.

Methodology

This calculator follows the methodology documented for PASS's Spearman's Rank Correlation Tests (Simulation) procedure. The null hypothesis is that the population Spearman rank correlation is zero, while the alternative hypothesis is that it is non-zero. PASS uses Monte Carlo simulation to estimate power under the alternative and significance level under the null.

Test statistic

For each simulated sample, the observations are converted to ranks, with tied observations receiving average ranks. Spearman's rank correlation is then the ordinary Pearson correlation calculated between the two rank variables.

rs = Σ(U − Ū)(V − V̄) / √[Σ(U − Ū)2 Σ(V − V̄)2]

t = rs√[(N − 2)/(1 − rs2)]     df = N − 2

PASS states that the t-test approximation is recommended when N ≥ 19. For a two-sided test, a simulated sample is counted as a rejection when the absolute value of the resulting t-statistic exceeds the two-sided Student t critical value at the specified α level.

Power calculation

Under the alternative hypothesis, the calculator generates paired observations from a bivariate normal distribution having the specified Pearson correlation ρ1. It then computes Spearman's rank correlation for each simulated sample and applies the test statistic above. Power is the proportion of simulated samples that reject the null.

Estimated Power = Number of simulated samples rejecting H0 / Number of simulations

The sample-size search begins at N = 19 and identifies the smallest evaluable N whose estimated power reaches the requested target. Because this is a Monte Carlo calculation, the estimated power has simulation variability. Increasing the number of simulations reduces that variability but increases computation time.

Null hypothesis and alternative

H0: ρs = 0
H1: ρs ≠ 0

The correlation entered for the alternative is the Pearson correlation used to generate the bivariate-normal simulation population. As PASS notes, the corresponding Spearman correlation calculated from the ranks will generally differ slightly from the Pearson correlation used to generate the data.

Dropout adjustment

If a dropout rate is specified, the evaluable sample size is inflated after the statistical calculation. The enrollment requirement is calculated as:

Nenroll = ceil[Nevaluable / (1 − dropout rate)]
Validation reference: PASS Example 1 uses α = 0.05, 5,000 simulations, bivariate-normal data, and reports power of 0.208 at N = 20, 0.667 at N = 60, and 0.820 at N = 100 when the alternative Pearson correlation is 0.30. Because both procedures are Monte Carlo calculations and use different random number generators, a browser run should be compared within normal simulation variability rather than expected to reproduce PASS's last decimal exactly.

References

  1. NCSS, LLC. Spearman's Rank Correlation Tests (Simulation). PASS Sample Size Software, Chapter 803. The documentation describes the Monte Carlo power calculation, Spearman rank statistic, t-test approximation, examples, and validation. PASS procedure documentation .
  2. Kendall, M., & Gibbons, J. D. (1990). Rank Correlation Methods, 5th Edition. Oxford University Press, New York.
  3. Zar, J. H. (1984). Biostatistical Analysis. Prentice-Hall. PASS uses the Zar example as a validation example for its Spearman simulation procedure.