Ordinal association (asymmetric)
Somers' d Calculator
Somers' dmeasures ordinal association between two variables but, unlike gamma or Kendall's tau, it is asymmetric — it treats one variable as the dependent outcome and counts ties only on the independent variable. It ranges from −1 to +1.
Reviewed by the crosstabs.com methods team · Last updated
Run this 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 →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 only adjusts for ties on the independent 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 + Tx)
- C
- = number of concordant pairs
- D
- = number of discordant pairs
- Tx
- = number of pairs tied on the independent variable X 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 tied pairs only on the independent variable in the denominator. 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 counts ties only on the independent variable, 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
- Somers, R. H. (1962). A New Asymmetric Measure of Association for Ordinal Variables. American Sociological Review.
- Somers' D — Wikipedia
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 →