DataFrame.corr() - Pearson linear correlation calculated with the same duplicated data?

Published: 14/01/2019
DataFrame.corr() - Pearson linear correlation calculated with the same duplicated data?
Source: STACKOVERFLOW.COM

x=[0.3, 0.3, 0.3, ..., 0.3] (number of 0.3: 10) y=x What is the linear correlation coefficiency between x and y ? For this x and y , all pairs points to the same point (0.3, 0.3) . Can we say x and y are linear correlated? scipy.stats.pearsonr(x, y) will give you Yes (1.0, 0.0) . But does it make sense? However, if we change all 0.3 to 3 , scipy will give you No (NaN, 1.0) . Why is it different fr

Read more
Related news
Comment
FACEBOOK