Markov Chain Monte Carlo Simulations and Their Statistical Analysis An Overview

Similar documents
Tutorial on Markov Chain Monte Carlo Simulations and Their Statistical Analysis (in Fortran)

INTRODUCTION TO MARKOV CHAIN MONTE CARLO SIMULATIONS AND THEIR STATISTICAL ANALYSIS

Generalized Ensembles: Multicanonical Simulations

Lecture V: Multicanonical Simulations.

arxiv:cond-mat/ v1 [cond-mat.stat-mech] 19 Oct 2004

Their Statistical Analvsis. With Web-Based Fortran Code. Berg

Monte Caro simulations

Physics 115/242 Monte Carlo simulations in Statistical Physics

Advanced Monte Carlo Methods Problems

Monte Carlo. Lecture 15 4/9/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

Lecture 8: Computer Simulations of Generalized Ensembles

General Construction of Irreversible Kernel in Markov Chain Monte Carlo

Trivially parallel computing

Markov Processes. Stochastic process. Markov process

A = {(x, u) : 0 u f(x)},

Monte Carlo and cold gases. Lode Pollet.

Computational Physics (6810): Session 13

Classical Monte Carlo Simulations

Monte Carlo Simulation of the 2D Ising model

Numerical integration and importance sampling

Numerical methods for lattice field theory

Critical Dynamics of Two-Replica Cluster Algorithms

Population Annealing: An Effective Monte Carlo Method for Rough Free Energy Landscapes

Introduction to Machine Learning CMU-10701

A =, where d n w = dw

Directional Ordering in the Classical Compass Model in Two and Three Dimensions

8 Error analysis: jackknife & bootstrap

Random Walks A&T and F&S 3.1.2

Multicanonical methods

Quantum Monte Carlo. Matthias Troyer, ETH Zürich

Monte Carlo Simulations

Understanding Molecular Simulation 2009 Monte Carlo and Molecular Dynamics in different ensembles. Srikanth Sastry

Numerical Analysis of 2-D Ising Model. Ishita Agarwal Masters in Physics (University of Bonn) 17 th March 2011

Multi-Ensemble Markov Models and TRAM. Fabian Paul 21-Feb-2018

Guiding Monte Carlo Simulations with Machine Learning

Multicanonical parallel tempering

Monte Carlo Simulation of the Ising Model. Abstract

Cluster Algorithms to Reduce Critical Slowing Down

ABSTRACT. We measure the efficiency of the Metropolis, Swendsen-Wang, and Wolff algorithms in

ICCP Project 2 - Advanced Monte Carlo Methods Choose one of the three options below

Graphical Representations and Cluster Algorithms

CS242: Probabilistic Graphical Models Lecture 7B: Markov Chain Monte Carlo & Gibbs Sampling

Wang-Landau sampling for Quantum Monte Carlo. Stefan Wessel Institut für Theoretische Physik III Universität Stuttgart

Parallelization of the Wolff Single-Cluster Algorithm

Hanoi 7/11/2018. Ngo Van Thanh, Institute of Physics, Hanoi, Vietnam.

Monte Carlo Methods for Computation and Optimization (048715)

If we want to analyze experimental or simulated data we might encounter the following tasks:

Monte Carlo study of the Baxter-Wu model

Statistical Thermodynamics and Monte-Carlo Evgenii B. Rudnyi and Jan G. Korvink IMTEK Albert Ludwig University Freiburg, Germany

Kinetic Monte Carlo (KMC) Kinetic Monte Carlo (KMC)

Bayesian Methods for Machine Learning

arxiv: v2 [physics.data-an] 2 May 2016

CSC 2541: Bayesian Methods for Machine Learning

Asymptotics and Simulation of Heavy-Tailed Processes

A New Method to Determine First-Order Transition Points from Finite-Size Data

1. Exploratory Data Analysis

Intro. Each particle has energy that we assume to be an integer E i. Any single-particle energy is equally probable for exchange, except zero, assume

Basics of Statistical Mechanics

AGuideto Monte Carlo Simulations in Statistical Physics

Markov Chain Monte Carlo Method

Markov Chain Monte Carlo The Metropolis-Hastings Algorithm

Invaded cluster algorithm for Potts models

CE 530 Molecular Simulation

3.320 Lecture 18 (4/12/05)

Random numbers and generators

Optimized multicanonical simulations: A proposal based on classical fluctuation theory

4. Cluster update algorithms

LECTURE 10: Monte Carlo Methods II

