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

Similar documents
Markov Chain Monte Carlo Simulations and Their Statistical Analysis An Overview

Irr. Statistical Methods in Experimental Physics. 2nd Edition. Frederick James. World Scientific. CERN, Switzerland

PRINCIPLES OF PHYSICS. \Hp. Ni Jun TSINGHUA. Physics. From Quantum Field Theory. to Classical Mechanics. World Scientific. Vol.2. Report and Review in

Multicanonical methods

Monte Caro simulations

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

Pattern Recognition and Machine Learning

Lecture V: Multicanonical Simulations.

Kernel-based Approximation. Methods using MATLAB. Gregory Fasshauer. Interdisciplinary Mathematical Sciences. Michael McCourt.

Statistical Methods in HYDROLOGY CHARLES T. HAAN. The Iowa State University Press / Ames

Improvement of Monte Carlo estimates with covariance-optimized finite-size scaling at fixed phenomenological coupling

INTRODUCTION TO MARKOV CHAIN MONTE CARLO SIMULATIONS AND THEIR STATISTICAL ANALYSIS

Lecture 8: Computer Simulations of Generalized Ensembles

Parallel Tempering Algorithm in Monte Carlo Simulation

Generalized Ensembles: Multicanonical Simulations

Applied Probability and Stochastic Processes

Data Fitting and Uncertainty

General Construction of Irreversible Kernel in Markov Chain Monte Carlo

MAGNETISM MADE SIMPLE. An Introduction to Physical Concepts and to Some Useful Mathematical Methods. Daniel C. Mattis

Monte Carlo and cold gases. Lode Pollet.

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

Fig. 1 Cluster flip: before. The region inside the dotted line is flipped in one Wolff move. Let this configuration be A.

Generalized, Linear, and Mixed Models

Trivially parallel computing

GPU-based computation of the Monte Carlo simulation of classical spin systems

Elliptic & Parabolic Equations

Model Assisted Survey Sampling

Quantum Tunneling and

Time Series Analysis. James D. Hamilton PRINCETON UNIVERSITY PRESS PRINCETON, NEW JERSEY

Accelerator Physics. Tip World Scientific NEW JERSEY LONDON SINGAPORE BEIJING SHANGHAI HONG KONG TAIPEI BANGALORE. Second Edition. S. Y.

Monte Carlo Methods in High Energy Physics I

Time Series: Theory and Methods

PART I INTRODUCTION The meaning of probability Basic definitions for frequentist statistics and Bayesian inference Bayesian inference Combinatorics

PROBABILITY AND STOCHASTIC PROCESSES A Friendly Introduction for Electrical and Computer Engineers

Numerical methods for lattice field theory

Principles of Equilibrium Statistical Mechanics

3.320 Lecture 18 (4/12/05)

Fundamentals of Applied Probability and Random Processes

Monte-Carlo Methods and Stochastic Processes

Physics 115/242 Monte Carlo simulations in Statistical Physics

Statistical Methods for Forecasting

CONTENTS NOTATIONAL CONVENTIONS GLOSSARY OF KEY SYMBOLS 1 INTRODUCTION 1

Computational Physics (6810): Session 13

Molecular Electronics

Matrix Calculus and Kronecker Product

Monte Carlo Simulation of the Ising Model. Abstract

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

Rare Event Sampling using Multicanonical Monte Carlo

Christopher Dougherty London School of Economics and Political Science

AGuideto Monte Carlo Simulations in Statistical Physics

Quantum. Mechanics. Y y. A Modern Development. 2nd Edition. Leslie E Ballentine. World Scientific. Simon Fraser University, Canada TAIPEI BEIJING

Exploring Monte Carlo Methods

Parallel Tempering And Adaptive Spacing. For Monte Carlo Simulation

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

Lessons in Estimation Theory for Signal Processing, Communications, and Control

Probability and Stochastic Processes

The Monte Carlo Method in Condensed Matter Physics

Spin Systems. Frustrated. \fa. 2nd Edition. H T Diep. World Scientific. University of Cergy-Pontoise, France. Editor HONG SINGAPORE KONG TAIPEI

