We use the Ehrenfest urn model to illustrate the subtleties of error estimation in Monte Carlo simulations. We discuss how the smooth results of correlated sampling in Markov chains can fool one’s perception of the accuracy of the data and show via numerical and analytical methods how to obtain reliable error estimates from correlated samples.

1.
P.
Ehrenfest
and
T.
Ehrenfest
, “
Über zwei bekannte Einwände gegen das Boltzmannsche H-theorem
,”
Phys. Z.
8
,
311
314
(
1907
).
2.
M.
Kac
, “
Random walk and the theory of Brownian motion
,”
Am. Math. Monthly
54
,
369
391
(
1947
).
Reprinted in
Mark
Kac
,
Probability, Number Theory and Statistical Physics, Selected Papers
, edited by
K.
Baclawski
and
D.
Donsker
(
MIT Press
,
Cambridge, MA
,
1979
), pp.
240
262
.
3.
G.
Emch
and
C.
Liu
,
The Logic of Thermostatic Physics
(
Springer
,
Berlin
,
2000
), pp.
106
112
.
4.
V.
Ambegaokar
and
A.
Clerk
, “
Entropy and time
,”
Am. J. Phys.
67
,
1068
1073
(
1999
).
5.
V.
Ambegaokar
,
Reasoning About Luck: Probability and Its Uses in Physics
(
Cambridge U. P.
,
Cambridge
,
1996
), p.
174
.
6.
An exception is
H.
Gould
,
J.
Tobochnik
, and
W.
Christian
,
Introduction to Computer Simulation Methods
, 3rd ed. (
Pearson/Addison-Wesley
,
San Francisco
,
2007
), p.
427
.
7.
For text books on the Monte Carlo method, see
D. P.
Landau
and
K.
Binder
,
A Guide to Monte Carlo Simulations in Statistical Physics
(
Cambridge U. P.
,
Cambridge
,
2005
);
W.
Krauth
,
Statistical Mechanics: Algorithms and Computations
(
Oxford U. P.
,
Oxford
,
2006
);
M. E. J.
Newman
and
G. T.
Barkema
,
Monte Carlo Methods in Statistical Physics
(
Oxford U. P.
,
Oxford
,
1999
).
8.
R.
Eckhardt
, “
Stan Ulam, John von Neumann, and the Monte Carlo method
,”
Los Alamos Sci.
15
,
125
130
(
1987
).
9.
If the method had been invented only recently, the name would most likely have been “Las Vegas method.”
10.
An odd number Nhop is important because n is even after an even number of flea hops and odd after an odd number. Choosing an even value of Nhop, we would record only even entries for P[n].
11.
In the  Appendix we explicitly calculate the autocorrelation function for this model and show that it decays exponentially.
12.
A. F.
Albuquerque
 et al., “
The ALPS project release 1.3: Open-source software for strongly correlated systems
,”
J. Magn. Magn. Mater.
310
,
1187
1193
(
2007
);
F.
Alet
 et al., “
The ALPS project: Open source software for strongly correlated systems
,”
J. Phys. Soc. Jpn.
74
,
30
35
(
2005
). The source code can be obtained from ⟨alps.comp-phys.org/⟩.
13.
See, for example,
W. H.
Press
,
S. A.
Teukolsky
,
W. A.
Vetterling
, and
B. P.
Flannery
,
Numerical Recipes in C: The Art of Scientific Computing
(
Cambridge U. P.
,
Cambridge
,
1992
), Chap. 15.6.
14.
D. P.
Landau
(personal communication).
AAPT members receive access to the American Journal of Physics and The Physics Teacher as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.