Skip to content

Commit 8dde5a5

Browse files
Add files via upload
1 parent 66b17e3 commit 8dde5a5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎CORRELATION TESTS/kendall_rank.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Kendall's Rank Test
2+
3+
from scipy.stats import kendalltau
4+
5+
data1 = [0.873, 2.817, 0.121, -0.945, -0.055, -1.436, 0.360, -1.478, -1.637, -1.869]
6+
data2 = [0.353, 3.517, 0.125, -7.545, -0.555, -1.536, 3.350, -1.578, -3.537, -1.579]
7+
8+
stat, p = kendalltau(data1,data2)
9+
10+
print('stat = %.3f p = %.3f' % (stat,p))
11+
12+
if p > 0.05:
13+
print('Probably independent')
14+
else:
15+
print('Probably dependent')

0 commit comments

Comments
 (0)