Mathematical modeling --- Pearson correlation coefficient hypothesis test conditions

Pearson correlation coefficient hypothesis test conditions

If the data is not normally distributed, the Pearson correlation coefficient cannot be used
Insert picture description here
How to verify that the data is normally distributed?

Test data is normally distributed

1. Normal distribution JB test (large sample n>30)

Insert picture description here

  • Null hypothesis: Random variables are normally distributed
  • Alternative hypothesis: disobedience

Where p is compared with 0.05 and p is compared with 0.05p and 0 . 0 . 5 ratio than is: Suppose confidence level95% 95 \%9 5 % , so the significance level is1 − 0.95 = 0.05 1-0.95 = 0.0510.95=0.05

  • When p <significance level p <significance levelp<Significantly with sex water level ⇔ \ Leftrightarrow P value <significance level P value <significance levelP value<Significantly significant of the water level , the null hypothesis is rejected
S = skewness(x)  % 偏度
K = kurtosis(x)  % 峰度
  • Where x must be a vector
JB inspection code

Requires sample size greater than 30

[h,p] = jbtext(x,alpha)
  • h = 1 h = 1 h=1 : Reject the null hypothesis;h = 0 h = 0h=0 : The null hypothesis cannot be rejected
  • x: random variable to be tested — must be a vector
  • alpha: represents the significance level
  • p: represents the P value in probability theory and mathematical statistics
2. Shapiro-wilk Shapiro-Wilk test (small sample 3<=n<=50)
Operation in SPSS
  • Analysis --> Descriptive Statistics --> Exploration --> Graph
    Insert picture description here
  • Null hypothesis: Random variables are normally distributed
  • Alternative hypothesis: disobedience

Where p is compared with 0.05 and p is compared with 0.05p and 0 . 0 . 5 ratio than is: Suppose confidence level95% 95 \%9 5 % , so the significance level is1 − 0.95 = 0.05 1-0.95 = 0.0510.95=0.05

  • When p <significance level p <significance levelp<Significantly with sex water level ⇔ \ Leftrightarrow P value <significance level P value <significance levelP value<Significantly significant of the water level , the null hypothesis is rejectedInsert picture description here
  • The significance outlined by the red line represents our P value P valueP value
3. QQ graph to detect normal distribution

Insert picture description here

qqplot(x)
  • x is a vector to check the distribution
    Insert picture description here

If the data is not satisfied with the normal distribution

  • Pearson correlation coefficient cannot be used
  • But you can use Spearman's correlation coefficient

Reference: Mathematical Modeling Breeze Video

Guess you like

Origin blog.csdn.net/qq_43779658/article/details/107783184