Data correlation analysis

When the data does not conform to the normal distribution

1、spearman

It reflects the direction and degree of the change trend between the two variables, the range is [-1,1], 0 is no correlation, negative number is negative correlation, positive number is positive correlation, the greater the absolute value, the stronger the correlation.
Insert picture description here
Where n refers to the number of levels, and d refers to the difference between the two columns of variable levels.

from scipy import stats
stats.probplot(Fruit_tree1, dist="norm", plot=plt)
plt.show()

Guess you like

Origin blog.csdn.net/weixin_45743162/article/details/114606393