3

I have set $x = {1,2,3,4,5}$ and set $y = {2,3,4,5,6}$. Lets say the correlation of $x$ and $y$ is $0.7$. If I then have set $z = {1,2,3,4,5,2,3,4,5,6}$, and I do autocorrelation using lag $=$ $5$, should I not get the same $0.7$? I have been doing this but I keep getting different results. I'm wondering if I'm doing something wrong, or maybe it is that they should have different results.

solartic
  • 1,045
  • 1
  • 8
  • 8
  • 2
    The first question is probably answered at http://stats.stackexchange.com/q/10947 . – whuber Jun 02 '11 at 03:13
  • 2
    Please don't ask two separate questions in one. @zbicyclist Please use answers for answers. –  Jun 02 '11 at 08:15

1 Answers1

1

denominators are different in the correlation formula and the autocorrelation formula. (moved to answer at moderator's request)

zbicyclist
  • 3,363
  • 1
  • 29
  • 34
  • 1
    The explanation for the difference is provided at http://stats.stackexchange.com/questions/10947/formula-for-autocorrelation-in-r-vs-excel/10950#10950 – Rob Hyndman Jun 03 '11 at 08:38