= Kendall's tau-b
{c}
{title2=$\tau_b=(C-D)/\sqrt{(C+D+T_X)(C+D+T_Y)}$}
= Kendall tau-b
{c}
{synonym}
Let $C,D$ count <concordant pairs> and <discordant pairs>, and let $T_X,T_Y$ count pairs tied only on the indicated variable. Then
$$
\tau_b=\frac{C-D}{\sqrt{(C+D+T_X)(C+D+T_Y)}}
$$
when both factors in the denominator are positive. Unlike <Goodman and Kruskal's gamma>, this coefficient accounts for ties. Its absolute value is at most one: form vectors of the comparison signs for all unordered pairs. Their <inner product> is $C-D$ and their squared <norms> are the two denominator factors, in reverse variable order. The <Cauchy-Schwarz inequality> supplies the bound. A variable constant throughout gives a zero denominator, not a meaningful zero association.<Ordinal association measures in the DescTools documentation>[KendallTauB: tie-adjusted rank association and relation to cor(method="kendall")]{ref}
Back to article page