Electron Correlation

Classical Monte Carlo Simulations

Advanced Monte Carlo Methods Problems

Probability for Statistics and Machine Learning

Notation Precedence Diagram

An Introduction to Computer Simulation Methods

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

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Constrained data assimilation. W. Carlisle Thacker Atlantic Oceanographic and Meteorological Laboratory Miami, Florida USA

G. S. Maddala Kajal Lahiri. WILEY A John Wiley and Sons, Ltd., Publication

8 Error analysis: jackknife & bootstrap

Evaporation/Condensation of Ising Droplets

Numerical Analysis for Statisticians

CONTENTS. Preface List of Symbols and Notation

TABLE OF CONTENTS CHAPTER 1 COMBINATORIAL PROBABILITY 1

TIME SERIES ANALYSIS. Forecasting and Control. Wiley. Fifth Edition GWILYM M. JENKINS GEORGE E. P. BOX GREGORY C. REINSEL GRETA M.

Stat 516, Homework 1

Guiding Monte Carlo Simulations with Machine Learning

FORECASTING METHODS AND APPLICATIONS SPYROS MAKRIDAKIS STEVEN С WHEELWRIGHT. European Institute of Business Administration. Harvard Business School

Monte Carlo Simulation of the 2D Ising model

Lecture 3. G. Cowan. Lecture 3 page 1. Lectures on Statistical Data Analysis

Graphical Representations and Cluster Algorithms

Functional Materials. Optical and Magnetic Applications. Electrical, Dielectric, Electromagnetic, Deborah D. L Chung.

QUANTUM MECHANICS USING COMPUTER ALGEBRA

Introduction to Econometrics

Optimized multicanonical simulations: A proposal based on classical fluctuation theory

Metropolis Monte Carlo simulation of the Ising Model

Appendix F. Computational Statistics Toolbox. The Computational Statistics Toolbox can be downloaded from:

STOCHASTIC PROCESSES IN PHYSICS AND CHEMISTRY

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

HANDBOOK OF APPLICABLE MATHEMATICS

DESIGN AND ANALYSIS OF EXPERIMENTS Third Edition

Contents LIST OF TABLES... LIST OF FIGURES... xvii. LIST OF LISTINGS... xxi PREFACE. ...xxiii

Deep learning / Ian Goodfellow, Yoshua Bengio and Aaron Courville. - Cambridge, MA ; London, Spis treści

Ising Model. Ising Lattice. E. J. Maginn, J. K. Shah

Monte Carlo Methods. Handbook of. University ofqueensland. Thomas Taimre. Zdravko I. Botev. Dirk P. Kroese. Universite de Montreal

Time Series Analysis. James D. Hamilton PRINCETON UNIVERSITY PRESS PRINCETON, NEW JERSEY

Information, Physics, and Computation

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

Statistical Analysis of Simulations: Data Correlations and Error Estimation

Zacros. Software Package Development: Pushing the Frontiers of Kinetic Monte Carlo Simulation in Catalysis

Monte Carlo Simulation. CWR 6536 Stochastic Subsurface Hydrology

Transcription:

Markov Chain Monter rlo Simulations and Their Statistical Analvsis With Web-Based Fortran Code Bernd A. Berg Florida State Univeisitfi USA World Scientific NEW JERSEY + LONDON " SINGAPORE " BEIJING " SHANGHAI " HONG KONG + TAIPEI " CHENNAI

Contents 1. Sampling, Statistics and Computer Code 1 1.1 Probability Distributions and Sampling........... I 1.1.1 Assignments for section 1.1.............. 5 1.2 Random Numbers....................... 6 1.2.1 Assignments for section 1.2.............. 12 1.3 About the Fortran Code.................... 13 1.3.1 CPU time measurements under Linux........ 22 1.4 Gaussian Distribution..................... 23 1.4.1 Assignments for section 1.4.............. 25 1.5 Confidence Intervals...................... 26 1..5.1 Assignment for section 1.5.............. 30 1.6 Order Statistics and 1"IeapSort................. 30 1.6.1 Assignments for section 1.6.............. 34 1.7 Functions and Expectation Values.............. 35 1.7.1 Moments and Tchebychev's inequality........ 36 1.7.2 The sum of two independent random variables.... 40 1..7.3 Characteristic functions and sums of N independent random variables.................... 41 1.7.4 Linear transformations, error propagation and covariance........................... 43 1.7.5 Assignments for section 1.7.............. 46 1.8 Sample Mean and the Central Limit Theorem........ 47 1.8.1 Probability density of the sample mean......... 47 1.8.2 The central limit theorem............... 50

