pandas (eight) Cumulative statistical analysis

related analysis

Two variables, X, Y

Variable X Variable Y Correlation
Increases Increases Positive correlation
Increases Reduced Negative correlation
Increases Ignore irrelevant

Seeking association

  • 协方差
    方差Is used to measure the extent of a single random discrete variable
    Here Insert Picture Description
    协方差is generally used to characterize the degree of similarity of two random variables
    Here Insert Picture Description
Covariance> 0 X, Y positive correlation
Covariance <0 X, Y negative correlation
Covariance = 0 X, Y independent and unrelated
  • pearson相关系数

Here Insert Picture Description
r in the range [-1, 1]

r value relativity
0.8-1.0 Extremely relevant
0.6-0.8 Strong correlation
0.4-0.6 Moderate related
0.2-0.4 Weak correlation
0-0.2 No

Correlation analysis function

method Explanation
.These () Covariance matrix
.corr() Calculating a correlation coefficient matrix, Pearson, Spearman, Kendall et coefficient

Here Insert Picture Description
Here Insert Picture Description

He published 192 original articles · won praise 34 · views 120 000 +

Guess you like

Origin blog.csdn.net/a6864657/article/details/103835611