9

Autocorrelation is defined as this:

$$\widehat{\rho}_{k} = \frac{\sum_{t=k+1}^{T}{\left(r_{t}-\overline{r}\right)\left(r_{t-k} - \overline{r}\right)}}{\left(\sum_{t=1}^{T}{r_{t} - \overline{r}}\right)^{2}}$$

Why is it necessary to subtract from the mean?

Is it not sufficient to divide the value at $k+1$ by the value at $k$ instead?

$$\rho = \text{mean}\left(\frac{r_{k + 1}}{r_{k}}\right)$$

Alexis
  • 26,219
  • 5
  • 78
  • 131
Dylan Kerler
  • 261
  • 1
  • 9
  • 11
    Look at the definition of correlation. It deals with differences from the means. Autocorrelation is just a special case. – Richard Hardy Jan 02 '22 at 17:04
  • 10
    I wonder what happens with your proposed formula whenever $r_k=0.$ – whuber Jan 02 '22 at 17:36
  • 2
    Some good answers are provided but one thing I highly suggest to all students asking questions similar to this is to give it a try. See what you end up with. Make up some fake data and see what you get with both methods - does one give an unexpected answer in certain situations? Now this doesn't always get to the root of the problem but it can help provide some guidance to help one figure out why certain steps are taken and what potentially can go wrong if those steps aren't taken. – Dason Jan 03 '22 at 15:39

2 Answers2

15

Let's start from the basics. Variance tells us about the variability around the mean

$$ \operatorname{Var}(X) = E[(X - E[X])^2] $$

You can generalize this concept to two variables, the covariance

$$ \operatorname{Cov}(X, Y) = E[(X - E[X]) (Y - E[Y])] $$

where variance is a special case of it

$$ \operatorname{Cov}(X, X) = E[(X - E[X])^2] $$

Correlation is just a normalized covariance so that it is bounded between -1 and 1,

$$ \operatorname{Corr}(X, Y) = \frac{\operatorname{Cov}(X, Y)}{\sigma_X \sigma_Y} $$

Autocorrelation is just a special case of correlation.

Yes, you can calculate the expected value of the ratio of two variables and in some case, it might be a meaningful statistic, but it doesn't anymore measure the "spread" or "co-spread" of the variables.

You may be interested in reading the How would you explain covariance to someone who understands only the mean? thread.

Tim
  • 108,699
  • 20
  • 212
  • 390
  • 1
    I would not say covariance is about co-spread, as that would be more like $E(|X-\mu_X|)(|Y-\mu_Y|)$ rather than $E(X-\mu_X)(Y-\mu_Y)$. (In conditional terms, it would be volatility comovement.) – Richard Hardy Jan 02 '22 at 18:48
  • 2
    @RichardHardy agree that the wording is loose, I decided not to define it but to redirect to the linked thread instead. – Tim Jan 02 '22 at 18:58
  • @TooTea oh, right, thanks for pointing this one! – Tim Jan 03 '22 at 14:36
  • So is it correct to say that the reason for subtracting the mean and dividing by the standard deviation is so that the autocorrelation score is normalized? (I noticed that in the case where the mean is zero, it simplifies to AutoCorr(X, Y) = X / Y) – Dylan Kerler Jan 03 '22 at 18:39
  • 1
    @DylanKerler we subtract the mean to see how far are the values from the mean, how much they vary. With covariance this gives you sign: how many values below mean in X occur together with values below mean for Y, etc. Check the linked thread. – Tim Jan 03 '22 at 22:55
12

Similar to simple covariance and correlation, the mean is subtracted while estimating the autocorrelation (autocovariance or cross-correlation and cross-covariance).

The following is the covariance of $X$ and $Y$ for example, where the means of the random variables are subtracted from the random variable itself:

$$\operatorname{cov}(X,Y)=\mathbb E[(X-\mathbb E[X])(Y-\mathbb E[Y])]$$

Your suggestion corresponds to something like $\mathbb E[X/Y]$, which is fundamentally different than the covariance or the correlation.

In time-series literature, we usually see the generative equation similar to $$x_t=\rho x_{t-1}+\epsilon_t$$

However, not all time series are generated this way, so ignoring the noise term and having a rough estimate like $\rho\approx x_t/x_{t-1}$ may not work well, even in this type of series, let alone the general family of random processes.

gunes
  • 49,700
  • 3
  • 39
  • 75