added the 10th function which calculates the autocorrelation values at different lags