{
  "slug": "spearman-rank-correlation",
  "term": "Spearman rank correlation",
  "aliases": [
    "Spearman's rho",
    "Spearman rank-order correlation",
    "SRCC"
  ],
  "definition": "Spearman rank correlation measures monotonic association by taking the Pearson correlation of paired ranks, using average ranks for ties.",
  "note": "A coefficient near +1 indicates increasing rank agreement and one near -1 decreasing rank agreement; zero does not establish independence. Equal observations receive the average of their occupied rank positions. A constant input has no rank variance, so its correlation is undefined rather than zero. [scipy-spearman] [scipy-rankdata] [r-cor]\n\nFor a concrete counterexample, take six equally likely invented states with X = (-3,-2,-1,1,2,3) and Y = (1,0,0,0,0,1). Average Y ranks are (11/2,5/2,5/2,5/2,5/2,11/2). Centered rank products sum to zero, although Y is determined by abs(X) = 3. P(Y=1) = 1/3 while P(Y=1 | X=3) = 1. This is a constructed population, not SMART telemetry or a validated predictor. [hesela-rank-example]\n\nHan et al. use SRCC to compare SMART attributes with grouped SSD failures. Their section 3 implication from zero SRCC to independence is too strong; section 4.3's reported coefficients are not changed by this mathematical counterexample. Rank association alone neither supplies an alert threshold nor evaluates nonlinear predictive performance. [han-fast21]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "A small coefficient cannot rule out nonmonotonic dependence or establish that a predictor is useless; a large coefficient does not establish causation.",
      "citationIds": [
        "scipy-spearman",
        "hesela-rank-example"
      ]
    },
    {
      "text": "Repeated observations from one drive are not automatically independent samples; define the observation unit and evaluation split before interpreting predictive results.",
      "citationIds": [
        "hesela-prediction"
      ]
    }
  ],
  "related": [
    "matthews-correlation-coefficient",
    "probability-calibration",
    "class-prevalence",
    "precision",
    "recall",
    "grouped-cross-validation",
    "temporal-validation"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-04",
  "citations": [
    {
      "id": "scipy-spearman",
      "title": "SciPy: spearmanr, monotonic rank association and undefined constant inputs",
      "url": "https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.spearmanr.html",
      "accessed": "2026-11-04"
    },
    {
      "id": "scipy-rankdata",
      "title": "SciPy: rankdata, average tie ranks",
      "url": "https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rankdata.html",
      "accessed": "2026-11-04"
    },
    {
      "id": "r-cor",
      "title": "R stats: cor, rank-based correlation",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/cor.html",
      "accessed": "2026-11-04"
    },
    {
      "id": "han-fast21",
      "title": "Han et al. An In-Depth Study of Correlated Failures in Production SSD-Based Data Centers. FAST 2021, sections 3 and 4.3",
      "url": "https://www.usenix.org/system/files/fast21-han.pdf",
      "accessed": "2026-11-04"
    },
    {
      "id": "hesela-rank-example",
      "title": "Hesela: exact synthetic rank-association counterexample, method and limitations",
      "url": "https://hesela.dev/research/rank-association/README.md",
      "accessed": "2026-11-04"
    },
    {
      "id": "hesela-prediction",
      "title": "Hesela: evaluation units and temporal/device splits in failure prediction",
      "url": "https://hesela.com/analyses/ml-disk-failure-prediction/",
      "accessed": "2026-11-04"
    }
  ]
}
