Somers' D Calculator
Association measures
- Pair counts: 1,450 concordant, 320 discordant and 410 tied on the outcome only.
- Ties on the outcome stay in the denominator of Somers' D, which is what makes it smaller than gamma for the same table.
- Computation: (1,450 - 320) / 2,180 = 0.5183, against a gamma of 0.6384.
- Somers' D result: 0.5183 with the outcome as the dependent variable.
Somers' D starts from the same concordant and discordant pair counts as Goodman-Kruskal gamma, then makes one deliberate change with large consequences: pairs tied on the dependent variable stay in the denominator. That single decision turns a symmetric association measure into an asymmetric one - D depends on which variable you call the outcome - and it pulls the value toward zero whenever the outcome has many ties, which in real survey and clinical data is most of the time.
The asymmetry is a feature. When the question is predictive - 'how well does this risk score order patients by whether the event happens?' - pairs where the event outcome is tied are genuine failures of discrimination, and they should count against the measure. Somers' D is exactly that accounting, and it is quietly ubiquitous: for a binary outcome it equals the difference between the concordance probability and its complement that underlies the area under the ROC curve (D = 2 x AUC - 1 for the standard formulation). Enter the three pair counts and the page returns D with gamma alongside, so the cost of the tied pairs is visible at a glance.
Context helps explain why a 1962 measure still earns a dedicated calculator. Somers designed D for the working reality of sociological tables, where the outcome is usually a coarse scale - three attitude categories, four education levels - and ties are not an edge case but the bulk of the data. In that world gamma's habit of discarding tied pairs discards most of the evidence. D keeps the evidence and prices it: a predictor that cannot separate respondents sharing the same outcome category is, for those pairs, simply not predicting, and the denominator says so.
Context helps explain why a 1962 measure still earns a dedicated calculator. Somers designed D for the working reality of sociological tables, where the outcome is usually a coarse scale - three attitude categories, four education levels - and ties are not an edge case but the bulk of the data. In that world gamma's habit of discarding tied pairs discards most of the evidence. D keeps the evidence and prices it: a predictor that cannot separate respondents sharing the same outcome category is, for those pairs, simply not predicting, and the denominator says so.
Context helps explain why a 1962 measure still earns a dedicated calculator. Somers designed D for the working reality of sociological tables, where the outcome is usually a coarse scale - three attitude categories, four education levels - and ties are not an edge case but the bulk of the data. In that world gamma's habit of discarding tied pairs discards most of the evidence. D keeps the evidence and prices it: a predictor that cannot separate respondents sharing the same outcome category is, for those pairs, simply not predicting, and the denominator says so.
Worked examples
Gamma's split, diluted by 410 outcome ties
(1450 · 320 · 410)
| Somers' D | 0.5183 |
| Denominator pairs | 2,180 |
| Gamma for comparison | 0.6384 |
| Pairs tied on Y | 410 |
Negative ordering with 150 ties
(268 · 512 · 150)
| Somers' D | -0.2624 |
| Denominator pairs | 930 |
| Gamma for comparison | -0.3128 |
| Pairs tied on Y | 150 |
A small table: 96 concordant, 4 discordant
(96 · 4 · 25)
| Somers' D | 0.7360 |
| Denominator pairs | 125 |
| Gamma for comparison | 0.9200 |
| Pairs tied on Y | 25 |
Why Somers' D is asymmetric
Swap the dependent and independent variables and you get a different D, because the ties that count are the ties on whichever variable is the outcome. Somers defined the measure in 1962 for precisely this directional setting: a predictor whose job is to order an outcome. Statistical packages report both directions plus a symmetric version that splits the difference; this calculator fixes the outcome as Y, the convention in most applied reporting.
The probability reading survives the change. Among pairs untied on the predictor, D is the probability that the pair is concordant minus the probability that it is discordant, with outcome-tied pairs scoring zero for the predictor. A risk model with D = 0.52, like the first worked example, orders a random comparable pair correctly far more often than incorrectly - but the outcome ties cap how high it can climb.
- Denominator: Nc + Nd + pairs tied on Y only.
- Always between gamma and zero on the same table.
- For a binary Y, Somers' D = 2 x AUC - 1.
How ties change the answer
Compare the first worked example with its gamma twin: identical concordant and discordant counts produce gamma 0.6384 but D 0.5183, because 410 outcome-tied pairs dilute the denominator. Neither number is wrong; they answer different questions. Gamma asks how lopsided the untied evidence is. D asks how well the predictor performs across every pair it was asked to order, ties included.
This is why D is the honest measure for coarse outcomes. A five-point satisfaction scale or a yes/no clinical endpoint generates ties in bulk. Reporting gamma for such data flatters the predictor by silently discarding its hardest cases. If your outcome is finely graded with few ties, the two measures nearly coincide and the choice hardly matters - the page shows both so you can see which regime you are in.
| Somers' D | Reading as a predictor |
|---|---|
| 0.00 to 0.10 | Barely orders the outcome |
| 0.10 to 0.30 | Weak ordering |
| 0.30 to 0.50 | Moderate ordering |
| 0.50 to 0.70 | Good ordering |
| Above 0.70 | Excellent ordering |
Worked examples
The opening example sets 0.5183 as the headline Somers' D, with supporting values Denominator pairs 2,180; Gamma for comparison 0.6384; Pairs tied on Y 410.
The comparison value beside it is the lesson in one line - same untied evidence, two answers, and the difference between them is exactly the weight of the tied pairs.
The opening example sets -0.2624 as the headline Somers' D, with supporting values Denominator pairs 930; Gamma for comparison -0.3128; Pairs tied on Y 150.
The comparison value beside it is the lesson in one line - same untied evidence, two answers, and the difference between them is exactly the weight of the tied pairs.
The opening example sets 0.7360 as the headline Somers' D, with supporting values Denominator pairs 125; Gamma for comparison 0.9200; Pairs tied on Y 25.
The comparison value beside it is the lesson in one line - same untied evidence, two answers, and the difference between them is exactly the weight of the tied pairs.
Somers' D vs gamma
The relationship is exact: D = gamma x (Nc + Nd) / (Nc + Nd + Ty). Everything gamma knows, D knows, deflated by the share of pairs that were actually orderable. When you read a paper reporting only gamma for a heavily tied outcome, this identity lets you reconstruct roughly what D would have been if the tie count is published - a worthwhile check before citing the result.
Choose D when one variable is plainly the outcome and prediction is the claim. Choose gamma when the relationship is genuinely symmetric - two survey scales, say - and ties are a nuisance rather than evidence. And when both variables are continuous with no ties at all, the whole family collapses to the same story Kendall's tau tells.
Somers' D in prediction and medicine
The measure's second career is in prognostic modelling, where it appears - often without its name - as the concordance probability behind the AUC. When a clinical paper reports that a risk score has an AUC of 0.76, it is reporting that Somers' D for the score against the binary outcome is 0.52, the first worked example's value. The equivalence is exact for binary outcomes and makes D the natural effect size for discrimination studies: it counts concordant pairs for the model, discordant pairs against it, and outcome-tied pairs - impossible with a binary outcome unless the score itself ties - as the neutral mass in between.
That equivalence also imports a warning from the AUC literature: discrimination is not calibration. A model can post a handsome D while its predicted probabilities are systematically too high, because D sees only orderings. Report D for what the ranking achieves, and assess the probabilities separately. The pair-count transparency of this page helps: if the outcome-tied share is huge, the ceiling on D was low before the predictor said a word.
Practical tip: when you lift pair counts from software, confirm which tie count it exports. Packages differ on whether 'ties on Y' includes pairs tied on both variables; Somers' original definition, used here, counts only pairs tied on Y but not on X in the denominator's tie term.
Somers' D in prediction and medicine
The measure's second career is in prognostic modelling, where it appears - often without its name - as the concordance probability behind the AUC. When a clinical paper reports that a risk score has an AUC of 0.76, it is reporting that Somers' D for the score against the binary outcome is 0.52, the first worked example's value. The equivalence is exact for binary outcomes and makes D the natural effect size for discrimination studies: it counts concordant pairs for the model, discordant pairs against it, and outcome-tied pairs - impossible with a binary outcome unless the score itself ties - as the neutral mass in between.
That equivalence also imports a warning from the AUC literature: discrimination is not calibration. A model can post a handsome D while its predicted probabilities are systematically too high, because D sees only orderings. Report D for what the ranking achieves, and assess the probabilities separately. The pair-count transparency of this page helps: if the outcome-tied share is huge, the ceiling on D was low before the predictor said a word.
Practical tip: when you lift pair counts from software, confirm which tie count it exports. Packages differ on whether 'ties on Y' includes pairs tied on both variables; Somers' original definition, used here, counts only pairs tied on Y but not on X in the denominator's tie term.
Somers' D in prediction and medicine
The measure's second career is in prognostic modelling, where it appears - often without its name - as the concordance probability behind the AUC. When a clinical paper reports that a risk score has an AUC of 0.76, it is reporting that Somers' D for the score against the binary outcome is 0.52, the first worked example's value. The equivalence is exact for binary outcomes and makes D the natural effect size for discrimination studies: it counts concordant pairs for the model, discordant pairs against it, and outcome-tied pairs - impossible with a binary outcome unless the score itself ties - as the neutral mass in between.
FAQs
How many pairs are tied on the outcome in the first example?
410 pairs. They join the 1,450 concordant and 320 discordant pairs in the denominator, giving 2,180 pairs in total and pulling D down to 0.5183 from gamma's 0.6384.
Why is Somers' D smaller than gamma on the same data?
Gamma's denominator counts only untied pairs; Somers' D adds the pairs tied on the dependent variable. More denominator, same numerator, smaller value - by design, because outcome ties are cases the predictor failed to order.
Which variable should be the outcome?
The one you are trying to predict or explain. This calculator treats Y as the outcome, so the ties you enter should be pairs tied on Y but not on the predictor. Swapping roles gives the other directional D.
How does Somers' D relate to the AUC?
For a binary outcome, D = 2 x AUC - 1. A D of 0.5183 corresponds to an AUC of about 0.759 - the probability that a random positive case is ranked above a random negative one.
Can Somers' D be negative?
Yes. The second worked example gives -0.2624: discordant pairs outnumber concordant ones even after the outcome ties are counted, a genuinely negative ordering.
When should I report gamma instead?
When the association is symmetric in intent - neither variable is the outcome - and you want the PRE interpretation over untied pairs only. With a clear outcome and many ties, D is the defensible choice.