Documentation API of the 'org.apache.commons.math3.stat.correlation.KendallsCorrelation' Java class

Class KendallsCorrelation

  • public class KendallsCorrelationextends Object
    Implementation of Kendall's Tau-b rank correlation.

    A pair of observations (x1, y1) and (x2, y2) are considered concordant if x1 < x2 and y1 < y2 or x2 < x1 and y2 < y1. The pair is discordant if x1 < x2 and y2 < y1 or x2 < x1 and y1 < y2. If either x1 = x2 or y1 = y2, the pair is neither concordant nor discordant.

    Kendall's Tau-b is defined as:

     taub = (nc - nd) / sqrt((n0 - n1) * (n0 - n2)) 


    • n0 = n * (n - 1) / 2
    • nc = Number of concordant pairs
    • nd = Number of discordant pairs
    • n1 = sum of ti * (ti - 1) / 2 for all i
    • n2 = sum of uj * (uj - 1) / 2 for all j
    • ti = Number of tied values in the ith group of ties in x
    • uj = Number of tied values in the jth group of ties in y

    This implementation uses the O(n log n) algorithm described in William R. Knight's 1966 paper "A Computer Method for Calculating Kendall's Tau with Ungrouped Data" in the Journal of the American Statistical Association.

    See Also:
    Kendall tau rank correlation coefficient (Wikipedia), A Computer Method for Calculating Kendall's Tau with Ungrouped Data

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.