Somers' D

From HandWiki

In statistics, Somers’ D, sometimes incorrectly referred to as Somer’s D, is a measure of ordinal association between two possibly dependent random variables X and Y. Somers’ D takes values between [math]\displaystyle{ -1 }[/math] when all pairs of the variables disagree and [math]\displaystyle{ 1 }[/math] when all pairs of the variables agree. Somers’ D is named after Robert H. Somers, who proposed it in 1962.[1]

Somers’ D plays a central role in rank statistics and is the parameter behind many nonparametric methods.[2] It is also used as a quality measure of binary choice or ordinal regression (e.g., logistic regressions) and credit scoring models.

Somers’ D for sample

We say that two pairs [math]\displaystyle{ (x_i,y_i) }[/math] and [math]\displaystyle{ (x_j,y_j) }[/math] are concordant if the ranks of both elements agree, or [math]\displaystyle{ x_i\gt x_j }[/math] and [math]\displaystyle{ y_i\gt y_j }[/math] or if [math]\displaystyle{ x_i\lt x_j }[/math] and [math]\displaystyle{ y_i\lt y_j }[/math]. We say that two pairs [math]\displaystyle{ (x_i,y_i) }[/math] and [math]\displaystyle{ (x_j,y_j) }[/math] are discordant, if the ranks of both elements disagree, or if [math]\displaystyle{ x_i\gt x_j }[/math] and [math]\displaystyle{ y_i\lt y_j }[/math] or if [math]\displaystyle{ x_i\lt x_j }[/math] and [math]\displaystyle{ y_i\gt y_j }[/math]. If [math]\displaystyle{ x_i=x_j }[/math] or [math]\displaystyle{ y_i=y_j }[/math], the pair is neither concordant nor discordant.

Let [math]\displaystyle{ (x_1,y_1), (x_2,y_2), \ldots, (x_n,y_n) }[/math] be a set of observations of two possibly dependent random vectors X and Y. Define Kendall tau rank correlation coefficient [math]\displaystyle{ \tau }[/math] as

[math]\displaystyle{ \tau=\frac{N_C-N_D}{n(n-1)/2}, }[/math]

where [math]\displaystyle{ N_C }[/math] is the number of concordant pairs and [math]\displaystyle{ N_D }[/math] is the number of discordant pairs. Somers’ D of Y with respect to X is defined as [math]\displaystyle{ D_{YX}=\tau(X,Y)/\tau(X,X) }[/math].[2] Note that Kendall's tau is symmetric in X and Y, whereas Somers’ D is asymmetric in X and Y.

As [math]\displaystyle{ \tau(X,X) }[/math] quantifies the number of pairs with unequal X values, Somers’ D is the difference between the number of concordant and discordant pairs, divided by the number of pairs with X values in the pair being unequal.

Somers’ D for distribution

Let two independent bivariate random variables [math]\displaystyle{ (X_1, Y_1) }[/math] and [math]\displaystyle{ (X_2, Y_2) }[/math] have the same probability distribution [math]\displaystyle{ \operatorname{P}_{XY} }[/math]. Again, Somers’ D, which measures ordinal association of random variables X and Y in [math]\displaystyle{ \operatorname{P}_{XY} }[/math], can be defined through Kendall's tau

[math]\displaystyle{ \begin{align} \tau(X,Y) &= \operatorname{E}\Bigl(\sgn(X_1-X_2)\sgn(Y_1-Y_2)\Bigr) \\ &= \operatorname{P}\Bigl(\sgn(X_1-X_2)\sgn(Y_1-Y_2)=1\Bigr) - \operatorname{P}\Bigl(\sgn(X_1-X_2)\sgn(Y_1-Y_2)=-1\Bigr), \\ \end{align} }[/math]

or the difference between the probabilities of concordance and discordance. Somers’ D of Y with respect to X is defined as [math]\displaystyle{ D_{YX} =\tau(X,Y)/\tau(X,X) }[/math]. Thus, [math]\displaystyle{ D_{YX} }[/math] is the difference between the two corresponding probabilities, conditional on the X values not being equal. If X has a continuous probability distribution, then [math]\displaystyle{ \tau(X,X)=1 }[/math] and Kendall's tau and Somers’ D coincide. Somers’ D normalizes Kendall's tau for possible mass points of variable X.

If X and Y are both binary with values 0 and 1, then Somers’ D is the difference between two probabilities:

[math]\displaystyle{ D_{YX}=\operatorname{P}(Y=1 \mid X=1)-\operatorname{P}(Y=1\mid X=0). }[/math]

Somers' D for binary dependent variables

In practice, Somers' D is most often used when the dependent variable Y is a binary variable,[2] i.e. for binary classification or prediction of binary outcomes including binary choice models in econometrics. Methods for fitting such models include logistic and probit regression.

Several statistics can be used to quantify the quality of such models: area under the receiver operating characteristic (ROC) curve, Goodman and Kruskal's gamma, Kendall's tau (Tau-a), Somers’ D, etc. Somers’ D is probably the most widely used of the available ordinal association statistics.[3] Identical to the Gini coefficient, Somers’ D is related to the area under the receiver operating characteristic curve (AUC),[2]

[math]\displaystyle{ \mathrm{AUC}=\frac{D_{XY}+1}2 }[/math].

In the case where the independent (predictor) variable X is discrete and the dependent (outcome) variable Y is binary, Somers’ D equals

[math]\displaystyle{ D_{XY}=\frac{N_C-N_D}{N_C+N_D+N_T}, }[/math]

where [math]\displaystyle{ N_T }[/math] is the number of neither concordant nor discordant pairs that are tied on variable X and not on variable Y.

Example

Suppose that the independent (predictor) variable X takes three values, 0.25, 0.5, or 0.75, and dependent (outcome) variable Y takes two values, 0 or 1. The table below contains observed combinations of X and Y:

Frequencies of
Y, X pairs
X
Y
0.25 0.5 0.75
0 3 5 2
1 1 7 6

The number of concordant pairs equals

[math]\displaystyle{ N_C = 3 \times 7 + 3 \times 6 + 5 \times 6 = 69. }[/math]

The number of discordant pairs equals

[math]\displaystyle{ N_D = 1 \times 5 + 1 \times 2 + 7 \times 2 = 21. }[/math]

The number of pairs tied is equal to the total number of pairs minus the concordant and discordant pairs

[math]\displaystyle{ N_T = (3+5+2) \times (1+7+6) - 69 - 21 = 50 }[/math]

Thus, Somers’ D equals

[math]\displaystyle{ D_{XY} = \frac{69-21}{69+21+50} \approx 0.34. }[/math]

References

  1. Somers, R. H. (1962). "A new asymmetric measure of association for ordinal variables". American Sociological Review 27 (6). doi:10.2307/2090408. 
  2. 2.0 2.1 2.2 2.3 Newson, Roger (2002). "Parameters behind "nonparametric" statistics: Kendall's tau, Somers' D and median differences". Stata Journal 2 (1): 45–64. http://www.stata-journal.com/article.html?article=st0007. 
  3. O'Connell, A. A. (2006). Logistic Regression Models for Ordinal Response Variables. SAGE Publications.