xii Markov Chain Monte Carlo Simulations and Their Statistical Analysis 1.8.2.1 Counter example............... 51 1.8.3 Binning......................... 52 1.8.,4 Assignments for section 1.8.............. 53 2. Error Analysis for Independent Random Variables 54 2.1 Gaussian Confidence Intervals and Error Bars........ 54 2.1.1 Estimator of the variance and bias.......... 56 2.1.2 Statistical error bar routines (step)..,....... 57 2.1.2.1 Ratio of two means with error bars..... 60 2.1.3 Gaussian difference test................ 60 2.1.3.1 Combining more than two data points... 62 2.1.4 Assignments for section 2.1.............. 64 2.2 The x2 Distribution...................... 66 2.2.1 Sample variance distribution.............. 67 2.2.2 The Xz distribution function and probability density 70 2.2.3 Assignments for section 2.2.............. 72 2.3 Gosset's Student Distribution................. 73 2.3.1 Student difference test................. 77 2.3.2 Assignments for section 2.3.............. 81 2.4 The Error of the Error Bar.................. 81 2.4.1 Assignments for section 2.4.............. 84 2.5 Variance Ratio Test (P-test)................. 85 2.5.1 F ratio confidence limits................ 88 2.5.2 Assignments for section 2.5.............. 89 2.6 When are Distributions Consistent?............. 89 2.6.1 x2 Test.......................... 89 2.6.2 The one-sided Kolmogorov test............ 92 2.6.3 The two-sided Kolmogorov test............ 98 2.6.4 Assignments for section 2.6.............. 101 2.7 The Jackknife Approach.................... 103 2.7.1 Bias corrected estimators................ 206 2.7.2 Assignments for section 2.7.............. 108 2.8 Determination o Parameters (Fitting)............ 109 2.8.1 Linear regression.................... 111 2.8.1.1 Confidence limits of the regression line... 11.4 2.8.1.2 Related functional forms........... 115 2.8.1.3 Examples................... 3.17 2.8.2 Levenberg-Marquardt fitting.............. 12]. 2.8.2.1 Examples................... 125

. Contents xiii 2.8.3 Assignments for section 2.8.............. 127 3. Markov Chain Monte Carlo 128 3.1 Preliminaries and the Two-Dimensional Ising Model.... 129 3.1.1 Lattice labeling..................... 133 3.1.2 Sampling and Re-weighting.............. 138 3.1.2.1 Important configurations and re-weighting range...................... 141 3.1.3 Assignments for section 3.1.............. 142 3.2 Importance Sampling...................... 142 3.2.1 The Metropolis algorithm................ 147 3.2.2 The O(3) a-model and the heat bath algorithm... 148 3.2.3 Assignments for section 3.2.............. 152 3.3 Potts Model Monte Carlo Simulations............ 152 3.3.1 The Metropolis code.................. 156 3.3.1.1 Initialization.................. 158 3.3.1.2 Updating routines............... 160 3.3.1.3 Start and equilibration............ 163 3.3.1.4 More updating routines............ 164 3.3.2 Heat bath code.................. ;.. 165 3.3.3 Timing and time series comparison of the routines. 168 3.3.4 Energy references, data production and analysis code 169 3.3.4.1 2d Ising model................. 171 3.3.4.2 Data analysis................. 173 3.3.4.3 2d 4-state and 10-state Potts models.... 174 3.3.4.4 3d Ising model................. 177 3.3.4.5 3d 3-state Potts model............ 177 3.3.4.6 4d Ising model with non-zero magnetic field 178 3.3.5 Assignments for section 3.3.............. 179 3.4 Continuous Systems...................... 181 3.4.1 Simple Metropolis code for the 0(n) spin models.. 182 3.4.2 Metropolis code for the XY model.......... 186 3.4.2.1 Timing, discretization and rounding errors. 187 3.4.2.2 Acceptance rate................ 189 3.4.3 Heat bath code for the O(3) model.......... 192 3.4.3.1 Rounding errors................ 194 3.4.4 Assignments for section 3.4.............. 194 4. Error Analysis for Markov Chain Data 196

