scipy.stats.kendalltau(x, y)

Calculates Kendall’s tau, a correlation measure for ordinal data

Kendall’s tau is a measure of the correspondence between two rankings. Values close to 1 indicate strong agreement, values close to -1 indicate strong disagreement. This is the tau-b version of Kendall’s tau which accounts for ties.

Parameters :

x : array_like

array of rankings

y : array_like

second array of rankings, must be the same length as x

Returns :

Kendall’s tau : float

The tau statistic

p-value : float

The two-sided p-value for a hypothesis test whose null hypothesis is an absence of association, tau = 0.

Previous topic


Next topic


This Page