Advanced sampling. fluids of strongly orientation-dependent interactions (e.g., dipoles, hydrogen bonds)

Monte Carlo Methods in High Energy Physics I

MONTE CARLO METHODS IN SEQUENTIAL AND PARALLEL COMPUTING OF 2D AND 3D ISING MODEL

J ij S i S j B i S i (1)

6 Reweighting. 6.1 Reweighting in Monte Carlo simulations

The XY-Model. David-Alexander Robinson Sch th January 2012

Chapter 7. The worm algorithm

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods: Markov Chain Monte Carlo

Data Analysis I. Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK. 10 lectures, beginning October 2006

Any live cell with less than 2 live neighbours dies. Any live cell with 2 or 3 live neighbours lives on to the next step.

2m + U( q i), (IV.26) i=1

Pattern Recognition and Machine Learning. Bishop Chapter 11: Sampling Methods

Copyright 2001 University of Cambridge. Not to be quoted or copied without permission.

Self-learning Monte Carlo Method

4 Monte Carlo Methods in Classical Statistical Physics

Population annealing study of the frustrated Ising antiferromagnet on the stacked triangular lattice

Monte Carlo integration (naive Monte Carlo)

Parallel Tempering And Adaptive Spacing. For Monte Carlo Simulation

(# = %(& )(* +,(- Closed system, well-defined energy (or e.g. E± E/2): Microcanonical ensemble

Stat 516, Homework 1

Monte Carlo Simulations in Statistical Physics

s-scattering Length by Bold DiagMC

Metropolis Monte Carlo simulation of the Ising Model

How the maximum step size in Monte Carlo simulations should be adjusted

Topological defects and its role in the phase transition of a dense defect system

PY 502, Computational Physics, Fall 2017 Monte Carlo simulations in classical statistical physics

Physics 509: Error Propagation, and the Meaning of Error Bars. Scott Oser Lecture #10

17 : Markov Chain Monte Carlo

Overcoming the slowing down of flat-histogram Monte Carlo simulations: Cluster updates and optimized broad-histogram ensembles

Computer Vision Group Prof. Daniel Cremers. 10a. Markov Chain Monte Carlo

Part I. Experimental Error

arxiv:cond-mat/ v1 [cond-mat.stat-mech] 5 Jun 2003

Transcription:

Markov Chain Monte Carlo Simulations and Their Statistical Analysis An Overview Bernd Berg FSU, August 30, 2005

Content 1. Statistics as needed 2. Markov Chain Monte Carlo (MC) 3. Statistical Analysis of MC Data and Advanced MC. Link to computer code at www.hep.fsu.edu/ berg. 1

Probability Distributions and Sampling In N experiments we may find an event A to occur n times. definition of the probability of the event is P (A) = lim N n N. The frequency Let P (a, b) be the probability that x r [a, b] where x r is a random variable drawn in the interval (, + ) with a probability density f(x) > 0. Then, P (a, b) = b a dx f(x) and f(x) = lim y x P (y, x) x y. The (cumulative) distribution function of the random variable x r is defined as F (x) = P (x r x) = x f(x ) dx. 2

For uniform probability distribution between [0, 1), u(x) = { 1 for 0 x < 1; 0 elsewhere. The corresponding distribution function is U(x) = x u(x ) dx = { 0 for x < 0; x for 0 x 1; 1 for x > 1. It allows for the construction of general probability distributions. Let y = F (x) = x f(x ) dx. For y r being a uniformly distributed random variable in [0, 1) x r = F 1 (y r ) is then distributed according to the probability density f(x). 3

Example Mapping of the uniform to the Cauchy distribution. 1 0.8 Uniform y r 0.6 0.4 0.2 0-10 -5 0 5 10 Cauchy x r 4

Pseudo Random Numbers and Computer Code It is sufficient to generate uniform (pseudo) random numbers. Control your random number generator! Therefore, a portable, well-tested generator should be choosen. My code supplies a generator by Marsaglia and collaborators whith an approximate period of 2 110. How to get it? Download STMC.tgz which unfolds under (Linux) tar -zxvf STMC.tgz into the directory structure shown below. STMC Assignments ForLib ForProg ForProc Work a0102_02 a0102_03...... a0103_01...... 5

Routines: rmaset.f sets the initial state of the random number generator. ranmar.f provides one random number per call (function version rmafun.f). rmasave.f saves the final state of the generator. Initial seeds 1801 iseed1 29527 and 9373 iseed2 20708. give independent series (useful for parallel processing). Illustration: Assignment a0102 02. RANMAR INITIALIZED. MARSAGLIA CONTINUATION. idat, xr = 1 0.116391063 idat, xr = 1 0.495856345 idat, xr = 2 0.96484679 idat, xr = 2 0.577386141 idat, xr = 3 0.882970393 idat, xr = 3 0.942340136 idat, xr = 4 0.420486867 idat, xr = 4 0.243162394 extra xr = 0.495856345 extra xr = 0.550126791 6

Confidence Intervals and Sorting One defines q-tiles (also quantiles or fractiles) x q of a distribution function by F (x q ) = q. An example is the median x1. The probability content of the confidence interval 2 [x q, x 1 q ] is p = 1 2q. Example: Gaussian or normal distribution of variance σ 2 : [ nσ, +nσ] p = 0.6827 for n = 1, p = 0.9545 for n = 2. The peaked distribution function F q (x) = { F (x) for F (x) 1 2, 1 F (x) for F (x) > 1 2. 7

provides a graphical visualization of probability intervals of such a distribution: 0.5 Gaussian F q (x)=gau - qdf(x) 0.4 Fq 0.3 0.2 0.1 0-3 -2-1 0 1 2 3 x Sorting allows for an empirical estimate. Assume we generate n random number x 1,..., x n. We may re-arrange the x i in increasing order: x π1 x π2... x πn where π 1,..., π n is a permutation of 1,..., n. 8

An estimator for the distribution function F (x) is then the empirical distribution function F (x) = i n for x π i x < x πi+1, i = 0, 1,..., n 1, n with the definitions x π0 = and x πn+1 = +. To calculate F (x) one needs an efficient way to sort n data values in ascending (or descending) order. In the STMC package this is provided by a heapsort routine, which arrives at the results in O(n log 2 n) steps. Example: Gaussian distribution in assignment a0106 02 (200 and 20,000 data). Central Limit Theorem: Convergence of the Sample Mean Gaussian σ 2 (x r ) = σ2 (x r ) N for x = 1 N N x i. i=1 9

Binning We group NDAT data into NBINS bins, where each binned data point is the arithmetic average of NBIN = [NDAT/NBINS] (Fortran integer division.) original data points. Should not be confused with histogramming! Preferably NDAT is a multiple of NBINS. The purpose of the binning procedure is twofold: 1. When the the central limit theorem applies, the binned data will become practically Gaussian when NBIN is large enough. This allows to apply Gaussian error analysis methods even when the original are not Gaussian. 2. When data are generated by a Markov process subsequent events are correlated. For binned data these autocorrelations are reduced and can be neglected, once NBIN is sufficiently large. 10

Example: 7 6 Normal distribution Binned data 5 4 H 3 Figure 1: 2 1 0 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 Comparison of a histogram of 500 binned data with the normal distribution p (120/π) exp[ 120 (x 1/2) 2 ]. Each binned data point is the average of 20 uniformly distributed random numbers. Assignment a0108 02. x r 11

Gaussian Difference Test One is often faced with comparing two different empirical estimates of some mean. How large must D = x y be in order to indicate a real difference? The quotient d r = D r /σ D, σ 2 D = σ 2 x + σ 2 y is normally distributed with expectation zero and variance one. The likelihood that the observed difference x y is due to chance is defined to be ( Q = 1 P ( d r d) = 2 G 0 ( d) = 1 erf d/ ) 2. If the assumption is correct, then Q is a uniformly distributed random variable in the range [0, 1). Examples: (interactive in ForProc/Gau dif/) x 1 ± σ x1 1.0 ± 0.1 1.0 ± 0.1 1.0 ± 0.1 1.0 ± 0.05 1.000 ± 0.025 x 2 ± σ x2 1.2 ± 0.2 1.2 ± 0.1 1.2 ± 0.0 1.2 ± 0.00 1.200 ± 0.025 Q 0.37 0.16 0.046 0.000063 0.15 10 7 12

Gaussian Error Analysis for Small Samples: Gosset s Student Distribution and the Student Difference Test. The Error of the Error Bar: χ 2 Distribution and the Variance Ratio Test (F-Test). The Jackknife Approach: Jackknife estimators correct for the bias and the error of the bias. If there is not bias, their results are identical with the conventional error analysis. As the extra effort of using Jacknife routines is minimal, they should be the standard of error analysis. Bias problems occur when one estimates a non-linear function of a mean x: f = f( x). 13

Jacknife estimators of the function are then defined by f J = 1 N N fi J with fi J = f(x J i ) and x J i = i=1 1 N 1 x k. k i The estimator for the variance is s 2 J(f J ) = N 1 N N (fi J f J ) 2. i=1 Straightforward algebra shows that in the unbiased case the jackknife variance reduces to the normal variance. Of order N (not N 2 ) operations are needed to construct the jackknife averages x J i, i = 1,..., N from the original data. Determination of Parameters (Fitting): Levenberg-Marquardt approach besides simple linear regression. 14

Statistical Physics and Markov Chain Monte Carlo Simulations MC simulations of systems described by the Gibbs canonical ensemble aim at calculating estimators of physical observables at a temperature T. In the following we consider the calculation of the expectation value of an observable O. All systems on a computer are discrete, because a finite word length has to be used. Hence, Ô = Ô(β) = O = Z 1 K where Z = Z(β) = K k=1 k=1 β E(k) e O (k) β E(k) e is the partition function. The index k = 1,..., K labels all configurations (or microstates) of the system, and E (k) is the (internal) energy of configuration k. 15

In the following I use Potts models on d-dimensional cubic lattices with periodic boundary conditions. Without being overly complicated, these models allow to illustrate essential features we are interested in. We define the energy of the system by E (k) 0 = 2 <ij> δ(q (k) i, q (k) j ) + 2 d N q with δ(q i, q j ) = { 1 for qi = q j 0 for q i q j. The sum < ij > is over the nearest neighbor lattice sites and the Potts spins or states of q (k) i take the values 1,..., q. For the energy per spin the notation is e s = E/N and our normalization is chosen so that e s agrees for q = 2 with the conventional Ising model definition. For the 2d Potts models a number of exact results are known, e.g., β c = 1 T c = 1 2 ln(1 + q) = β Potts c, e c 0s = E c 0/N = 4 q 2 2/ q. The phase transition is second order for q 4 and first order for q 5. 16

Markov Chain Monte Carlo A Markov chain allows to generate configurations k with probability P (k) B = c B w (k) B = c B e βe(k), c B constant. The state vector (P (k) B ), for which the configurations are the vector indices, is called Boltzmann state. A Markov chain is a simple dynamic process, which generates configuration k n+1 stochastically from configuration k n. Let the transition probability to create the configuration l in one step from k be given by W (l)(k) = W [k l]. Then, the transition matrix W = (W (l)(k)) defines the Markov process. Note, that this matrix is a very big and never stored in the computer. The matrix achieves our goal and generates configurations with the desired probabilities, when it satisfies the following properties: 17

(i) Ergodicity: e βe(k) > 0 and e βe(l) > 0 imply : an integer number n > 0 exists so that (W n ) (l)(k) > 0 holds. (ii) Normalization: W (l)(k) = 1. l (iii) Balance: W (l)(k) e βe(k) = e βe(l). k Balance means: The Boltzmann state is an eigenvector with eigenvalue 1 of the matrix W = (W (l)(k) ). With that we have replaced the canonical ensemble average by a time average over an artificial dynamics and one distinguishes dynamical universality classes. 18

The Metropolis Algorithm Detailed balance still does not uniquely fix the transition probabilities W (l)(k). The Metropolis algorithm is a popular choice can be used whenever one knows how to calculate the energy of a configuration. Given a configuration k, the Metropolis algorithm proposes a configuration l with probability f(l, k) = f(k, l) normalized to l f(l, k) = 1. The new configuration l is accepted with probability w (l)(k) = min [ ] 1, P (l) B P (k) B = { 1 for E (l) < E (k) e β(e(l) E (k) ) for E (l) > E (k). If the new configuration is rejected, the old configuration has to be counted again. 19

The Heatbath algorithm The heat bath algorithm chooses a spin q i directly with the local Boltzmann distribution defined by its nearest neighbors P B (q i ) = const e β E(q i). As many Metropolis hits (on the same spin) are needed to reach this distribution, the heatbath is more efficient than the Metropolis algorithm. However, it models more complicated than Potts models the calculation of the local heatbath probabilities is often too involved to make it a viable alternative. Start and equilibration Initially we have to start with a microstate which may be far off the Boltzmann distribution. Although the weight of states decreases with 1/n where n is the steps of the Markov process, one should exclude the initial states from the equilibrium statistics. Many ways to generate start configurations exist, e.g., 20

1. A random configuration corresponding to β = 0. 2. An ordered configuration for which all Potts spins take on the same q-value. Examples: (assignments a0303 01 and a0303 05) e 0s 0-0.5-1 Random Start Ordered Start Exact act 1 0.9 0.8 0.7 0.6 0.5 Ordered starts Metropolis 1-hit Metropolis 2-hit Heat Bath -1.5 0.4 0.3 0.2 Disordered starts -2 0 50 100 150 200 0.1 0 50 100 150 200 Sweeps Sweeps Figure 2: Initial time series of 200 sweeps each on a 80 80 lattice. Left: Metropolis for a 2d Ising model at β = 0.4. Right: q = 10 Potts model at β = 0.62. 21

Consistency Checks For the 2d Ising model we can test against the exact finite lattice results of Ferdinand and Fisher. We simulate a 20 2 lattice at β = 0.4 using 10 000 sweeps for reaching equilibrium 64 bins of 5 000 sweeps for measurement (a careful justification is given later). We find (assignment a0303 06) e 0s = 1.1172 (14) (Metropolis) versus ê s = 1.117834 (exact). The Gaussian difference test gives a perfectly admissible value Q = 0.65. For the 2d 10-state Potts model at β = 0.62 we test our Metropolis versus our heat bath code on a 20 20 lattice to find (assignment a0303 08) actm = 0.321772 (75) (Metropolis) versus actm = 0.321661 (70) (heat bath) and Q = 0.28 for the Gaussian difference test. Another perfectly admissible value. 22

3d 3-state Potts model To illustrate features of a first order phase transition we simulate the 3d 3-state Potts model on a 24 3 lattice at a pseudo-transition temperature and plot its energy histogram. A characteristic double peak structure is found (assignment a0303 10): 60000 h(actm) 50000 Histogram 40000 30000 20000 10000 0 0.5 0.52 0.54 0.56 0.58 0.6 0.62 0.64 0.66 actm 23

Self-Averaging Illustration for the 2d Heisenberg model We compare the peaked distribution function of a mean energy density per link for different lattice sizes. The property of self-averaging is observed: The larger the lattice, the smaller the confidence range. The other way round, the peaked distribution function is very well suited to exhibit observables for which self-averaging does not work, as for instance encountered in spin glass simulations. 0.5 0.4 L=20 L=34 L=60 L=100 F q 0.3 0.2 0.1 0 0.36 0.38 0.4 0.42 0.44 0.46 0.48 0.5 actm Figure 3: O(3) σ-model at β = 1.1 (assignments a0304 06 and a0304 08). 24

Statistical Errors of Markov Chain MC Data A typical MC simulation falls into two parts: 1. Equilibration without measurements. 2. Production with measurements. Rule of thumb (for long calculations): Do not spend more than 50% of your CPU time on measurements! Autocorrelations We like to estimate the expectation value f of some physical observable. We assume that the system has reached equilibrium. How many MC sweeps are needed to estimate f with some desired accuracy? To answer this question, one has to understand the autocorrelations within the Markov chain. 25

Given is a time series of measurements f i, i = 1,..., N. With the notation t = i j the autocorrelation function of the mean f is defined by Ĉ(t) = Ĉij = (f i f i ) (f j f j ) = f i f j f i f j = f 0 f t f 2 Some algebra shows that the variance of the estimator f for the mean and the autocorrelation functions are related by σ 2 (f) = σ2 (f) N [ 1 + 2 N 1 t=1 ( 1 t ) N ĉ(t) ] with ĉ(t) = Ĉ(t) Ĉ(0). This equation ought to be compared with the corresponding equation for uncorrelated random variables σ 2 (f) = σ 2 (f)/n. The difference is the factor in the bracket which defines the integrated autocorrelation time as τ int = lim N [ 1 + 2 N 1 t=1 ( 1 t ) N ĉ(t) ]. 26

Self-consistent versus reasonable error analysis The calculation of the integrated autocorrelation provides a self-consistent error analysis. But in practice this is often out of reach. According to the Student distribution about twenty independent data are sufficient to estimate mean values reliably, while the error of the error bar the χ 2 distribution implies that about one thousand are needed for an estimate of the integrated autocorrelation time with 10% accuracy on the two σ confidence level. In practice, one may rely on the binning method with a fixed number of 16 bins. How do we know then that the statistics has become large enough? There can be indirect arguments like finite size scale extrapolations, which suggest that the integrated autocorrelation time is (much) smaller than the achieved bin length. This is no longer self-consistent, but a reasonable error analysis. 27

Comparison of Markov chain MC algorithms The d = 2 Ising model at the critical temperature 2500 2000 τ int 1500 1000 L=160 ts1 500 L= 80 ts1 L= 40 ts1 L= 20 ts1 0 0 1000 2000 3000 4000 5000 6000 7000 8000 Figure 4: One-hit Metropolis algorithm with sequential updating: critical slowing down, τ int L z where z 2.17 is the dynamical critical exponent (assignment a0402 02 D). t 28

Another MC dynamics, Swendsen-Wang (SW) and Wolff (W) cluster algorithm: 14 12 10 τ int 8 6 4 2 0 10 20 30 40 50 60 t SW L=160 SW L= 80 SW L= 40 SW L= 20 W L=160 W L= 80 W L= 40 W L= 20 Figure 5: Estimates of integrated autocorrelation times from simulations of the d = 2 Ising model at the critical temperature (assignment a0503 05). 29

Simulations of the Multicanonical Ensemble One of the questions which ought to be addressed before performing a large scale computer simulation is What are suitable weight factors for the problem at hand? So far we used the Boltzmann weights as this appears natural for simulating the Gibbs ensemble. However, a broader view of the issue is appropriate. Conventional simulations can by re-weighting techniques only be extrapolated to a vicinity of the simulation temperature. For multicanonical simulations this is different. A single simulation allows to obtain equilibrium properties of the Gibbs ensemble over a range of temperatures. Of particular interest are two situations for which canonical simulations do not provide the appropriate implementation of importance sampling: 1. The physically important configurations are rare in the canonical ensemble. 2. A rugged free energy landscape makes the physically important configurations difficult to reach. 30

Multicanonical simulations sample, in an appropriate energy range, with an approximation to the weights ŵ mu (k) = w mu (E (k) ) = e b(e(k) ) E (k) +a(e (k)) = 1 n(e (k) ) where n(e) is the spectral density. The function b(e) defines the inverse microcanonical temperature and a(e) the dimensionless, microcanonical free energy. The function b(e) has a relatively smooth dependence on its arguments, which makes it a useful quantity when dealing with the weight factors. The multicanonical method requires two steps: 1. Obtain a working estimate the weights. Working estimate means that the approximation has to be good enough so that the simulation covers the desired eneryg or temperature range. 2. Perform a Markov chain MC simulation with the fixed weights. The thus generated configurations constitute the multicanonical ensemble. 31

Re-Weighting to the Canonical Ensemble Given the multicanonical time series, where i = 1,..., n labels the generated configurations. The formula O = n i=1 O(i) exp [ β E (i) + b(e (i) ) E (i) a(e (i) ) ] n i=1 exp [ β E (i) + b(e (i) ) E (i) a(e (i) ) ]. replaces the multicanonical weighting of the simulation by the Boltzmann factor. The denominator differs from the partition function Z by a constant factor which drops out (for discrete systems this simplifies for functions of the energy using histograms). The computer implementation of these equations requires care and a Jackknife analysis with logarithmic coding relying on the formula ought to be used. ln C = max (ln A, ln B) + ln{1 + exp [ ln A ln B ]} 32

Energy and Specific Heat Calculation Multicanonical data for the energy per spin (with jackknife errors) of the 2d Ising model on a 20 20 lattice are produced in assignment a0501 01 and compared with the exact results of Ferdinand and Fisher in assignment a0501 03. Results: 0-0.5 Energy per spin <e 0s > Multicanonical data <e 0s > -1-1.5-2 0 0.1 0.2 0.3 0.4 0.5 0.6 β 33

The same numerical data allow to calculate the specific heat defined by C = d Ê d T = β2 ( E 2 E 2). C/N 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 Specific heat per spin 0 0.2 0.4 0.6 0.8 1 β 34

Free Energy and Entropy Calculation At β = 0 the Potts partition function is Z = q N. Therefore, multicanonical simulations allow for proper normalization of the partition function, if β = 0 is included in the temperature range. Example: Entropies from multicanonical simulations of the The 2d Ising and 10-state Potts models on a 20 20 lattice (assignment a0501 03 for Ising and a0501 05 for 10-state Potts). 0.8 0.7 0.6 0.5 s 0.4 0.3 0.2 0.1 0 Ising 10-state Potts 0 0.2 0.4 0.6 0.8 1 β 35

Summary We considered Statistics, Markov Chain Monte Carlo simulations, the Statistical Analysis of Markov chain data and, finally, Multicanonical Sampling. It is a strength of computer simulations that one can generate artificial (not realized by nature) ensembles, which enhance the probabilities of rare events on may be interested in, or speed up the dynamics. Each method comes with its entire computer code. 36