
Originally Posted by
jimbot Hi,
I have been trying to calculate the correlation coefficient using an excel formula (rather than the built in function). I'm not sure if I'm doing it right because I put in some data with a perfect direct correlation (to check) it came out 1 using the built in but .953923 using my formula. Here's how I went about it (with apologies for the way I write the formulae - it's kind of quasi Excel syntax, I hope that mathematicians can understand it:
r= Sxy / SqrRt(Sxx.Syy)
=(((SumX) (SumY))/n) / (SumX^2 - (SumX^2/n)) (SumY^2 - (SumY^2/n)))
I checked the formula itself and it does just what I think it should