Monte Carlo and cold gases. Lode Pollet.

Size: px
Start display at page:

Download "Monte Carlo and cold gases. Lode Pollet."

Transcription

1 Monte Carlo and cold gases Lode Pollet 1

2 Outline Classical Monte Carlo The Monte Carlo trick Markov chains Metropolis algorithm Ising model critical slowing down Quantum Monte Carlo diffusion Monte Carlo worm algorithm sign problem Applications 2

3 What I will not do high performing computing parallelization programming language (C++) other numerical methods Required knowledge statistical mechanics quantum mechanics some knowledge about many-body physics 3

4 Integration h = b a N f(x) discrete sum: I = b a f(x)dx = h N f(a + ih)+o(1/n ) i=1 a b higher order integrators trapezoidal I = h N f(a)+ i=1 f(a + ih)+ 1 2 f(b) +O(1/N 2 ) Simpson I = h 3 f(a)+ (3 ( 1) i )f(a + ih)+f(b) N 1 i=1 +O(1/N 4 ) (N even) 4

5 Integration Simpson rule with M points per dimension The error in one dimension is O(M 4 ) In d dimensions we need N = M d points the error is O(M 4 )=O(N 4/d ) Integration becomes inefficient in higher dimensions In statistical mechanics the integrals are 6N-dimensional (3N positions, 3N momenta) 5

6 The Monte Carlo trick I = D g(x)dx identical and independent random samples uniformly drawn from D Î m = 1 m ( ) g(x (1) )+ + g(x (m) ) g(x) D P law of the large numbers [ ] lim m Îm I =0 =1 6

7 The Monte Carlo trick lim m Cdf m central limit theorem (Îm I) convergence is O(m 1/2 ) = CdfN(0,σ 2 ) regardless of the dimensionality of D 7

8 random numbers Pseudo random numbers not random at all, but generated by an algorithm probably good enough reproducible Linear congruential generators x n+1 = f(x n ) GGL x n+1 =(ax + c) modm a = 16807,c=0,m= problem is periodicity with 500 million random numbers per second : 4s should not be used any more 8

9 Lagged Fibonacci generator x n = x n p x n q mod m 0 <p<q, =+,,, XOR Initialization using linear congruential generator very long period (large block of seeds) very fast complex mathematics see: 9

10 Independent sampling Known geometry converges to π/4 10

11 demonstration Segmentation fault 10 1./sqrt(x) 1 0.1! - <MC> e e+06 1e+07 1e+08 Nsteps 11

