-
Notifications
You must be signed in to change notification settings - Fork 10
Kendall's tau
Maurice HT Ling edited this page Aug 13, 2021
·
4 revisions
Purpose: To measure the strength of relationship between 2 variables.
Null hypothesis: Correlation coefficient = 0
Alternate hypothesis: Correlation coefficient ≠ 0.
Note: Kendall's tau is a correlation measure for ordinal data; hence, a non-parametric measure. Values close to 1 indicate strong agreement, and values close to -1 indicate strong disagreement.
Code:
>>> from scipy import stats
>>> X = [1, 2, 3, 4, 5]
>>> Y = [5, 6, 7, 8, 7]
>>> result = stats.kendalltau(X, Y)
>>> print("Kendall's tau = %.3f" % result.correlation)
Kendall's tau = 0.738
>>> print("p-value = %.3f" % result.pvalue)
p-value = 0.077
Reference
- Kendall MG. 1938. A New Measure of Rank Correlation. Biometrika 30(1/2), 81-93.
- Kendall MG. 1945. The treatment of ties in ranking problems. Biometrika 33(3), 239-251.
Copyright (c) 2008-2024, Maurice HT Ling
Refereed Publications and Technical Reports
Abstracts and Other Un-Refereed Works
Autobiographic Verses (Poems that I wrote) and My Sayings