Autocorrelation Times and Effective Sample Size
Successive configurations in a Markov chain are correlated. The variance of a sample mean is therefore controlled by an observable-specific integrated autocorrelation time, not by the stored configuration count alone. Estimating that time requires a finite lag window, a slow-tail assessment, and uncertainty on the estimate itself.
Required background. Markov-chain sampling defines the stationary history and update unit.
Helpful background. Markov generators, ergodicity, and sampling error explain spectral slow modes.
Autocorrelation functions and conventions
Section titled “Autocorrelation functions and conventions”Local statistical convention and regime. The history is an ordered, post-cut stationary stream indexed by one declared update unit; rejected configurations remain repeated entries. Autocorrelation times use and are first reported in stored-measurement units, then converted to elementary updates or trajectories. Every estimate retains the finite window, any tail model, stream boundaries, and uncertainty on .
For a stationary scalar history with mean , define
This page uses
For consecutive measurements much longer than the slowest relevant time,
Some literature defines as the autocorrelation time. State the convention before comparing numbers; Sokal 1997, pp. 131–192 uses the correlation-aware variance framework and makes this normalization dependence explicit.
The exponential time describes the slowest mode with nonzero overlap, . An observable with small amplitude can have modest while still carrying a long tail that matters at high precision.
The exactly soluble AR(1) benchmark
Section titled “The exactly soluble AR(1) benchmark”For
the stationary variance is one and . Hence
At , and . This fixture tests normalization, lag indexing, window selection, and coverage of the reported mean.
Windowing and slow tails
Section titled “Windowing and slow tails”The direct estimator truncates the noisy sum at :
Small biases downward by omitting positive tails; large accumulates noisy sample correlations. A self-consistent window such as balances these effects, but and the stopping rule must be stated. Plot stability versus and compare replicas or longer chains. The bias–variance tradeoff and automatic-window logic are developed in Madras and Sokal 1988 and Wolff 2004, pp. 143–153.
If a theoretically motivated slow observable or mode has decay time and amplitude estimate , a tail correction can bound
This is a model-dependent bound, not measured information. Report it separately and vary the tail assumptions.
The dependency graph shows why this choice propagates into every downstream covariance and fit.
The autocorrelation window determines the effective information entering all later stages. Shared configurations and nuisance inputs remain correlated through resampling, fitting, and extrapolation. The diagram is schematic.
Observable dependence and derived quantities
Section titled “Observable dependence and derived quantities”Different observables overlap differently with slow transition-kernel modes. Report for the target observable, scale setter, topological charge, and any important fit direction. For a vector , the relevant slow combination for is approximately ; separate component times can miss cancellation or amplification.
Measurement spacing changes units but not independent information. If every th update is stored, in stored samples may shrink roughly by , while the cost per effective sample should be quoted in elementary updates or wall-clock work.
Adversarial failure: a weak slow mode hidden by a fast monitor
Section titled “Adversarial failure: a weak slow mode hidden by a fast monitor”A sum of two independent stationary AR(1) processes can have the exactly normalized correlation
The first few lags appear fast, yet
Truncating at gives only , missing more than half the variance inflation even though the slow mode has amplitude . An implementation must recover the analytic value as chains lengthen and must fail a precision claim when its window rule cannot resolve or bound this injected tail.
Observable-level validation checklist
Section titled “Observable-level validation checklist”- Preserve configuration order, rejected states, stream boundaries, and the conversion between stored measurements and elementary updates.
- Plot and the window scan for the target observable, scale setter, sector-sensitive observable, and important derived direction.
- Recover and nominal mean coverage on repeated AR(1) histories.
- Inject the two-mode adversary above and verify that a tail study, longer replica, or declared bound prevents the underestimate from passing.
- Vary measurement spacing and confirm that expressed per elementary update is unchanged within uncertainty.
- Report , its uncertainty, the chosen window and tail rule, , and cost per effective sample for each material observable.
Common pitfalls
Section titled “Common pitfalls”Using the chain length as the sample size. The effective count can be orders of magnitude smaller and differs by observable.
Stopping the sum at the first negative estimate. Noise can create an early sign change and severe downward bias. Use a declared window and stability study.
Diagnosing only a fast observable. Energy or plaquette histories can look healthy while topology or long-distance modes remain frozen.
Learning outcomes
Section titled “Learning outcomes”- Given repeated AR(1) or two-mode synthetic histories, estimate with a stated window and demonstrate bias, variance, and interval coverage against the analytic value.
- Given target and slow-control histories, report observable-specific in update units and reject a naive independent-sample error when an unresolved tail changes the uncertainty materially.
Exercises
Section titled “Exercises”- For and AR(1) , compute .
Solution
, so .
- If configurations are stored every four updates, what happens to the unit of ?
Solution
The numerical time is then measured in stored-configuration intervals. Convert back by multiplying by four for update units; thinning does not create additional independent information.
References
Section titled “References”- Madras, N., and Sokal, A. D. (1988). The pivot algorithm: a highly efficient Monte Carlo method for the self-avoiding walk. Journal of Statistical Physics, 50, 109–186. DOI.
- Sokal, A. D. (1997). Monte Carlo methods in statistical mechanics: foundations and new algorithms. In C. DeWitt-Morette, P. Cartier, and A. Folacci (eds.), Functional Integration: Basics and Applications, pp. 131–192. Springer New York. DOI.
- Wolff, U. (2004). Monte Carlo errors with less errors. Computer Physics Communications, 156, 143–153. DOI.