You are viewing a single comment's thread. Return to all comments →
#python n=int(input()) X=list(map(float, input().split())) Y=list(map(float, input().split())) res=[(sorted(X).index(X[i])-sorted(Y).index(Y[i]))**2 for i in range(n)] srcc=1-(6*sum(res)/(n*(n**2-1))) print(round(srcc, 3))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 7: Spearman's Rank Correlation Coefficient
You are viewing a single comment's thread. Return to all comments →