1 year ago

#375885

test-img

Emmanuel Goldstein

Understanding analogy between correlation formulas in Matlab for correlation coefficient

I'm having a hard time understanding that these formulas for computing the correlation coefficient are identical (let x and y be column vectors):

  1. cov(x,y)/(std(x)*std(y))
  2. ((zscore(x)')*zscore(y))/(length(x)-1)
  3. ((x-mean(x))'*(y-mean(y)))/sqrt(sum((x-mean(x)).^2)*sum((y-mean(y)).^2 ))

Why in (3) we don't divide by N-2 yet the result is correct?

matlab

correlation

0 Answers

Your Answer

Accepted video resources