Kendall's tau-b, the concordance-based rank correlation: the normalised
difference between concordant and discordant pairs, tie-corrected. It is the
third rank-correlation method alongside Pearson's r
(correlationTest, method "pearson") and Spearman's rho (method
"spearman"), and is the robust choice for ordinal or heavily-tied data and
small samples. The tau-b statistic and the normal-approximation p-value
reproduce base R stats::cor.test(method = "kendall") and
scipy.stats.kendalltau bit-for-bit.
Value
A list with statistic (tau-b), p_value (two-sided,
normal-approximation), z (the approximation's z-statistic) and n.