Ordinal association (asymmetric)

Somers' d Calculator

Somers' d measures ordinal association between two variables but, unlike gamma or Kendall's tau, it is asymmetric — it treats one variable as the dependent outcome and normalizes over pairs that are not tied on the independent variable. It ranges from −1 to +1.

Published by crosstabs.com · Named statistical review pending · Last updated

Calculate online — no file needed

Type or paste your observed counts. Results update live, and the link in your address bar always reproduces this exact table.

Table sizeTip: paste a block of counts straight from a spreadsheet.
Have a spreadsheet? Open the workspace →Keep this calculator for a quick table; use the workspace for files, filters, exports, and saved projects.
Total
50
50
50
Total465450150

Somers' d

0.494

d(row|col) = 0.494 · d(col|row) = 0.493

χ²(4, N = 150) = 50.32, p < .001, V = .41

All statistics
Pearson chi-squareχ² = 50.322, df = 4, p < .001
G-test (likelihood ratio)G = 50.805, df = 4, p < .001
Cramér's V0.410 (large)
Contingency coefficient (C)0.501
Lambda (symmetric / row|col / col|row)0.357 / 0.370 / 0.344
Goodman–Kruskal gamma (γ)0.685
Kendall's tau-b / tau-c0.494 / 0.493
Somers' d0.494 / 0.494 / 0.493
Theil's U0.154 / 0.154 / 0.154

What is Somers' d?

Somers' d is a rank-based measure of how strongly two ordinal variables move together. Like gamma and Kendall's tau, it is built from concordant pairs (pairs ordered the same way on both variables) and discordant pairs (pairs ordered oppositely). What sets it apart is that it is directional: you choose which variable is the dependent outcome and which is the independent predictor.

Because of that choice, Somers' d excludes pairs tied on the independent variable from its denominator. Equivalently, the denominator includes concordant pairs, discordant pairs, and pairs tied only on the dependent variable. This makes it the natural fit when one variable is genuinely an outcome you are trying to predict from the other — and it underlies the familiar relationship between rank correlation and the ROC curve's area under the curve (AUC).

Formula

Definition

d(Y|X) = (C − D) / (C + D + Ty)

C
= number of concordant pairs
D
= number of discordant pairs
Ty
= number of pairs tied on the dependent variable Y only
d(X|Y)
= swapping the roles of the variables gives the other directional version

Worked example

Worked example

Suppose 110 respondents are cross-tabulated on two ordinal variables (low / medium / high), giving this 3×3 table:

[[20, 10, 5], [10, 20, 10], [5, 10, 20]]

Counting every pair of respondents, we classify each as concordant (ordered the same way on both variables), discordant (ordered oppositely), or tied. For Somers' d we keep pairs tied on the independent variable out of the denominator. The remaining denominator contains concordant pairs, discordant pairs, and pairs tied only on the dependent variable. Working through the concordant minus discordant difference over that denominator gives:

Somers' d = 0.391.

This table is symmetric, so both directional versions — d(Y|X) and d(X|Y) — and the symmetric version all equal 0.391. That is a moderate positive ordinal association: higher values on one variable tend to go with higher values on the other.

When to use it

Use it when

  • Both variables are ordinal (ordered categories).
  • You have a clear dependent/independent direction — e.g. predicting an ordinal outcome from a predictor.
  • You are relating rank prediction to a binary outcome — Somers' d underlies the ROC AUC relationship, AUC = (Somers' d + 1) / 2.

Not the right tool when

  • Neither variable is naturally the outcome — use a symmetric measure like Kendall's tau-b or gamma.
  • The data are nominal (unordered categories) — Somers' d needs an ordering.

How to interpret it

Rule of thumb

Somers' d runs from −1 to +1: the sign gives the direction of association and the magnitude gives its strength, with 0 meaning none. Report the directional version (d(Y|X) or d(X|Y)) that matches your outcome variable.

Frequently asked questions

Somers' d vs gamma vs Kendall's tau?
All three use concordant and discordant pairs. Gamma divides by just C + D, ignoring ties entirely, and is symmetric. Kendall's tau-b uses a symmetric square-root denominator that accounts for ties on both variables. Somers' d is asymmetric: it excludes pairs tied on the independent variable from its denominator, so it is the right choice when one variable is a dependent outcome.
Is Somers' d symmetric?
No — Somers' d is asymmetric by design. It has two directional versions, d(Y|X) and d(X|Y), depending on which variable you treat as independent. A symmetric version also exists. For a symmetric table the directional and symmetric values can coincide.
How does Somers' d relate to the ROC AUC?
Directly: the area under the ROC curve equals (Somers' d + 1) / 2. So a Somers' d of 0 corresponds to an AUC of 0.5 (no discrimination) and a Somers' d of 1 corresponds to an AUC of 1.0 (perfect discrimination).

References & further reading

Try it on your own data — free, no signup

Upload a CSV or XLSX. Everything runs in your browser; your file never leaves your device.

Open the workspace →

Related calculators

← All calculators & guides