Somers' D — Definition, Formula & Example
Somers' D is a number between −1 and 1 that tells you how well one ranked variable predicts the ordering of another. It is asymmetric: you choose which variable predicts and which is predicted, and swapping them can change the value.
For paired observations on ordinal scales, take every pair of observations. Somers' is the number of concordant pairs minus the number of discordant pairs, divided by the number of pairs that are not tied on . Pairs tied on are excluded. Pairs tied on but not on stay in the denominator. This makes a measure of association for given . In general .
Key Formula
Where:
- = Somers' D with Y as the predicted (dependent) variable and X as the predictor
- = Number of concordant pairs: X and Y are ordered the same way
- = Number of discordant pairs: X and Y are ordered in opposite ways
- = Number of pairs tied on Y but not tied on X
How It Works
Compare every pair of observations. A pair is concordant if the observation with the higher also has the higher . It is discordant if the higher goes with the lower . Pairs tied on say nothing about how responds to a change in , so they are dropped. Pairs tied only on stay in the denominator and pull toward 0, because there changed but did not.
Worked Example
Problem: A coffee shop surveys 5 customers. Visit frequency X is coded 1 = monthly, 2 = weekly, 3 = daily. Satisfaction Y is coded 1 = low, 2 = medium, 3 = high. The responses (X, Y) are A(1, 1), B(1, 2), C(2, 2), D(2, 3), and E(3, 2). Find Somers' , where frequency predicts satisfaction. Then find for comparison.
Step 1: Classify all pairs. Concordant: AC, AD, AE, BD. Discordant: DE, because D has lower frequency but higher satisfaction. Tied on Y only: BC, BE, CE. Tied on X only: AB, CD. No pair is tied on both.
Step 2: Compute . Drop the two pairs tied on X and keep the three pairs tied on Y.
Step 3: Reverse the roles. Now pairs tied on Y are dropped and pairs tied on X stay in the denominator.
Answer: Somers' , a moderate positive association: more frequent visitors tend to be more satisfied. The reverse value differs because the two directions handle ties differently.
Why It Matters
Logistic regression output in SAS, Stata, and R often reports Somers' D next to the c statistic, which is the area under the ROC curve. Let X be the predicted probability and Y the binary outcome. Use the direction whose denominator counts the pairs with different outcomes, and count ties in X as half in c. In that setting . The other direction, , generally does not equal .
Common Mistakes
Mistake: Treating Somers' D as symmetric, or reporting a value without saying which variable is the predictor.
Correction: and drop different tied pairs, so they usually differ when there are ties. In the example they are 0.375 and about 0.429. Always state the direction. If you want a symmetric measure, use Kendall's tau-b instead.
