<reponame>nishimoto/py_r_stats
#!/usr/bin/env python
import scipy.stats as st

# ここソースコード汚くて申し訳ないです…
x = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
y = [-0.164818254, -0.164818254, 1.384441177, -2.045697703, 0.729124689, 0.806055892, -0.27473996, -0.246631856, -0.264451999, -0.590037829, 0.1228073, -0.398386445, -0.176253895, 0.664458817, 1.559494059, 0.489714506, 0.088990494, -0.311195417, -0.23717168, 3.015835178, 1.03408822, 0.409314103, 0.459452128, 1.359589441, 0.206279753, -0.54820491, 1.474755721, -0.123655723, 0.8848617, -0.035948601, 2.302297546, 0.724406921, 0.490559962, 0.698741939, -0.429093469, 0.032380738, -0.980039649, -0.140993192, 0.905706141, 0.73410246, 2.949496265, 0.431357276, 0.644635366, 1.219376998, 0.505659924, 0.531485682, 0.392681807, 0.248014114, 0.976171881, 1.003150043]

# タイ補正あり
st.kendalltau(x, y) # => 0.017403048418730287
