11.2.4 Autocorrelation

lag1_autocorrelation( x)
Computes the lag-1 autocorrelation of the dataset x

$\displaystyle a_1 = \frac{\sum^{n}_{i = 1} (x_{i} - \hat\mu) (x_{i-1} - \hat\mu)}{ \sum^{n}_{i = 1} (x_{i} - \hat\mu) (x_{i} - \hat\mu)}$ (11.11)

lag1_autocorrelation_m( x, mean)
Computes the lag-1 autocorrelation of the dataset x using the given value of the mean mean.

$\displaystyle a_1 = \frac{\sum_{i = 1}^{n} (x_{i} - \var{mean}) (x_{i-1} - \var{mean})}{ \sum^{n}_{i = 1} (x_{i} - \var{mean}) (x_{i} - \var{mean})}$ (11.12)