**'org.apache.commons.math3.stat.correlation.KendallsCorrelation'**Java class

org.apache.commons.math3.stat.correlation

## Class KendallsCorrelation

- java.lang.Object
- org.apache.commons.math3.stat.correlation.KendallsCorrelation

public class KendallsCorrelationextends Object

Implementation of Kendall's Tau-b rank correlation.A pair of observations (x

_{1}, y_{1}) and (x_{2}, y_{2}) are considered*concordant*if x_{1}< x_{2}and y_{1}< y_{2}or x_{2}< x_{1}and y_{2}< y_{1}. The pair is*discordant*if x_{1}< x_{2}and y_{2}< y_{1}or x_{2}< x_{1}and y_{1}< y_{2}. If either x_{1}= x_{2}or y_{1}= y_{2}, the pair is neither concordant nor discordant.Kendall's Tau-b is defined as:

tau

_{b}= (n_{c}- n_{d}) / sqrt((n_{0}- n_{1}) * (n_{0}- n_{2}))where:

- n
_{0}= n * (n - 1) / 2 - n
_{c}= Number of concordant pairs - n
_{d}= Number of discordant pairs - n
_{1}= sum of t_{i}* (t_{i}- 1) / 2 for all i - n
_{2}= sum of u_{j}* (u_{j}- 1) / 2 for all j - t
_{i}= Number of tied values in the i^{th}group of ties in x - u
_{j}= Number of tied values in the j^{th}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.

- n

**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.