12 Importance sampling I = 0 g(x)e x dx draw random numbers that are exponentially distributed, then Î m = 1 m ( ) g(x (1) )+ + g(x (m) ) how? u [0, 1[ p = lnu p [0, [ inverse transformation is needed standard random number generator 12

13 Importance sampling f(x) N f(x i ) f = 1 V f(x)dx = 1 V p(x) p(x)dx 1 N Varf/p i=1 p(x i ) = N imagine function f is sharply peaked then the variance can be reduced by finding p(x) such that p(x) is close to f(x) and that it is easy to generate random numbers according to p(x) 13

14 change of variables y = F (y) = y 0 x = F 1 (y) general f(u)du f(x) =x exponential y = F (x) = x =2 y x 0 x dx = x2 2 p = ln(u) Box-Mueller (gaussian) p 1 = R cos(θ) = 2ln(u 1 ) cos(2πu 2 ) p 2 = R sin(θ) = 2ln(u 1 )sin(2πu 2 ) 14

15 Statistical mechanics : Q = 1 Z Tr [ Qe βh] = Tr[Qe βh ] unnormalized weights W (x) =e βe(x) Tr[e βh ] how do we get random variables that are distributed according to W(x)? 15

16 Markov chains and rejections Small steps random walk through configuration space at each time : measure transition function? Rejection : stay at same configuration, update clock and measure 16

17 Markov chains A Markov chain is a sequence of random variables X1, X2, X3,... with the property that the future state depends only on the past via the present state. P [X n+1 = x X n = x n,...,x 1 = x 1,X 0 = x 0 ]=P [X n+1 = x X n = x n ] transition function y T (x, y) T (x, y) =1 conservation of probability irreducible : it must be possible to reach any configuration x from any other configuration y in a finite number of steps. 17

18 Markov chain irreducible aperiodic } convergence to the stationary distribution W transition kernel has one eigenvalue 1, while all other eigenvalues satisfy λ j < 1,j =2,...N The second largest eigenvalue determines the correlations in the Markov process 18

19 Detailed balance A transition rule T(x,y) leaves the target distribution W(x) invariant if x W (x)t (x, y) W (y) This will certainly be the case if detailed balance is fulfilled, W (x)t (x, y) =W (y)t (y, x) 19

20 Metropolis algorithm we cannot construct a transition kernel T that fulfills detailed balance. proposal function P(x,y) q = min acceptance factor [ 1, W (y)p (y, x) W (x)p (x, y) go to the proposed configuration y with prob q, otherwise stay in x ] 20

21 thermalization energy landscape Initial configuration λ2 λ2 τint Discard the first 20% of the Markov steps! Markov Chain should be sufficiently long 21

22 recapitulation δ W (X) =e βe(x) P (X Y )= 1 1 N W (Y )=e βe(y ) P (Y X) = 1 N δ 2 1 δ 2 N particles interacting via Lennard-Jones interactions q X Y = min 1,e β(e(y ) E(X)) 22

23 autocorrelations Markov chains trivially correlate measurements autocorrelations decay exponentially integrated autocorrelation time number of independent measurements is reduced, but central limit theorem still holds 23

24 Binning analysis How to get correct error bars? Markov chain correlates measurements if chain is long enough, then the configuration is independent of the initial one 1 2 m identically and independent τ int (l) = lσ2 (l) 2σ 2 appendix 24

25 Jackknife analysis R (0) R (j), j = 1, k Bias = (k-1)(r av - R (0) ) δr = k 1 1 k k (R (j) ) 2 (R av ) 2 j R = R (0) - Bias 1/2 25

26 2d Ising model H = J σ i σ j <i,j> Select random spin W (x)t (x, y) =W (y)t (y, x) q = min [ 1, ] W (y)p (y, x) W (x)p (x, y) P (x, y) =P (y, x) = 1 L 2 W (y) W (x) = exp q = min 2βJσ i [ 1,e 2βJσ i <i,j> σ j <i,j> σ j ] 26

27 Critical slowing down error(m) T c = ln(1 + 2) e-05 1e /T Magnetization m = ±2 divergence of correlation length, critical fluctuations 27

28 improved estimator m 2 = 1 L 2 σ i σ j = 1 L S(cluster) i,j domain size ~ susceptibility There exist more formal ways and also other ways to solve the problem of critical slowing down 28

29 cluster algorithm select like spins with probability p p =1 exp[ 2β] then update always accepted (exercise : show that this is true) (why is this not the same as flipping many spins at the same time?) 29

30 e β(c 1 c 2 ) (1 p) c 2 q X Y = e β(c 2 c 1 ) (1 p) c 1 min 1, e β(c 2 c 1 ) (1 p) c 1 e β(c 1 c 2) (1 p) c 2 30

31 phase transitions and critical phenomena e-05 Error on magnetization 1e /T local Wolff 1 cluster size in Wolff /T 31

32 phase transitions and critical phenomena critical exponents have to be calculated numerically P.S. you need to know about finite size scaling 32

33 Wang-Landau sampling Cluster algorithms do not help near first order transitions 33

34 Wang-Landau sampling Z = E ρ(e)e E/kT Density of states is however unknown. probability minimum disappears however if we choose - start with ρ(e) = 1 and f =1 - repeat - reset histogram H(E) = 0 p(e) 1/ρ(E) - perform simulations by picking random site and Metropolis updates p(e) 1/ρ(E) H(E) H(E)+1 ρ(e) ρ(e) f - when histogram is flat, reduce f f - stop when f

35 References J. S. Liu, Monte Carlo strategies in scientific computing, Springer Verlag W. Krauth, Statistical Mechanics : algorithms and computations, Oxford University Press ETH Zurich professor scripts : ( and references therein) 35

36 Homework calculate (mean value, no error analysis) : I = 6 0 exp( x/2)dx by : 1. direct integration (analytical/monte Carlo by exponentially distributed random numbers) 2. Markov chain Monte Carlo : choose a step size d (wisely), and update the current position according to the Metropolis algorithm by choosing a random step of. Don t forget that in every step you can move to larger or smaller x values. Show that you satisfy detailed balance. 3. modification (advanced). Suppose the following. Suppose you start with moving to the right. If you accept the move, then always choose moving to the right in the next step. If you reject the move, then start moving to the left. So, you keep moving in one direction until you have a rejection (bounce), and then you change the direction and keep moving in this direction until there is another bounce after which you change the direction again. Does this Monte Carlo Markov chain produce the right answer? 36

Monte Carlo importance sampling and Markov chain

Monte Carlo importance sampling and Markov chain Monte Carlo importance sampling and Markov chain If a configuration in phase space is denoted by X, the probability for configuration according to Boltzman is ρ(x) e βe(x) β = 1 T (1) How to sample over

More information

Classical Monte Carlo Simulations

Classical Monte Carlo Simulations Classical Monte Carlo Simulations Hyejin Ju April 17, 2012 1 Introduction Why do we need numerics? One of the main goals of condensed matter is to compute expectation values O = 1 Z Tr{O e βĥ} (1) and

More information

Markov Chain Monte Carlo The Metropolis-Hastings Algorithm

Markov Chain Monte Carlo The Metropolis-Hastings Algorithm Markov Chain Monte Carlo The Metropolis-Hastings Algorithm Anthony Trubiano April 11th, 2018 1 Introduction Markov Chain Monte Carlo (MCMC) methods are a class of algorithms for sampling from a probability

More information

Introduction to Machine Learning CMU-10701

Introduction to Machine Learning CMU-10701 Introduction to Machine Learning CMU-10701 Markov Chain Monte Carlo Methods Barnabás Póczos & Aarti Singh Contents Markov Chain Monte Carlo Methods Goal & Motivation Sampling Rejection Importance Markov

More information

Quantum Monte Carlo. Matthias Troyer, ETH Zürich

Quantum Monte Carlo. Matthias Troyer, ETH Zürich Quantum Monte Carlo Matthias Troyer, ETH Zürich 1 1. Monte Carlo Integration 2 Integrating a function Convert the integral to a discrete sum b! f (x)dx = b " a N a N ' i =1 # f a + i b " a % $ N & + O(1/N)

More information

17 : Markov Chain Monte Carlo

17 : Markov Chain Monte Carlo 10-708: Probabilistic Graphical Models, Spring 2015 17 : Markov Chain Monte Carlo Lecturer: Eric P. Xing Scribes: Heran Lin, Bin Deng, Yun Huang 1 Review of Monte Carlo Methods 1.1 Overview Monte Carlo

More information

Convex Optimization CMU-10725

Convex Optimization CMU-10725 Convex Optimization CMU-10725 Simulated Annealing Barnabás Póczos & Ryan Tibshirani Andrey Markov Markov Chains 2 Markov Chains Markov chain: Homogen Markov chain: 3 Markov Chains Assume that the state

More information

Classical and Quantum Monte Carlo Algorithms and Exact Diagonalization. Matthias Troyer, ETH Zürich

Classical and Quantum Monte Carlo Algorithms and Exact Diagonalization. Matthias Troyer, ETH Zürich Classical and Quantum Monte Carlo Algorithms and Exact Diagonalization Matthias Troyer, ETH Zürich troyer@phys.ethz.ch July 29, 2004 Contents 1 Introduction 1 2 Monte Carlo integration 1 2.1 Standard integration

More information

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

ICCP Project 2 - Advanced Monte Carlo Methods Choose one of the three options below ICCP Project 2 - Advanced Monte Carlo Methods Choose one of the three options below Introduction In statistical physics Monte Carlo methods are considered to have started in the Manhattan project (1940

More information

Convergence Rate of Markov Chains

Convergence Rate of Markov Chains Convergence Rate of Markov Chains Will Perkins April 16, 2013 Convergence Last class we saw that if X n is an irreducible, aperiodic, positive recurrent Markov chain, then there exists a stationary distribution

More information

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

Their Statistical Analvsis. With Web-Based Fortran Code. Berg 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

More information

A quick introduction to Markov chains and Markov chain Monte Carlo (revised version)

A quick introduction to Markov chains and Markov chain Monte Carlo (revised version) A quick introduction to Markov chains and Markov chain Monte Carlo (revised version) Rasmus Waagepetersen Institute of Mathematical Sciences Aalborg University 1 Introduction These notes are intended to

More information

16 : Markov Chain Monte Carlo (MCMC)

16 : Markov Chain Monte Carlo (MCMC) 10-708: Probabilistic Graphical Models 10-708, Spring 2014 16 : Markov Chain Monte Carlo MCMC Lecturer: Matthew Gormley Scribes: Yining Wang, Renato Negrinho 1 Sampling from low-dimensional distributions

More information

Markov Chain Monte Carlo Inference. Siamak Ravanbakhsh Winter 2018

Markov Chain Monte Carlo Inference. Siamak Ravanbakhsh Winter 2018 Graphical Models Markov Chain Monte Carlo Inference Siamak Ravanbakhsh Winter 2018 Learning objectives Markov chains the idea behind Markov Chain Monte Carlo (MCMC) two important examples: Gibbs sampling

More information

Advanced Monte Carlo Methods Problems

Advanced Monte Carlo Methods Problems Advanced Monte Carlo Methods Problems September-November, 2012 Contents 1 Integration with the Monte Carlo method 2 1.1 Non-uniform random numbers.......................... 2 1.2 Gaussian RNG..................................

More information

Generating the Sample

Generating the Sample STAT 80: Mathematical Statistics Monte Carlo Suppose you are given random variables X,..., X n whose joint density f (or distribution) is specified and a statistic T (X,..., X n ) whose distribution you

More information

Monte Carlo Methods in Statistical Mechanics

Monte Carlo Methods in Statistical Mechanics Monte Carlo Methods in Statistical Mechanics Mario G. Del Pópolo Atomistic Simulation Centre School of Mathematics and Physics Queen s University Belfast Belfast Mario G. Del Pópolo Statistical Mechanics

More information

Lecture 6: Markov Chain Monte Carlo

Lecture 6: Markov Chain Monte Carlo Lecture 6: Markov Chain Monte Carlo D. Jason Koskinen koskinen@nbi.ku.dk Photo by Howard Jackman University of Copenhagen Advanced Methods in Applied Statistics Feb - Apr 2016 Niels Bohr Institute 2 Outline

More information

Lecture 2 : CS6205 Advanced Modeling and Simulation

Lecture 2 : CS6205 Advanced Modeling and Simulation Lecture 2 : CS6205 Advanced Modeling and Simulation Lee Hwee Kuan 21 Aug. 2013 For the purpose of learning stochastic simulations for the first time. We shall only consider probabilities on finite discrete

More information

Quantifying Uncertainty

Quantifying Uncertainty Sai Ravela M. I. T Last Updated: Spring 2013 1 Markov Chain Monte Carlo Monte Carlo sampling made for large scale problems via Markov Chains Monte Carlo Sampling Rejection Sampling Importance Sampling

More information

Monte Carlo Methods. Geoff Gordon February 9, 2006

Monte Carlo Methods. Geoff Gordon February 9, 2006 Monte Carlo Methods Geoff Gordon ggordon@cs.cmu.edu February 9, 2006 Numerical integration problem 5 4 3 f(x,y) 2 1 1 0 0.5 0 X 0.5 1 1 0.8 0.6 0.4 Y 0.2 0 0.2 0.4 0.6 0.8 1 x X f(x)dx Used for: function

More information

CSC 446 Notes: Lecture 13

CSC 446 Notes: Lecture 13 CSC 446 Notes: Lecture 3 The Problem We have already studied how to calculate the probability of a variable or variables using the message passing method. However, there are some times when the structure

More information

Monte Carlo Methods. PHY 688: Numerical Methods for (Astro)Physics

Monte Carlo Methods. PHY 688: Numerical Methods for (Astro)Physics Monte Carlo Methods Random Numbers How random is random? From Pang: we want Long period before sequence repeats Little correlation between numbers (plot ri+1 vs ri should fill the plane) Fast Typical random

More information

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

Pattern Recognition and Machine Learning. Bishop Chapter 11: Sampling Methods Pattern Recognition and Machine Learning Chapter 11: Sampling Methods Elise Arnaud Jakob Verbeek May 22, 2008 Outline of the chapter 11.1 Basic Sampling Algorithms 11.2 Markov Chain Monte Carlo 11.3 Gibbs

More information

Lecture 8: The Metropolis-Hastings Algorithm

Lecture 8: The Metropolis-Hastings Algorithm 30.10.2008 What we have seen last time: Gibbs sampler Key idea: Generate a Markov chain by updating the component of (X 1,..., X p ) in turn by drawing from the full conditionals: X (t) j Two drawbacks:

More information

functions Poisson distribution Normal distribution Arbitrary functions

functions Poisson distribution Normal distribution Arbitrary functions Physics 433: Computational Physics Lecture 6 Random number distributions Generation of random numbers of various distribuition functions Normal distribution Poisson distribution Arbitrary functions Random

More information

Computational statistics

Computational statistics Computational statistics Markov Chain Monte Carlo methods Thierry Denœux March 2017 Thierry Denœux Computational statistics March 2017 1 / 71 Contents of this chapter When a target density f can be evaluated

More information

Markov chain Monte Carlo Lecture 9

Markov chain Monte Carlo Lecture 9 Markov chain Monte Carlo Lecture 9 David Sontag New York University Slides adapted from Eric Xing and Qirong Ho (CMU) Limitations of Monte Carlo Direct (unconditional) sampling Hard to get rare events

More information

2 Random Variable Generation

2 Random Variable Generation 2 Random Variable Generation Most Monte Carlo computations require, as a starting point, a sequence of i.i.d. random variables with given marginal distribution. We describe here some of the basic methods

More information

Markov Chain Monte Carlo (MCMC)

Markov Chain Monte Carlo (MCMC) Markov Chain Monte Carlo (MCMC Dependent Sampling Suppose we wish to sample from a density π, and we can evaluate π as a function but have no means to directly generate a sample. Rejection sampling can

More information

Computational Physics (6810): Session 13

Computational Physics (6810): Session 13 Computational Physics (6810): Session 13 Dick Furnstahl Nuclear Theory Group OSU Physics Department April 14, 2017 6810 Endgame Various recaps and followups Random stuff (like RNGs :) Session 13 stuff

More information

Answers and expectations

Answers and expectations Answers and expectations For a function f(x) and distribution P(x), the expectation of f with respect to P is The expectation is the average of f, when x is drawn from the probability distribution P E

More information

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

CS242: Probabilistic Graphical Models Lecture 7B: Markov Chain Monte Carlo & Gibbs Sampling CS242: Probabilistic Graphical Models Lecture 7B: Markov Chain Monte Carlo & Gibbs Sampling Professor Erik Sudderth Brown University Computer Science October 27, 2016 Some figures and materials courtesy

More information

Today: Fundamentals of Monte Carlo

Today: Fundamentals of Monte Carlo Today: Fundamentals of Monte Carlo What is Monte Carlo? Named at Los Alamos in 940 s after the casino. Any method which uses (pseudo)random numbers as an essential part of the algorithm. Stochastic - not

More information

Bayesian Methods with Monte Carlo Markov Chains II

Bayesian Methods with Monte Carlo Markov Chains II Bayesian Methods with Monte Carlo Markov Chains II Henry Horng-Shing Lu Institute of Statistics National Chiao Tung University hslu@stat.nctu.edu.tw http://tigpbp.iis.sinica.edu.tw/courses.htm 1 Part 3

More information

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

ABSTRACT. We measure the efficiency of the Metropolis, Swendsen-Wang, and Wolff algorithms in ABSTRACT KYIMBA, ELOI-ALAIN KYALONDAWA. Comparison of Monte Carlo Metropolis, Swendsen-Wang, and Wolff Algorithms in the Critical Region for the 2-Dimensional Ising Model. (Under the direction of Dean

More information

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

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods: Markov Chain Monte Carlo Group Prof. Daniel Cremers 11. Sampling Methods: Markov Chain Monte Carlo Markov Chain Monte Carlo In high-dimensional spaces, rejection sampling and importance sampling are very inefficient An alternative

More information

Monte Caro simulations

Monte Caro simulations Monte Caro simulations Monte Carlo methods - based on random numbers Stanislav Ulam s terminology - his uncle frequented the Casino in Monte Carlo Random (pseudo random) number generator on the computer

More information

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

Wang-Landau sampling for Quantum Monte Carlo. Stefan Wessel Institut für Theoretische Physik III Universität Stuttgart Wang-Landau sampling for Quantum Monte Carlo Stefan Wessel Institut für Theoretische Physik III Universität Stuttgart Overview Classical Monte Carlo First order phase transitions Classical Wang-Landau

More information

Today: Fundamentals of Monte Carlo

Today: Fundamentals of Monte Carlo Today: Fundamentals of Monte Carlo What is Monte Carlo? Named at Los Alamos in 1940 s after the casino. Any method which uses (pseudo)random numbers as an essential part of the algorithm. Stochastic -

More information

Numerical integration and importance sampling

Numerical integration and importance sampling 2 Numerical integration and importance sampling 2.1 Quadrature Consider the numerical evaluation of the integral I(a, b) = b a dx f(x) Rectangle rule: on small interval, construct interpolating function

More information

Computer Vision Group Prof. Daniel Cremers. 14. Sampling Methods

Computer Vision Group Prof. Daniel Cremers. 14. Sampling Methods Prof. Daniel Cremers 14. Sampling Methods Sampling Methods Sampling Methods are widely used in Computer Science as an approximation of a deterministic algorithm to represent uncertainty without a parametric

More information

Monte Carlo Simulations

Monte Carlo Simulations Monte Carlo Simulations What are Monte Carlo Simulations and why ones them? Pseudo Random Number generators Creating a realization of a general PDF The Bootstrap approach A real life example: LOFAR simulations

More information

April 20th, Advanced Topics in Machine Learning California Institute of Technology. Markov Chain Monte Carlo for Machine Learning

April 20th, Advanced Topics in Machine Learning California Institute of Technology. Markov Chain Monte Carlo for Machine Learning for for Advanced Topics in California Institute of Technology April 20th, 2017 1 / 50 Table of Contents for 1 2 3 4 2 / 50 History of methods for Enrico Fermi used to calculate incredibly accurate predictions

More information

Autocorrelation Study for a Coarse-Grained Polymer Model

Autocorrelation Study for a Coarse-Grained Polymer Model Autocorrelation Study for a Coarse-Grained Polymer Model KaiK.Qi and andmichael M. Bachmann Bachmann he Center for CSP,UGA Simulational Physics he University of Georgia alk given at the 14th Leipzig Workshop

More information

Markov Chains and MCMC

Markov Chains and MCMC Markov Chains and MCMC Markov chains Let S = {1, 2,..., N} be a finite set consisting of N states. A Markov chain Y 0, Y 1, Y 2,... is a sequence of random variables, with Y t S for all points in time

More information

6 Markov Chain Monte Carlo (MCMC)

6 Markov Chain Monte Carlo (MCMC) 6 Markov Chain Monte Carlo (MCMC) The underlying idea in MCMC is to replace the iid samples of basic MC methods, with dependent samples from an ergodic Markov chain, whose limiting (stationary) distribution

More information

Physics 115/242 Monte Carlo simulations in Statistical Physics

Physics 115/242 Monte Carlo simulations in Statistical Physics Physics 115/242 Monte Carlo simulations in Statistical Physics Peter Young (Dated: May 12, 2007) For additional information on the statistical Physics part of this handout, the first two sections, I strongly

More information

Markov chain Monte Carlo

Markov chain Monte Carlo 1 / 26 Markov chain Monte Carlo Timothy Hanson 1 and Alejandro Jara 2 1 Division of Biostatistics, University of Minnesota, USA 2 Department of Statistics, Universidad de Concepción, Chile IAP-Workshop

More information

Lecture 6: Monte-Carlo methods

Lecture 6: Monte-Carlo methods Miranda Holmes-Cerfon Applied Stochastic Analysis, Spring 2015 Lecture 6: Monte-Carlo methods Readings Recommended: handout on Classes site, from notes by Weinan E, Tiejun Li, and Eric Vanden-Eijnden Optional:

More information

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

Data Analysis I. Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK. 10 lectures, beginning October 2006 Astronomical p( y x, I) p( x, I) p ( x y, I) = p( y, I) Data Analysis I Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK 10 lectures, beginning October 2006 4. Monte Carlo Methods

More information

Markov Chain Monte Carlo Simulations and Their Statistical Analysis An Overview

Markov Chain Monte Carlo Simulations and Their Statistical Analysis An Overview 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

More information

MCMC and Gibbs Sampling. Sargur Srihari

MCMC and Gibbs Sampling. Sargur Srihari MCMC and Gibbs Sampling Sargur srihari@cedar.buffalo.edu 1 Topics 1. Markov Chain Monte Carlo 2. Markov Chains 3. Gibbs Sampling 4. Basic Metropolis Algorithm 5. Metropolis-Hastings Algorithm 6. Slice

More information

Introduction to MCMC. DB Breakfast 09/30/2011 Guozhang Wang

Introduction to MCMC. DB Breakfast 09/30/2011 Guozhang Wang Introduction to MCMC DB Breakfast 09/30/2011 Guozhang Wang Motivation: Statistical Inference Joint Distribution Sleeps Well Playground Sunny Bike Ride Pleasant dinner Productive day Posterior Estimation

More information

Introduction to Machine Learning CMU-10701

Introduction to Machine Learning CMU-10701 Introduction to Machine Learning CMU-10701 Markov Chain Monte Carlo Methods Barnabás Póczos Contents Markov Chain Monte Carlo Methods Sampling Rejection Importance Hastings-Metropolis Gibbs Markov Chains

More information

Methods of Data Analysis Random numbers, Monte Carlo integration, and Stochastic Simulation Algorithm (SSA / Gillespie)

Methods of Data Analysis Random numbers, Monte Carlo integration, and Stochastic Simulation Algorithm (SSA / Gillespie) Methods of Data Analysis Random numbers, Monte Carlo integration, and Stochastic Simulation Algorithm (SSA / Gillespie) Week 1 1 Motivation Random numbers (RNs) are of course only pseudo-random when generated

More information

Cheng Soon Ong & Christian Walder. Canberra February June 2018

Cheng Soon Ong & Christian Walder. Canberra February June 2018 Cheng Soon Ong & Christian Walder Research Group and College of Engineering and Computer Science Canberra February June 2018 Outlines Overview Introduction Linear Algebra Probability Linear Regression

More information

CPSC 540: Machine Learning

CPSC 540: Machine Learning CPSC 540: Machine Learning MCMC and Non-Parametric Bayes Mark Schmidt University of British Columbia Winter 2016 Admin I went through project proposals: Some of you got a message on Piazza. No news is

More information

Sampling Distributions Allen & Tildesley pgs and Numerical Recipes on random numbers

Sampling Distributions Allen & Tildesley pgs and Numerical Recipes on random numbers Sampling Distributions Allen & Tildesley pgs. 345-351 and Numerical Recipes on random numbers Today I explain how to generate a non-uniform probability distributions. These are used in importance sampling

More information

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

Monte Carlo. Lecture 15 4/9/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky Monte Carlo Lecture 15 4/9/18 1 Sampling with dynamics In Molecular Dynamics we simulate evolution of a system over time according to Newton s equations, conserving energy Averages (thermodynamic properties)

More information

Phase transitions and finite-size scaling

Phase transitions and finite-size scaling Phase transitions and finite-size scaling Critical slowing down and cluster methods. Theory of phase transitions/ RNG Finite-size scaling Detailed treatment: Lectures on Phase Transitions and the Renormalization

More information

19 : Slice Sampling and HMC

19 : Slice Sampling and HMC 10-708: Probabilistic Graphical Models 10-708, Spring 2018 19 : Slice Sampling and HMC Lecturer: Kayhan Batmanghelich Scribes: Boxiang Lyu 1 MCMC (Auxiliary Variables Methods) In inference, we are often

More information

National Sun Yat-Sen University CSE Course: Information Theory. Maximum Entropy and Spectral Estimation

National Sun Yat-Sen University CSE Course: Information Theory. Maximum Entropy and Spectral Estimation Maximum Entropy and Spectral Estimation 1 Introduction What is the distribution of velocities in the gas at a given temperature? It is the Maxwell-Boltzmann distribution. The maximum entropy distribution

More information

in Computer Simulations for Bioinformatics

in Computer Simulations for Bioinformatics Bi04a_ Unit 04a: Stochastic Processes and their Applications in Computer Simulations for Bioinformatics Stochastic Processes and their Applications in Computer Simulations for Bioinformatics Basic Probability

More information

General Principles in Random Variates Generation

General Principles in Random Variates Generation General Principles in Random Variates Generation E. Moulines and G. Fort Telecom ParisTech June 2015 Bibliography : Luc Devroye, Non-Uniform Random Variate Generator, Springer-Verlag (1986) available on

More information

Markov Chain Monte Carlo Lecture 1

Markov Chain Monte Carlo Lecture 1 What are Monte Carlo Methods? The subject of Monte Carlo methods can be viewed as a branch of experimental mathematics in which one uses random numbers to conduct experiments. Typically the experiments

More information

Guiding Monte Carlo Simulations with Machine Learning

Guiding Monte Carlo Simulations with Machine Learning Guiding Monte Carlo Simulations with Machine Learning Yang Qi Department of Physics, Massachusetts Institute of Technology Joining Fudan University in 2017 KITS, June 29 2017. 1/ 33 References Works led

More information

Markov Chains and MCMC

Markov Chains and MCMC Markov Chains and MCMC CompSci 590.02 Instructor: AshwinMachanavajjhala Lecture 4 : 590.02 Spring 13 1 Recap: Monte Carlo Method If U is a universe of items, and G is a subset satisfying some property,

More information

Metropolis Monte Carlo simulation of the Ising Model

Metropolis Monte Carlo simulation of the Ising Model Metropolis Monte Carlo simulation of the Ising Model Krishna Shrinivas (CH10B026) Swaroop Ramaswamy (CH10B068) May 10, 2013 Modelling and Simulation of Particulate Processes (CH5012) Introduction The Ising

More information

Monte Carlo Methods in Statistical Physics: I. Error analysis for uncorrelated data

Monte Carlo Methods in Statistical Physics: I. Error analysis for uncorrelated data 1 Monte Carlo Methods in Statistical Physics: I. Error analysis for uncorrelated data Andrea Pelissetto Andrea.Pelissetto@roma1.infn.it Dipartimento di Fisica Università di Roma La Sapienza Statistical

More information

Sampling Methods (11/30/04)

Sampling Methods (11/30/04) CS281A/Stat241A: Statistical Learning Theory Sampling Methods (11/30/04) Lecturer: Michael I. Jordan Scribe: Jaspal S. Sandhu 1 Gibbs Sampling Figure 1: Undirected and directed graphs, respectively, with

More information

16 : Approximate Inference: Markov Chain Monte Carlo

16 : Approximate Inference: Markov Chain Monte Carlo 10-708: Probabilistic Graphical Models 10-708, Spring 2017 16 : Approximate Inference: Markov Chain Monte Carlo Lecturer: Eric P. Xing Scribes: Yuan Yang, Chao-Ming Yen 1 Introduction As the target distribution

More information

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods Prof. Daniel Cremers 11. Sampling Methods Sampling Methods Sampling Methods are widely used in Computer Science as an approximation of a deterministic algorithm to represent uncertainty without a parametric

More information

CSC 2541: Bayesian Methods for Machine Learning

CSC 2541: Bayesian Methods for Machine Learning CSC 2541: Bayesian Methods for Machine Learning Radford M. Neal, University of Toronto, 2011 Lecture 3 More Markov Chain Monte Carlo Methods The Metropolis algorithm isn t the only way to do MCMC. We ll

More information

Simulation. Where real stuff starts

Simulation. Where real stuff starts 1 Simulation Where real stuff starts ToC 1. What is a simulation? 2. Accuracy of output 3. Random Number Generators 4. How to sample 5. Monte Carlo 6. Bootstrap 2 1. What is a simulation? 3 What is a simulation?

More information

From Random Numbers to Monte Carlo. Random Numbers, Random Walks, Diffusion, Monte Carlo integration, and all that

From Random Numbers to Monte Carlo. Random Numbers, Random Walks, Diffusion, Monte Carlo integration, and all that From Random Numbers to Monte Carlo Random Numbers, Random Walks, Diffusion, Monte Carlo integration, and all that Random Walk Through Life Random Walk Through Life If you flip the coin 5 times you will

More information

SAMPLING ALGORITHMS. In general. Inference in Bayesian models

SAMPLING ALGORITHMS. In general. Inference in Bayesian models SAMPLING ALGORITHMS SAMPLING ALGORITHMS In general A sampling algorithm is an algorithm that outputs samples x 1, x 2,... from a given distribution P or density p. Sampling algorithms can for example be

More information

Stat 516, Homework 1

Stat 516, Homework 1 Stat 516, Homework 1 Due date: October 7 1. Consider an urn with n distinct balls numbered 1,..., n. We sample balls from the urn with replacement. Let N be the number of draws until we encounter a ball

More information

Numerical methods for lattice field theory

Numerical methods for lattice field theory Numerical methods for lattice field theory Mike Peardon Trinity College Dublin August 9, 2007 Mike Peardon (Trinity College Dublin) Numerical methods for lattice field theory August 9, 2007 1 / 24 Numerical

More information

( ) ( ) Monte Carlo Methods Interested in. E f X = f x d x. Examples:

( ) ( ) Monte Carlo Methods Interested in. E f X = f x d x. Examples: Monte Carlo Methods Interested in Examples: µ E f X = f x d x Type I error rate of a hypothesis test Mean width of a confidence interval procedure Evaluating a likelihood Finding posterior mean and variance

More information

Lecture 15 Random variables

Lecture 15 Random variables Lecture 15 Random variables Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical Sciences, Peking University, tieli@pku.edu.cn No.1

More information

Markov Processes. Stochastic process. Markov process

Markov Processes. Stochastic process. Markov process Markov Processes Stochastic process movement through a series of well-defined states in a way that involves some element of randomness for our purposes, states are microstates in the governing ensemble

More information

The University of Auckland Applied Mathematics Bayesian Methods for Inverse Problems : why and how Colin Fox Tiangang Cui, Mike O Sullivan (Auckland),

The University of Auckland Applied Mathematics Bayesian Methods for Inverse Problems : why and how Colin Fox Tiangang Cui, Mike O Sullivan (Auckland), The University of Auckland Applied Mathematics Bayesian Methods for Inverse Problems : why and how Colin Fox Tiangang Cui, Mike O Sullivan (Auckland), Geoff Nicholls (Statistics, Oxford) fox@math.auckland.ac.nz

More information

Wang-Landau Monte Carlo simulation. Aleš Vítek IT4I, VP3

Wang-Landau Monte Carlo simulation. Aleš Vítek IT4I, VP3 Wang-Landau Monte Carlo simulation Aleš Vítek IT4I, VP3 PART 1 Classical Monte Carlo Methods Outline 1. Statistical thermodynamics, ensembles 2. Numerical evaluation of integrals, crude Monte Carlo (MC)

More information

Markov chain Monte Carlo

Markov chain Monte Carlo Markov chain Monte Carlo Peter Beerli October 10, 2005 [this chapter is highly influenced by chapter 1 in Markov chain Monte Carlo in Practice, eds Gilks W. R. et al. Chapman and Hall/CRC, 1996] 1 Short

More information

General Construction of Irreversible Kernel in Markov Chain Monte Carlo

General Construction of Irreversible Kernel in Markov Chain Monte Carlo General Construction of Irreversible Kernel in Markov Chain Monte Carlo Metropolis heat bath Suwa Todo Department of Applied Physics, The University of Tokyo Department of Physics, Boston University (from

More information

The Particle Filter. PD Dr. Rudolph Triebel Computer Vision Group. Machine Learning for Computer Vision

The Particle Filter. PD Dr. Rudolph Triebel Computer Vision Group. Machine Learning for Computer Vision The Particle Filter Non-parametric implementation of Bayes filter Represents the belief (posterior) random state samples. by a set of This representation is approximate. Can represent distributions that

More information

Critical Dynamics of Two-Replica Cluster Algorithms

Critical Dynamics of Two-Replica Cluster Algorithms University of Massachusetts Amherst From the SelectedWorks of Jonathan Machta 2001 Critical Dynamics of Two-Replica Cluster Algorithms X. N. Li Jonathan Machta, University of Massachusetts Amherst Available

More information

Independent Events. Two events are independent if knowing that one occurs does not change the probability of the other occurring

Independent Events. Two events are independent if knowing that one occurs does not change the probability of the other occurring Independent Events Two events are independent if knowing that one occurs does not change the probability of the other occurring Conditional probability is denoted P(A B), which is defined to be: P(A and

More information

Numerical integration - I. M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V

Numerical integration - I. M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V Numerical integration - I M. Peressi - UniTS - Laurea Magistrale in Physics Laboratory of Computational Physics - Unit V deterministic methods in 1D equispaced points (trapezoidal, Simpson...), others...

More information

Stochastic optimization Markov Chain Monte Carlo

Stochastic optimization Markov Chain Monte Carlo Stochastic optimization Markov Chain Monte Carlo Ethan Fetaya Weizmann Institute of Science 1 Motivation Markov chains Stationary distribution Mixing time 2 Algorithms Metropolis-Hastings Simulated Annealing

More information

Math 456: Mathematical Modeling. Tuesday, April 9th, 2018

Math 456: Mathematical Modeling. Tuesday, April 9th, 2018 Math 456: Mathematical Modeling Tuesday, April 9th, 2018 The Ergodic theorem Tuesday, April 9th, 2018 Today 1. Asymptotic frequency (or: How to use the stationary distribution to estimate the average amount

More information

Monte Carlo Simulation of Spins

Monte Carlo Simulation of Spins Monte Carlo Simulation of Spins Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering &

More information

Lecture 7 and 8: Markov Chain Monte Carlo

Lecture 7 and 8: Markov Chain Monte Carlo Lecture 7 and 8: Markov Chain Monte Carlo 4F13: Machine Learning Zoubin Ghahramani and Carl Edward Rasmussen Department of Engineering University of Cambridge http://mlg.eng.cam.ac.uk/teaching/4f13/ Ghahramani

More information

Stat 451 Lecture Notes Markov Chain Monte Carlo. Ryan Martin UIC

Stat 451 Lecture Notes Markov Chain Monte Carlo. Ryan Martin UIC Stat 451 Lecture Notes 07 12 Markov Chain Monte Carlo Ryan Martin UIC www.math.uic.edu/~rgmartin 1 Based on Chapters 8 9 in Givens & Hoeting, Chapters 25 27 in Lange 2 Updated: April 4, 2016 1 / 42 Outline

More information

OBJECTIVES Use the area under a graph to find total cost. Use rectangles to approximate the area under a graph.

OBJECTIVES Use the area under a graph to find total cost. Use rectangles to approximate the area under a graph. 4.1 The Area under a Graph OBJECTIVES Use the area under a graph to find total cost. Use rectangles to approximate the area under a graph. 4.1 The Area Under a Graph Riemann Sums (continued): In the following

More information

4. Cluster update algorithms

4. Cluster update algorithms 4. Cluster update algorithms Cluster update algorithms are the most succesful global update methods in use. These methods update the variables globally, in one step, whereas the standard local methods

More information

Random Walks A&T and F&S 3.1.2

Random Walks A&T and F&S 3.1.2 Random Walks A&T 110-123 and F&S 3.1.2 As we explained last time, it is very difficult to sample directly a general probability distribution. - If we sample from another distribution, the overlap will

More information

Winter 2019 Math 106 Topics in Applied Mathematics. Lecture 9: Markov Chain Monte Carlo

Winter 2019 Math 106 Topics in Applied Mathematics. Lecture 9: Markov Chain Monte Carlo Winter 2019 Math 106 Topics in Applied Mathematics Data-driven Uncertainty Quantification Yoonsang Lee (yoonsang.lee@dartmouth.edu) Lecture 9: Markov Chain Monte Carlo 9.1 Markov Chain A Markov Chain Monte

More information

Markov Chain Monte Carlo Using the Ratio-of-Uniforms Transformation. Luke Tierney Department of Statistics & Actuarial Science University of Iowa

Markov Chain Monte Carlo Using the Ratio-of-Uniforms Transformation. Luke Tierney Department of Statistics & Actuarial Science University of Iowa Markov Chain Monte Carlo Using the Ratio-of-Uniforms Transformation Luke Tierney Department of Statistics & Actuarial Science University of Iowa Basic Ratio of Uniforms Method Introduced by Kinderman and

More information