Equivalence of correlation formulas?

40 Views Asked by At

Is this correlation $$r=\frac{\sum_{i=1}^nx_iy_i-\overline y\sum_{i=1}^nx_i}{\sqrt{(\sum x_i^2-\overline x\sum_{i=1}^nx_i)(\sum y_i^2-\overline y\sum_{i=1}^ny_i)}}$$ equivalent to the correlation of Mathematicaenter image description here

??

I new with this topics and I have a bunch of data and I need to compute the correlation, so I was just trying to find some software to make evertyhing easier.

1

There are 1 best solutions below

0
On BEST ANSWER

Comment: Suggest you investigate R statistical software.

Available without cost from r-project.org. Lots of blogs, etc. online to offer help.

Don't try to learn 'everything' at once. Learn how to use R for each new topic as the need arises.

Brief demo:

x = rnorm(20, 100, 15);  e = rnorm(20, 0, 5);  y = x + e
cor(x,y)
[1] 0.9268968
summary(x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  69.60   94.03  102.70  104.20  114.80  135.50 
sd(x)
[1] 15.83722

plot(x, y, pch=19)

enter image description here

hist(x, col="skyblue2", label=T, ylim=c(0,8))
rug(x)

enter image description here