xiv Markov Chain Monte Carlo Simulations and Their Statistical Analysis 4.1 Autocorrelations........................ 197 4.1.1 Integrated autocorrelation time and binning.... 202 4.1.2 Illustration : Metropolis generation of normally distributed data...................... 205 4.1.2.1 Autocorrelation function........... 205 4.1.2.2 Integrated autocorrelation time....... 207 4,1.2.3 Corrections to the confidence intervals of the binning procedure............... 210 4.1.3 SeIf-consistent versus reasonable error analysis... 211 4.1.4 Assignments for section 4.1.............. 213 4.2 Analysis of Statistical Physics Data.............. 214 4.2.1 The d = 2 Ising model off and on the critical point. 214 4.2.2 Comparison of Markov chain MC algorithms.... 218 4.2.2.1 Random versus sequential updating..... 218 4.2.2.2 Tuning the Metropolis acceptance rate... 219 4.2.2.3 Metropolis versus heat bath : 2d q = 10 Potts 221 4.2.2.4 Metropolis versus heat bath : 3d Ising.... 222 4.2.2.5 Metropolis versus heat bath : 2d O(3) o- model 223 4.2.3 Small fluctuations.................... 224 4.2.4 Assignments for section 4.2.............. 227 4.3 Fitting of Markov Chain Moate Carlo Data......... 229 4.3.3. One exponential autocorrelation time......... 230 4.3.2 More than one exponential autocorrelation time.. 233 4.3.3 Assignments for section 4.3.............. 235 5. Advanced Monte Carlo 236 5.1 Multicanonical Simulations................., 236 5.1.1 Recursion for the weights............,.. 239 5.1.2 Fortran implementation..........,..... 244 5.1.3 Example runs...................... 247 5.1..4 Performance....................... 250 5.1.5 Re-weighting to the canonical ensemble........ 251 5.1.6 Energy and specific heat calculation......... 254 5.1.7 Free energy and entropy calculation....,..... 261 5.1.8 Time series analysis................... 264 5.1.9 Assignments for section 5,1.,............ 267 5.2 Event Driven Simulations................... 268 5.2.1 Computer implementation............... 270 5.2.2 MC runs with the EDS code.............. 276

Contents xv 5.2.3 Assignments for section 5.2.............. 278 5.3 Cluster Algorithms....................... 279 5.3.1 Autocorrelation times................. 284 5.3.2 Assignments for section 5.3.............. 286 5.4 Large Scale Simulations.................... 287 5.4.1 Assignments for section 5.4.............. 289 6. Parallel Computing 292 6.1 Trivially Parallel Computing................. 292 6.2 Message Passing Interface (MPI)............... 294 6.3 Parallel Tempering....................... 303 6.3.1 Computer implementation............... 305 6.3.2 Illustration for the 2d 10-state Potts model..... 310 6.3.3 Gaussian Multiple Markov chains........... 315 6.3.4 Assignments for section 6.3.............. 316 6.4 Checkerboard algorithms.................... 316 6.4.1 Assignment for section 6.4.............. 318 7. Conclusions, History and Outlook 319 Appendix A Computational Supplements 326 A.1 Calculation of Special Functions............... 326 A.2 Linear Algebraic Equations.................. 328 Appendix B More Exercises and some Solutions 331 B.1 Exercises............................ 331 B.2 Solutions........................... 333 Appendix C More Fortran Routines 338 Bibliography 339 Index 349