Post on 01-Jan-2016
9. Convergence and 9. Convergence and Monte Carlo ErrorsMonte Carlo Errors
9. Convergence and 9. Convergence and Monte Carlo ErrorsMonte Carlo Errors
Measuring Convergence to
Equilibrium• Variation distance
1 2 1 2
1 2
|| || max| ( ) ( )|
1 | ( ) ( ) |
2
A
i
P P P A P A
P i P i
where P1 and P2 are two probability distributions, A is a set of states, i is a single state.
Eigenvalue Problem• Consider the matrix S defined by
[S]ij = pi½ W(i->j) pj
-½
then S is real and symmetric and eigenvalues of S satisfy|n| ≤ 1
• One of the eigenvalue must be 0=1 with eigenvector pj
½.
Spectrum Decomposition
• Then we haveUTSU = Λ, or S = U Λ UT
where Λ is a diagonal matrix with diagonal elements k and U is orthonormal matrix, U UT = I.
• W can be expressed in U, P, and Λ asW = P-½UΛUTP½
Evolution in terms of eigen-states
• Pn= P0Wn
= P0 P-½UΛUTP½ P-½UΛUTP½…
= P0 P-½UΛnUTP½
• In component form, this means
Pn(j) = ∑iP0(i) pi
-½pj½∑
kk
n uikujk
Discussion• In the limit n goes to ∞,
Pn(j) ≈ ∑iP0(i) pi-½pj
½ ui0uj0 = pj
• The leading correction to the limit isPn(j) ≈ pj + a 1
n = pj + a e-n/
Exponential Correlation Time
• We define by the next largest eigenvalue
= - 1/log 1
This number characterizes the theoretical rate of convergence in a Markov chain.
Measuring Error
• Let Qt be some quantity of interest at time step t, then sample average is
QN = (1/N) ∑t Qt
• We treat QN as a random variable. By central limit theorem, QN is normal distributed with a mean <QN>=<Q> and variance σN
2 = <QN2>-<QN>2.
<…> standards for average over the exact distribution.
Confidence Interval
• The chance that the actual mean <Q> is in the interval[ QN – σN, QN + σN ]is about 68 percents.
• σN cannot be computed (exactly) in a single MC run of length N.
Estimating Variance
22
1, 1
int
1
var( ) ( ) 1
var( )
N
N t s t st s
N
t N
Q Q Q QN
tQf t
N N
QN
The calculation of var(Q) = <Q2>-<Q>2 and int can be done in a single run of length N.
Error Formula• The above derivation gives the famous
error estimate in Monte Carlo as:
where var(Q) = <Q2>-<Q>2 can be estimated by sample variance of Qt.
intvar( ) 1Error N
QN N
Time-Dependent Correlation function and integrated correlation
time
• We define
and
22( ) s s t s s t
s s
Q Q Q Qf t
Q Q
int0, 1, 2,... 1
( ) 1 2 ( )t t
f t f t
Circular Buffer for Calculating f(t)
Qt, Current time t
Qt-1 Previous time t-1
Earliest time t-(M-1)
We store the values of Qs of the previous M-1 times and the current value Qt
Qs
An Example of f(t)
Time-dependent correlation function for 3D Ising at Tc on a 163 lattice; Swendsen-Wang dynamics.
From J S Wang, Physica A 164 (1990) 240.
Efficient Method for Computing int
We compute int by the formula
int = N σN2/var(Q)
For small value N and then extrapolating N to ∞.
From J S Wang, O Kozan and R H Swendsen, Phys Rev E 66 (2002) 057101.
Exponential and integrated correlation
times
where 1 < 1 is the second largest eigenvalue of W matrix. This result says that exponential correlation time (=-1/log1) is related to the largest integrated correlation time.
1int
1
1sup ( )
1 Q
Q
Critical Slowing Down
Tc T
The correlation time becomes large near Tc. For a finite system (Tc) Lz, with dynamical critical exponent z ≈ 2 for local moves
Relaxation towards Equilibrium
Time t
Magnetization m
T < Tc
T = Tc
T > Tc
Schematic curves of relaxation of the total magnetization as a function of time. At Tc relaxation is slow, described by power law:
m t -β/(zν)
Jackknife Method• Let n be the number of independent
samples• Let c be some estimate using all n
samples• Let ci be the same estimate but using n-
1 samples, with i-th sample removed• Then Jackknife error estimate is
2
1
( )n
J ii
c c