# Autocorrelation and autocorrelation time

1. Jun 17, 2009

### tomkeus

I have Metropolis-Markov algorithm and I need to determine integrated autocorrelation time. In order to do that i have to find autocorrelation and I don't quite get what to do.

For example, after equilibration I did N sweeps, took measurements at each one and I obtained N results $$O_i,i=1...N$$, for some observable.

Definition of autocorrelation says

$$A_O (t)=\frac{\langle O_i O_{i+t}\rangle-\langle O_i\rangle^2}{\langle O_i^2\rangle-\langle O_i\rangle^2}$$

What are those averages over? Should I average over $$i$$?

2. Jun 17, 2009

### EnumaElish

3. Jun 18, 2009

### tomkeus

One more question. I have obtained N sweeps, so basically time goes from $$i=0$$ to $$i=N$$. When I want to obtain autocorrelation for lag $$t=N-1$$ i just have

$$A_O(t=N-1)=\frac{O_1 O_N-\langle O\rangle^2}{\sigma_O^2}$$

so I don't have any averaging for term $$O_1 O_N$$. Is that right or duration of my data should always be longer than maximum lag I'm calculating autocorrelation for?

4. Jun 18, 2009

### EnumaElish

If you have a single observation, the formula will still work in the arithmetical sense, but your results will not have a high level of confidence because you'd be making an inference about the population based on a single individual observation, O(1) x O(N). The longer the duration (relative to the lag), the higher will be the level of statistical confidence.