Concept Architecture
Spearman Correlation in Health Economic Data and Models
Spearman's rank correlation coefficient, written for a sample and for a population, replaces the values of each variable by their ranks and then applies Pearson's product-moment formula to those ranks. The result shows whether patients who rank higher on one quantity, such as a severity grade, also tend to rank higher on another, such as annual cost, whether or not that relationship follows a straight line. Patient-level costs are skewed by a few very expensive cases and many outcome scales, such as the modified Rankin scale, are ordinal, so a coefficient that depends only on order often suits these data better than Pearson correlation. Ranks also survive when correlated draws are passed through beta or gamma distributions, which makes rank correlation a natural way to link uncertain inputs in probabilistic sensitivity analysis. The three common coefficients are compared on costs and QALYs on the Correlation Coefficient page.
Ranks, ties and the coefficient
Spearman's 1904 paper on measuring association proposed substituting ranks for measured performances and keeping the same product-moment calculation. He argued that ranks reduce the pull of a few extreme cases and let a series with a normal frequency curve be compared on even terms with one whose curve is entirely different. The NIST Dataplot reference manual gives the modern definition, Pearson's formula applied separately to the ranks of each variable, with tied values replaced by their average rank, so two values sharing seventh and eighth place each receive 7.5.
where and are the ranks of patient on the two variables, and are the mean ranks, both equal to , and is the number of pairs.
With no tied values the formula reduces to one based on the difference between each patient's two ranks.
where is the rank difference for patient . Severity grades with four or five levels produce many ties, and there the shortcut drifts away from the full formula, as step 3 of the worked example shows.
What the coefficient measures in a population
The sample formula estimates a population quantity. Embrechts, McNeil and Straumann define Spearman's rank correlation as the ordinary linear correlation of and , where and are the distribution functions of the two variables, which makes it the correlation of the copula that links them. Because the copula does not change under strictly increasing transformations of either variable, neither does the coefficient, and the authors call it a measure of monotonic, not linear, dependence.
For two variables with a bivariate normal distribution they give the relation between the two coefficients.
where is the population Spearman correlation and is the Pearson correlation of the bivariate normal distribution. They bound the absolute gap between the two at 0.0181 across the whole range, so under normality the coefficients are almost equal, and the choice between them matters when data are skewed, ordinal or contain extreme values.
Testing a coefficient from a small sample
The usual test asks whether the two variables are independent. The SciPy documentation transforms the coefficient into a statistic that, for large samples, follows Student's t distribution.
where is compared with a t distribution on degrees of freedom under the null hypothesis of independence. SciPy's function reference calls the resulting p-value accurate only for very large samples (above 500) and suggests a permutation test for smaller ones, which recomputes the coefficient over every possible pairing of the observed values. A p-value speaks only to independence, so a small study can give a sizeable coefficient with a large p-value.
Rank correlations reported in health economic studies
Spearman's coefficient appears wherever study-level or patient-level quantities are skewed or ordinal. Mukaka's guide for medical researchers advises Spearman's coefficient unless both variables are normally distributed, describing it as less affected by outliers than Pearson's.
In a review of 52 trial-based cost-effectiveness analyses published in the Health Technology Assessment journal between 2013 and 2015, Leurent, Gomes and Carpenter found that the median proportion of participants with complete cost-effectiveness data was 63%. The proportion of complete cases fell as the number of follow-up assessments rose (Spearman's of minus 0.59, p below 0.001) and as study duration increased ( of minus 0.29, p of 0.04), which bears on planning for missing data in long trials.
In health state valuation, Salomon re-analysed a UK general population survey in which respondents both ranked EQ-5D states and valued them by time trade-off. The Spearman correlations between respondents' rankings and their time trade-off values had a mean of 0.78 and a median of 0.82. Death was the exception, with 82% of respondents placing it higher on the time trade-off than in the ranking exercise, so a high average rank correlation hid a systematic difference for one state. Rank correlations are also routine in convergent validity testing of utility instruments.
Rank correlation between parameters in probabilistic analysis
The NICE technology appraisal manual (PMG36, section 4.7.19) asks that evidence about the extent of correlation between individual parameters be considered and reflected in the probabilistic analysis, and that assumptions about correlations be clearly presented. Embrechts and colleagues show that linear correlation is not invariant under nonlinear strictly increasing transformations, so a Pearson correlation set between normal draws changes once those draws are converted to the beta, gamma or lognormal distributions typical of model inputs.
Rank correlation avoids that problem. Embrechts and colleagues describe the Iman and Conover method, the basis of the @RISK software, which draws from a multivariate normal distribution and transforms each margin through the inverse of the required distribution function, leaving the rank correlation matrix of the normal draws unchanged whatever margins are chosen. Inverting the arcsine relation gives the normal-scale correlation that produces a target rank correlation.
where is the target Spearman correlation between the model inputs and is the correlation used for the underlying normal draws. In value of information work, Jalal and colleagues induced correlation between parameters with an algorithm drawn from Iman and Conover that sorts independent samples into the required order and, because it only reorders them, preserves each parameter's marginal distribution.
Worked example with severity grades and skewed annual costs
All numbers are illustrative. Eight patients in a cost study have a severity grade on a four-level scale (1 mild, 4 severe) and an annual cost. Patient 8 has a moderate grade but a long admission that cost GBP 21,000.
| Patient | Grade | Annual cost (GBP) | Grade rank | Cost rank | Rank difference |
|---|---|---|---|---|---|
| 1 | 1 | 600 | 1.5 | 1 | 0.5 |
| 2 | 1 | 1,100 | 1.5 | 3 | −1.5 |
| 3 | 2 | 900 | 4 | 2 | 2 |
| 4 | 2 | 1,800 | 4 | 4 | 0 |
| 5 | 3 | 2,400 | 6.5 | 5 | 1.5 |
| 6 | 3 | 3,000 | 6.5 | 6 | 0.5 |
| 7 | 4 | 4,200 | 8 | 7 | 1 |
| 8 | 2 | 21,000 | 4 | 8 | −4 |
1. Rank with ties. Grade 1 patients share ranks 1 and 2 (1.5 each), grade 2 patients share ranks 3, 4 and 5 (4 each) and grade 3 patients share ranks 6 and 7 (6.5 each). The costs have no ties.
2. Full formula. Both mean ranks are 9/2 = 4.5. The grade-rank deviations are −3, −3, −0.5, −0.5, 2, 2, 3.5 and −0.5, with squares summing to 39. The cost-rank deviations are −3.5, −1.5, −2.5, −0.5, 0.5, 1.5, 2.5 and 3.5, with squares summing to 42. The cross-products are 10.5, 4.5, 1.25, 0.25, 1, 3, 8.75 and −1.75, which sum to 27.5. Then = 27.5 / √(39 × 42) = 27.5 / 40.47 = 0.679.
3. Shortcut formula. The squared rank differences sum to 0.25 + 2.25 + 4 + 0 + 2.25 + 0.25 + 1 + 16 = 26, and 1 − (6 × 26)/(8 × 63) = 1 − 156/504 = 0.690. The ties make the shortcut overstate the coefficient by 0.011.
4. Pearson on raw and logged costs. The mean grade is 18/8 = 2.25 and the mean cost is 35,000/8 = GBP 4,375. The grade sum of squares is 7.5, the cost sum of squares is 325,895,000 and the cross-product sum is 3,350, so = 3,350 / √(7.5 × 325,895,000) = 3,350 / 49,439 = 0.068. Logging cost raises Pearson's to 0.452, while the cost ranks, and so , do not change.
5. Removing patient 8. For the other seven patients Pearson's is 0.939 and is 0.899, so one costly patient cut Pearson's coefficient by 0.87 and Spearman's by 0.22.
6. Test of independence. The square of 0.679 is 0.462, leaving 0.538 when taken from one, so the t statistic is 0.679 times √(6/0.538), or 0.679 times 3.339, giving 2.27 on 6 degrees of freedom and a two-sided p-value of 0.064. Of all 40,320 orderings of the cost ranks against the grade ranks, 2,832 give a coefficient at least as far from zero, an exact p-value of 0.070.
7. A rank correlation for a decision model. Suppose a probabilistic model draws the utilities of the moderate and severe states from beta distributions and needs a rank correlation of 0.7 between them. Pi times 0.7, divided by 6, is 0.3665 and its sine is 0.3584, so the normal-scale correlation is twice that, or 0.717, and the arcsine relation returns (6/π) × arcsin(0.3584) = 0.700. Whatever beta parameters are applied, the sampled utilities keep that rank correlation.
8. Interpretation. Severity and cost rise together in rank, yet Pearson's coefficient on raw costs shows almost no association because one admission dominates the cross-products. Eight patients cannot rule out independence at the 5% level. The gap of 0.017 in step 7 is near the 0.0181 maximum, so setting 0.7 directly on the normal scale would miss the target by less than 0.02. The gain from rank correlation is that it survives the beta transformation.
Boundaries with Pearson, Kendall and agreement measures
Neighbouring statistics answer other questions. Pearson's coefficient describes linear association on the original scale and lends itself to variance and covariance calculations, which Embrechts and colleagues note rank correlations do not. Kendall's tau also depends only on order, and its page compares the two scales. Agreement between two measures of the same quantity, such as self-reported and record-based resource use, is a question for the intraclass correlation, since two measures can order patients identically and still differ in level.
Misreadings of Spearman's coefficient in economic analyses
Most errors come from reading a rank coefficient as if it carried more information than order. The following recur in cost and outcome work.
- Reading it as a size of effect. A coefficient of 0.68 between severity and cost says nothing about how many pounds each grade adds, which needs a regression on the cost scale.
- Using the shortcut with ordinal scales. With many ties the difference formula is only approximate.
- Equating zero with independence. A U-shaped relationship, with costs highest at both ends of a scale, can give a coefficient near zero, and Embrechts and colleagues note that zero rank correlation can occur despite dependence.
- Mislabelling a sampling correlation. A correlation set on normal draws before conversion to gamma or beta inputs fixes the rank correlation of the final inputs, slightly nearer zero than the value set, as step 7 shows, while their Pearson correlation changes with the margins.
Sources
- Embrechts P, McNeil AJ, Straumann D. Correlation and dependence in risk management: properties and pitfalls. In: Dempster MAH, editor. Risk Management: Value at Risk and Beyond. Cambridge: Cambridge University Press; 2002. p. 176-223. https://doi.org/10.1017/CBO9780511615337.008 (preprint, November 1998: https://people.math.ethz.ch/~embrecht/ftp/pitfalls.pdf)
- Jalal H, Alarid-Escudero F. A Gaussian approximation approach for value of information analysis. Medical Decision Making. 2018;38(2):174-188. https://doi.org/10.1177/0272989X17715627
- Leurent B, Gomes M, Carpenter JR. Missing data in trial-based cost-effectiveness analysis: an incomplete journey. Health Economics. 2018;27(6):1024-1040. https://doi.org/10.1002/hec.3654
- Mukaka MM. Statistics corner: a guide to appropriate use of correlation coefficient in medical research. Malawi Medical Journal. 2012;24(3):69-71. https://pmc.ncbi.nlm.nih.gov/articles/PMC3576830/
- National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36). London: NICE; 2022, last updated 13 October 2026. Section 4.7.19. https://www.nice.org.uk/process/pmg36/chapter/economic-evaluation-2
- National Institute of Standards and Technology. Dataplot Reference Manual, entry RANK CORRELATION (1997). Gaithersburg, MD: NIST Statistical Engineering Division. https://www.itl.nist.gov/div898/software/dataplot/refman2/ch2/rankcorr.pdf
- Salomon JA. Reconsidering the use of rankings in the valuation of health states: a model for estimating cardinal values from ordinal data. Population Health Metrics. 2003;1:12. https://doi.org/10.1186/1478-7954-1-12
- SciPy Developers. scipy.stats.spearmanr, and user guide page Spearman correlation coefficient. SciPy v1.18.0 Manual; accessed 28 October 2026. https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.spearmanr.html and https://docs.scipy.org/doc/scipy/tutorial/stats/hypothesis_spearmanr.html
- Spearman C. The proof and measurement of association between two things. American Journal of Psychology. 1904;15(1):72-101. https://doi.org/10.2307/1412159
Related Concepts (3)
Library
Publications
1
Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)
A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.
BookView source →
Frequently Asked Questions (6)
What is the Spearman correlation?
Spearman correlation is a rank-based measure from -1 to +1 of how consistently two variables, such as disease severity and costs, rise or fall together.
Source: Spearman 1904
What relationship does the Spearman correlation capture?
Spearman's coefficient measures monotonic association, the tendency for one variable to move in a single direction as the other increases, whether or not the pattern follows a straight line. Embrechts, McNeil and Straumann define the population coefficient as the linear correlation of the two variables after each is passed through its own distribution function, which makes it the correlation of the copula linking them. Any strictly increasing transformation, such as taking logs of costs, therefore leaves it unchanged. A relationship that rises and then falls, with costs highest at both ends of a severity scale, can give a value near zero, and the authors note that zero rank correlation can occur despite dependence.
Source: Embrechts et al. 2002
How is the Spearman correlation calculated?
Each variable is ranked separately, and Pearson's product-moment formula is then applied to the two sets of ranks. The NIST Dataplot reference manual replaces tied values with their average rank, so two values sharing seventh and eighth place each receive 7.5. With no ties, the same result follows from a shortcut based on the difference between each patient's two ranks, one minus six times the sum of squared differences divided by n times n squared minus one. Severity grades with only four or five levels create many ties, and there the shortcut is only approximate, so the full formula applied to the ranks gives the correct value.
Source: NIST 1997
When is the Spearman correlation used?
Patient-level costs are skewed by a few very expensive cases and many outcome scales, such as the modified Rankin scale, are ordinal, so a measure that depends only on order often suits health economic data better than Pearson's coefficient. Mukaka's guide for medical researchers advises Pearson's coefficient when both variables are normally distributed and Spearman's otherwise, describing the rank measure as less affected by outliers. Spearman's coefficient is routine in convergent validity testing of utility instruments and appears in reviews of trial-based cost-effectiveness analyses. Rank correlation is also used to link uncertain inputs in probabilistic sensitivity analysis, because ranks survive the conversion of correlated draws to beta or gamma distributions.
Source: Mukaka 2012
How does the Spearman correlation differ from the Pearson correlation?
Pearson's coefficient measures linear association on the original scale, while Spearman's applies the same formula to ranks and so measures monotonic association. Embrechts, McNeil and Straumann show that linear correlation changes under nonlinear strictly increasing transformations, such as logging costs, whereas the rank coefficient does not. For a bivariate normal distribution the two are linked by an arcsine relation and the gap between them never exceeds 0.0181, so the choice matters mainly when data are skewed or ordinal. Pearson's coefficient lends itself to variance and covariance calculations, which the authors note rank correlations do not.
Source: Embrechts et al. 2002
How is the Spearman correlation interpreted?
The sign gives the direction, with a positive value meaning that higher ranks on one variable go with higher ranks on the other and a negative value meaning the reverse. Spearman described a coefficient running from 1 for perfect correspondence, through 0, to minus 1 for perfect inverse correspondence. The value reflects only order, so a coefficient of 0.68 between severity and cost says nothing about how many pounds each grade adds, which needs a regression on the cost scale. A value near zero does not prove independence, since a U-shaped relationship can produce it, and in a small sample a sizeable coefficient can still come with a large p-value.
Source: Spearman 1904
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 29 Oct 2026
Content version: 1.0.1
Canonical Identity
- Term code
- HE-ES-SA-198
Stable URI · Machine-readable · Resolvable · CC BY 4.0
