Skip to content
LESSON NOTES · 03

Ising sampling and honest error bars

Prerequisites: Metropolis–Hastings; covariance

1. Count each Ising bond once

On a square lattice use \(s_i=\pm1\), ferromagnetic \(J>0\) and field \(b\) in energy units. Flipping one spin reverses only neighbor bonds and its field term. Uniform site selection makes the proposal symmetric. One sweep is \(N\) attempted flips, not necessarily accepted flips.

\[ E=-J\sum_{\langle ij\rangle}s_is_j-b\sum_i s_i,\quad\Delta E=2s_i\left(J\sum_{j\in nn(i)}s_j+b\right). \]

Ising sampling and honest error bars — schematic under the stated model assumptions

Teaching schematic drawn from the equations or algorithm steps in this lesson; not measured data.

Worked flip probability

At zero field with four neighbors aligned, \(\Delta E=8J\). If \(\beta J=1/2\), symmetric Metropolis acceptance is \(e^{-4}=0.0183\). This is an analytical value, not a simulation result. Near transitions local updates may mix slowly even with apparently reasonable acceptance.

2. Expand the variance into all sample pairs

For a stationary finite-variance sequence, define normalized lag covariance \(\rho_k\). In the variance of its sum, lag \(k\) has \(M-k\) pairs. This yields the finite-chain expression. A drifting or stuck series does not automatically meet these assumptions.

\[ \rho_k=\frac{\operatorname{Cov}(A_s,A_{s+k})}{\sigma_A^2},\quad\operatorname{Var}(\bar A_M)=\frac{\sigma_A^2}{M}\left[1+2\sum_{k=1}^{M-1}(1-k/M)\rho_k\right]. \]

3. State your autocorrelation convention

For a sufficiently long chain with summable correlations, define \(g=2\tau_{int}\) with \(\tau_{int}=1/2+\sum\rho_k\). Some texts call \(g\) the integrated autocorrelation time instead. Effective sample size and standard error depend on this convention. Different observables have different \(g\), and negative correlations can make \(g<1\).

\[ g=1+2\sum_{k\geq1}\rho_k,\quad M_{eff}=M/g,\quad\operatorname{SE}(\bar A)\simeq\sigma_A/\sqrt{M_{eff}}. \]

Worked correlation diagnostic

For the analytic model \(\rho_k=0.8^k\), \(g=1+2(0.8/0.2)=9\). A 9000-step stationary series therefore has about 1000 independent-sample equivalents. The naive error \(\sigma/\sqrt{9000}\) is three times too small. No stochastic trace is claimed to have been measured.

Practical checks and symmetry

Discard warm-up, compare dispersed starts, use long blocks and check stabilized block errors. High acceptance is not proof of exploration; thinning cannot cure nonconvergence. At zero field a finite ergodic system has \(\langle m\rangle=0\) by symmetry even below the transition. A short trapped run can show nonzero magnetization; name \(m\) or \(|m|\) explicitly. Do energy and magnetization automatically share error inflation?

Answer and reasoning

No, autocorrelation is observable dependent.

References and further reading

Derivations and numerical examples here are original teaching constructions, not copied passages or reported research data.


← Previous lesson · Pathway overview