Expectations, Markov chains, and the Metropolis algorithm

Size: px
Start display at page:

Download "Expectations, Markov chains, and the Metropolis algorithm"

Transcription

1 Expectations, Markov chains, and the Metropolis algorithm Peter Hoff Departments of Statistics and Biostatistics and the Center for Statistics and the Social Sciences University of Washington

2 Outline of the lecture and lab 1. Expectation of a random variable 2. Law of large numbers 3. Monte Carlo techniques 4. The Ising model 5. Markov chains 6. The Metropolis algorithm 7. Coupling of Markov chains: a card trick 2

3 Probability Probability models for uncertain events are common across the natural and social sciences: Genetics : Given the disease history of a set of parents and grandparents, what is the probability that a child will have a genetic disease? Finance : Given the current state of the economy and market, what is the probability that a set of stocks will increase in value today? Physics : Given a magnetic field around a set of magnetically charged particles, what is the probable orientation of the particles? The probability distribution of a random process tells us how probable certain outcomes of that process are. Let A 1, A 2,..., A K be the possible outcomes of the process. Then 0 < Pr(A k ) < 1 K Pr(A k ) = 1 k=1 3

4 Expectations Often we are interested in the value of a function of the random process: Genetics : Lifespan may be a function of randomly inherited genetic traits, as well as environmental and other factors. Finance : The value of a stock portfolio is the sum of the values of the individual stocks. Physics : The energy stored in a set of magentically charged particles is a function of their orientation. The expected value of a function is a weighted average of the function, evaluated at the possible outcomes of the random process. If f is the function of interest, then the expected value is given by E[f] = f(a 1 ) Pr(A 1 ) + f(a 2 ) Pr(A 2 ) + + f(a K ) Pr(A K ) K = f(a k ) Pr(A k ) k=1 4

5 Dart Throwing Example

6 Dart Throwing Example Suppose someone throws darts uniformly over the 3 3 board. After many throws, what do you expect their average score to be? Letting x and y denote the horizontal and vertical locations of the darts, the score is a function of x and y. score(x, y) = 0 if 3 < x 2 + y 2 = 1 if 2 < x 2 + y 2 3 = 2 if 1 < x 2 + y 2 2 = 3 if x2 + y 2 1 E[score(x, y)] = 0 Pr(3 < x 2 + y 2 ) + 1 Pr(2 < x 2 + y 2 3) + 2 Pr(1 < x 2 + y 2 2) + 3 Pr( x 2 + y 2 1) 6

7 The Law of Large Numbers and the Monte Carlo Method If x 1, x 2,..., x n are independent experiments with the same probability distribution as x, then 1 n [f(x 1) + f(x 2 ) + f(x n )] E[f(x)], and the approximation gets better as n gets larger. The law of large numbers says that if I repeat an experiment over and over, the long run average converges to the expected value. Dart Throwing Example: Sample, or simulate (x 1, y 1 ), (x 2, y 2 ),..., (x n, y n ) Then 1 n score(x i, y i ) E[score(x, y)] n i=1 This is called the Monte Carlo method for approximating expectations. Note we can also use this method to approximate areas of complicated regions, and other integrals. 7

8 A More Complicated Distribution x coordinate y coordinate 8

9 A Much More Complicated Distribution: Magnetic Fields The motion of electrons around a nucleus creates a magnetic field, and so atoms can be thought of as magnets. A magnetic field from a group of atoms is the result of a balance between two different physical principles: Energy Minimization: The lowest energy state of a group of atoms would have them all aligned in the same direction, giving a huge magnetic field. Entropy Maximization: The configuration with all K atoms pointing in a given direction is one configuration out of a huge number of possible configurations (2 K ), and (without considering energy) has an extremely low probability (1/2 K ). 9

10 A Lattice of Magnets Let the state of the system be denoted by a vector or matrix s of + s and - s. s = {..., +,, +,,,, +,, +, +,...} 10

11 The Boltzmann distribution and the Ising Model for Lattices The Boltzmann probability distribution says that the probability that a system is in state s is given by where Pr(s) = e Eng(s)/kT r S e Eng(r)/kT S is the set of all possible states; T is the temperature of the system; k is a known constant. The Ising model says that the energy of a state s is given by Eng(s) = a i j s i s j + b n i=1 s i 11

12 Computing the expected magnetization (or anything else) The magnetization of a state s is given by m(s) = n s i = number of + s - number of s. i=1 Given k and T, can we compute the expected magnetization E[m(s)] with a calculator? E[m(s)] = s S m(s) Pr(s) No, the number of terms in the sum is too large. Can we use Monte Carlo sampling? Pr(s) = e Eng(s)/kT /c(k, T ) No, even for moderate lattice sizes we can t compute c(k, T )! What can we compute? We can compute the relative probabilities of any two states:. Pr(s) Pr(r) = exp{[eng(r) Eng(s)]/kT } 12

13 Markov chains A Markov chain is defined as a sequence x 1, x 2,... of dependent random variables, such that the distribution for the current variable, given the past, only depends on the most recent variable : Pr(x t x t 1, x t 2,..., x 1 ) = Pr(x t x t 1 ) The probability Pr(x t x t 1 ) is called the transition distribution, and is sometimes written T (x t x t 1 ). A Markov chain can be completely described by T and a starting value x 0. Examples: The drunkard s walk Brownian motion 13

14 The Ergodic Theorem for Markov chains Suppose a Markov chain is constructed from a starting value x 0 and transition distribution T : Then, under some conditions x 1 T (x x 0 ) x 2 T (x x 1 ) x 3 T (x x 2 ). x n T (x x n 1 ) 1 n n f(x i ) E[f(x)] = x i=1 f(x) Pr(x), where Pr(x) is the stationary distribution of the Markov chain, and doesn t depend on x 0! 14

15 Example: Two dimensional reflecting random walk At simulation step t, let x t = x t z x y t = y t z y where z x and z y are samples from the uniform distribution on (.1,.1), and are independent from step to step. Questions: Is this a Markov chain? What is your guess for 1 n n i=1 x i? for 1 n n i=1 y i? 15

16 Application to the Ising Model The Metropolis Algorithm: Suppose at step t the system is in state s. The state for step t + 1 is generated as follows: For each site i of the lattice in random order 1. Propose a new state s where s i is the opposite of s i. For example, if i=3 and s = {, +, +,, +,...}, then s = {, +,,, +,...}. 2. Compute the energy difference between states s and s Eng(s ) Eng(s) = a (s i s i)s j + b(s i s i) j:j i 3. Use this to compute the Metropolis ratio R(s, s) = Pr(s ) Pr(s) = exp{[eng(s) Eng(s )]/kt } 4. Replace s i by s i with probability R(s, s). Note if R(s, s) > 1, then we replace with probability 1. Completion of the replacement procedure at each site constitutes the (t + 1)st scan of the algorithm. The resulting value of s is the state at time t

17 Properties of the Metropolis Algorithm The algorithm is a Markov chain. The stationary distribution of the Markov chain is the Boltzmann distribution (just what we wanted!) Pr(s) = e Eng(s)/kT r S e Eng(r)/kT Because of the Ergodic theorem, we can calculate expectations of functions using samples from the Metropolis algorithm: 1 L L f(s (l) ) E[f(s)] = f(s) Pr(s), s S l=1 The algorithm is like the Monte Carlo method, but is based on a Markov chain of dependent samples, rather than independent samples. It is called a Markov chain Monte Carlo (MCMC) algorithm. 17

18 The General Metropolis Algorithm Suppose our goal is to draw samples from a distribution Pr(s), but we can t compute Pr(s), only relative probabilities Pr(s)/ Pr(r). We can construct a Markov chain with Pr(s) as the stationary distribution as follows. At step t, generate s (t+1) from s (t) by 1. sampling a proposal s from a (symmetric) proposal distribution J(s s (t) ) 2. computing the Metropolis ratio R(s, s (t) ) = Pr(s )/ Pr(s (t) ) 3. letting s (t+1) = s with probability R(s, s (t) ) s (t) with probability 1 R(s, s (t) ). Under some additional conditions, we have 1 T T t=1 f(s (t) ) E[f(s)] = s S f(s) Pr(s) as T Why does this work? 18

19 Summary For simple distributions Pr(x), we can calculate expectations of simple functions f(x) by hand. If either Pr(x) or f(x) is complicated, but we can sample from Pr(x), then we can use the Monte Carlo approach to estimating E[f(x)]. If we can t even sample from Pr(x), but we can at least compute relative probabilities Pr(x )/ Pr(x), then we can use the Metropolis or other MCMC algorithms. 19

Introduction to Computational Biology Lecture # 14: MCMC - Markov Chain Monte Carlo

Introduction to Computational Biology Lecture # 14: MCMC - Markov Chain Monte Carlo Introduction to Computational Biology Lecture # 14: MCMC - Markov Chain Monte Carlo Assaf Weiner Tuesday, March 13, 2007 1 Introduction Today we will return to the motif finding problem, in lecture 10

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

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

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

Machine Learning for Data Science (CS4786) Lecture 24

Machine Learning for Data Science (CS4786) Lecture 24 Machine Learning for Data Science (CS4786) Lecture 24 Graphical Models: Approximate Inference Course Webpage : http://www.cs.cornell.edu/courses/cs4786/2016sp/ BELIEF PROPAGATION OR MESSAGE PASSING Each

More information

High-dimensional Problems in Finance and Economics. Thomas M. Mertens

High-dimensional Problems in Finance and Economics. Thomas M. Mertens High-dimensional Problems in Finance and Economics Thomas M. Mertens NYU Stern Risk Economics Lab April 17, 2012 1 / 78 Motivation Many problems in finance and economics are high dimensional. Dynamic Optimization:

More information

1 Probabilities. 1.1 Basics 1 PROBABILITIES

1 Probabilities. 1.1 Basics 1 PROBABILITIES 1 PROBABILITIES 1 Probabilities Probability is a tricky word usually meaning the likelyhood of something occuring or how frequent something is. Obviously, if something happens frequently, then its probability

More information

SC7/SM6 Bayes Methods HT18 Lecturer: Geoff Nicholls Lecture 2: Monte Carlo Methods Notes and Problem sheets are available at http://www.stats.ox.ac.uk/~nicholls/bayesmethods/ and via the MSc weblearn pages.

More information

1 Probabilities. 1.1 Basics 1 PROBABILITIES

1 Probabilities. 1.1 Basics 1 PROBABILITIES 1 PROBABILITIES 1 Probabilities Probability is a tricky word usually meaning the likelyhood of something occuring or how frequent something is. Obviously, if something happens frequently, then its probability

More information

LECTURE 15 Markov chain Monte Carlo

LECTURE 15 Markov chain Monte Carlo LECTURE 15 Markov chain Monte Carlo There are many settings when posterior computation is a challenge in that one does not have a closed form expression for the posterior distribution. Markov chain Monte

More information

Markov chain Monte Carlo

Markov chain Monte Carlo Markov chain Monte Carlo Feng Li feng.li@cufe.edu.cn School of Statistics and Mathematics Central University of Finance and Economics Revised on April 24, 2017 Today we are going to learn... 1 Markov Chains

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

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

Theory of Stochastic Processes 8. Markov chain Monte Carlo

Theory of Stochastic Processes 8. Markov chain Monte Carlo Theory of Stochastic Processes 8. Markov chain Monte Carlo Tomonari Sei sei@mist.i.u-tokyo.ac.jp Department of Mathematical Informatics, University of Tokyo June 8, 2017 http://www.stat.t.u-tokyo.ac.jp/~sei/lec.html

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

Sampling Rejection Sampling Importance Sampling Markov Chain Monte Carlo. Sampling Methods. Oliver Schulte - CMPT 419/726. Bishop PRML Ch.

Sampling Rejection Sampling Importance Sampling Markov Chain Monte Carlo. Sampling Methods. Oliver Schulte - CMPT 419/726. Bishop PRML Ch. Sampling Methods Oliver Schulte - CMP 419/726 Bishop PRML Ch. 11 Recall Inference or General Graphs Junction tree algorithm is an exact inference method for arbitrary graphs A particular tree structure

More information

Simulation of the two-dimensional square-lattice Lenz-Ising model in Python

Simulation of the two-dimensional square-lattice Lenz-Ising model in Python Senior Thesis Simulation of the two-dimensional square-lattice Lenz-Ising model in Python Author: Richard Munroe Advisor: Dr. Edward Brash 2012-10-17 Abstract A program to simulate the the two-dimensional

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

Markov Chains on Countable State Space

Markov Chains on Countable State Space Markov Chains on Countable State Space 1 Markov Chains Introduction 1. Consider a discrete time Markov chain {X i, i = 1, 2,...} that takes values on a countable (finite or infinite) set S = {x 1, x 2,...},

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

7.1 Coupling from the Past

7.1 Coupling from the Past Georgia Tech Fall 2006 Markov Chain Monte Carlo Methods Lecture 7: September 12, 2006 Coupling from the Past Eric Vigoda 7.1 Coupling from the Past 7.1.1 Introduction We saw in the last lecture how Markov

More information

Inventory Model (Karlin and Taylor, Sec. 2.3)

Inventory Model (Karlin and Taylor, Sec. 2.3) stochnotes091108 Page 1 Markov Chain Models and Basic Computations Thursday, September 11, 2008 11:50 AM Homework 1 is posted, due Monday, September 22. Two more examples. Inventory Model (Karlin and Taylor,

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

Introduction to Bayesian Statistics and Markov Chain Monte Carlo Estimation. EPSY 905: Multivariate Analysis Spring 2016 Lecture #10: April 6, 2016

Introduction to Bayesian Statistics and Markov Chain Monte Carlo Estimation. EPSY 905: Multivariate Analysis Spring 2016 Lecture #10: April 6, 2016 Introduction to Bayesian Statistics and Markov Chain Monte Carlo Estimation EPSY 905: Multivariate Analysis Spring 2016 Lecture #10: April 6, 2016 EPSY 905: Intro to Bayesian and MCMC Today s Class An

More information

Monte Carlo (MC) Simulation Methods. Elisa Fadda

Monte Carlo (MC) Simulation Methods. Elisa Fadda Monte Carlo (MC) Simulation Methods Elisa Fadda 1011-CH328, Molecular Modelling & Drug Design 2011 Experimental Observables A system observable is a property of the system state. The system state i is

More information

MCMC: Markov Chain Monte Carlo

MCMC: Markov Chain Monte Carlo I529: Machine Learning in Bioinformatics (Spring 2013) MCMC: Markov Chain Monte Carlo Yuzhen Ye School of Informatics and Computing Indiana University, Bloomington Spring 2013 Contents Review of Markov

More information

Bayes Nets: Sampling

Bayes Nets: Sampling Bayes Nets: Sampling [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at http://ai.berkeley.edu.] Approximate Inference:

More information

STOCHASTIC MODELS LECTURE 1 MARKOV CHAINS. Nan Chen MSc Program in Financial Engineering The Chinese University of Hong Kong (ShenZhen) Sept.

STOCHASTIC MODELS LECTURE 1 MARKOV CHAINS. Nan Chen MSc Program in Financial Engineering The Chinese University of Hong Kong (ShenZhen) Sept. STOCHASTIC MODELS LECTURE 1 MARKOV CHAINS Nan Chen MSc Program in Financial Engineering The Chinese University of Hong Kong (ShenZhen) Sept. 6, 2016 Outline 1. Introduction 2. Chapman-Kolmogrov Equations

More information

The Markov Chain Monte Carlo Method

The Markov Chain Monte Carlo Method The Markov Chain Monte Carlo Method Idea: define an ergodic Markov chain whose stationary distribution is the desired probability distribution. Let X 0, X 1, X 2,..., X n be the run of the chain. The Markov

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

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

Graphical Models. Lecture 15: Approximate Inference by Sampling. Andrew McCallum

Graphical Models. Lecture 15: Approximate Inference by Sampling. Andrew McCallum Graphical Models Lecture 15: Approximate Inference by Sampling Andrew McCallum mccallum@cs.umass.edu Thanks to Noah Smith and Carlos Guestrin for some slide materials. 1 General Idea Set of random variables

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

Markov chain Monte Carlo

Markov chain Monte Carlo Markov chain Monte Carlo Probabilistic Models of Cognition, 2011 http://www.ipam.ucla.edu/programs/gss2011/ Roadmap: Motivation Monte Carlo basics What is MCMC? Metropolis Hastings and Gibbs...more tomorrow.

More information

Bayesian Estimation with Sparse Grids

Bayesian Estimation with Sparse Grids Bayesian Estimation with Sparse Grids Kenneth L. Judd and Thomas M. Mertens Institute on Computational Economics August 7, 27 / 48 Outline Introduction 2 Sparse grids Construction Integration with sparse

More information

STA 4273H: Statistical Machine Learning

STA 4273H: Statistical Machine Learning STA 4273H: Statistical Machine Learning Russ Salakhutdinov Department of Computer Science! Department of Statistical Sciences! rsalakhu@cs.toronto.edu! h0p://www.cs.utoronto.ca/~rsalakhu/ Lecture 7 Approximate

More information

Probability and Samples. Sampling. Point Estimates

Probability and Samples. Sampling. Point Estimates Probability and Samples Sampling We want the results from our sample to be true for the population and not just the sample But our sample may or may not be representative of the population Sampling error

More information

Bayesian GLMs and Metropolis-Hastings Algorithm

Bayesian GLMs and Metropolis-Hastings Algorithm Bayesian GLMs and Metropolis-Hastings Algorithm We have seen that with conjugate or semi-conjugate prior distributions the Gibbs sampler can be used to sample from the posterior distribution. In situations,

More information

Math 151. Rumbos Spring Solutions to Review Problems for Exam 1

Math 151. Rumbos Spring Solutions to Review Problems for Exam 1 Math 5. Rumbos Spring 04 Solutions to Review Problems for Exam. There are 5 red chips and 3 blue chips in a bowl. The red chips are numbered,, 3, 4, 5 respectively, and the blue chips are numbered,, 3

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

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

Markov Chain Monte Carlo Methods

Markov Chain Monte Carlo Methods Markov Chain Monte Carlo Methods p. /36 Markov Chain Monte Carlo Methods Michel Bierlaire michel.bierlaire@epfl.ch Transport and Mobility Laboratory Markov Chain Monte Carlo Methods p. 2/36 Markov Chains

More information

Lecture 3: September 10

Lecture 3: September 10 CS294 Markov Chain Monte Carlo: Foundations & Applications Fall 2009 Lecture 3: September 10 Lecturer: Prof. Alistair Sinclair Scribes: Andrew H. Chan, Piyush Srivastava Disclaimer: These notes have not

More information

Dynamic Risk Measures and Nonlinear Expectations with Markov Chain noise

Dynamic Risk Measures and Nonlinear Expectations with Markov Chain noise Dynamic Risk Measures and Nonlinear Expectations with Markov Chain noise Robert J. Elliott 1 Samuel N. Cohen 2 1 Department of Commerce, University of South Australia 2 Mathematical Insitute, University

More information

Statistics and Quantum Computing

Statistics and Quantum Computing Statistics and Quantum Computing Yazhen Wang Department of Statistics University of Wisconsin-Madison http://www.stat.wisc.edu/ yzwang Workshop on Quantum Computing and Its Application George Washington

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

Disjointness and Additivity

Disjointness and Additivity Midterm 2: Format Midterm 2 Review CS70 Summer 2016 - Lecture 6D David Dinh 28 July 2016 UC Berkeley 8 questions, 190 points, 110 minutes (same as MT1). Two pages (one double-sided sheet) of handwritten

More information

CS 343: Artificial Intelligence

CS 343: Artificial Intelligence CS 343: Artificial Intelligence Bayes Nets: Sampling Prof. Scott Niekum The University of Texas at Austin [These slides based on those of Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley.

More information

Reminder of some Markov Chain properties:

Reminder of some Markov Chain properties: Reminder of some Markov Chain properties: 1. a transition from one state to another occurs probabilistically 2. only state that matters is where you currently are (i.e. given present, future is independent

More information

Advanced Sampling Algorithms

Advanced Sampling Algorithms + Advanced Sampling Algorithms + Mobashir Mohammad Hirak Sarkar Parvathy Sudhir Yamilet Serrano Llerena Advanced Sampling Algorithms Aditya Kulkarni Tobias Bertelsen Nirandika Wanigasekara Malay Singh

More information

Use of Eigen values and eigen vectors to calculate higher transition probabilities

Use of Eigen values and eigen vectors to calculate higher transition probabilities The Lecture Contains : Markov-Bernoulli Chain Note Assignments Random Walks which are correlated Actual examples of Markov Chains Examples Use of Eigen values and eigen vectors to calculate higher transition

More information

Announcements. Inference. Mid-term. Inference by Enumeration. Reminder: Alarm Network. Introduction to Artificial Intelligence. V22.

Announcements. Inference. Mid-term. Inference by Enumeration. Reminder: Alarm Network. Introduction to Artificial Intelligence. V22. Introduction to Artificial Intelligence V22.0472-001 Fall 2009 Lecture 15: Bayes Nets 3 Midterms graded Assignment 2 graded Announcements Rob Fergus Dept of Computer Science, Courant Institute, NYU Slides

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

Absolute Entropy of a 2D Lattice Model for a Denatured Protein

Absolute Entropy of a 2D Lattice Model for a Denatured Protein Absolute Entropy of a 2D Lattice Model for a Denatured Protein Jason Funt 1,4 and Hagai Meirovitch 2,3 1 Bioengineering and Bioinformatics Summer Institute 2 Center for Computational Biology and Bioinformatics,

More information

CS168: The Modern Algorithmic Toolbox Lecture #6: Markov Chain Monte Carlo

CS168: The Modern Algorithmic Toolbox Lecture #6: Markov Chain Monte Carlo CS168: The Modern Algorithmic Toolbox Lecture #6: Markov Chain Monte Carlo Tim Roughgarden & Gregory Valiant April 15, 2015 The previous lecture covered several tools for inferring properties of the distribution

More information

Robert Collins CSE586, PSU Intro to Sampling Methods

Robert Collins CSE586, PSU Intro to Sampling Methods Robert Collins Intro to Sampling Methods CSE586 Computer Vision II Penn State Univ Robert Collins A Brief Overview of Sampling Monte Carlo Integration Sampling and Expected Values Inverse Transform Sampling

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

Doing Physics with Random Numbers

Doing Physics with Random Numbers Doing Physics with Random Numbers Andrew J. Schultz Department of Chemical and Biological Engineering University at Buffalo The State University of New York Concepts Random numbers can be used to measure

More information

Monte Carlo Methods for Computation and Optimization (048715)

Monte Carlo Methods for Computation and Optimization (048715) Technion Department of Electrical Engineering Monte Carlo Methods for Computation and Optimization (048715) Lecture Notes Prof. Nahum Shimkin Spring 2015 i PREFACE These lecture notes are intended for

More information

Midterm 2 Review. CS70 Summer Lecture 6D. David Dinh 28 July UC Berkeley

Midterm 2 Review. CS70 Summer Lecture 6D. David Dinh 28 July UC Berkeley Midterm 2 Review CS70 Summer 2016 - Lecture 6D David Dinh 28 July 2016 UC Berkeley Midterm 2: Format 8 questions, 190 points, 110 minutes (same as MT1). Two pages (one double-sided sheet) of handwritten

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

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

Chapter 7 Probability Basics

Chapter 7 Probability Basics Making Hard Decisions Chapter 7 Probability Basics Slide 1 of 62 Introduction A A,, 1 An Let be an event with possible outcomes: 1 A = Flipping a coin A = {Heads} A 2 = Ω {Tails} The total event (or sample

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

Tutorial Session 2. MCMC for the analysis of genetic data on pedigrees:

Tutorial Session 2. MCMC for the analysis of genetic data on pedigrees: MCMC for the analysis of genetic data on pedigrees: Tutorial Session 2 Elizabeth Thompson University of Washington Genetic mapping and linkage lod scores Monte Carlo likelihood and likelihood ratio estimation

More information

Reinforcement Learning: Part 3 Evolution

Reinforcement Learning: Part 3 Evolution 1 Reinforcement Learning: Part 3 Evolution Chris Watkins Department of Computer Science Royal Holloway, University of London July 27, 2015 2 Cross-entropy method for TSP Simple genetic style methods can

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

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

A = {(x, u) : 0 u f(x)}, Draw x uniformly from the region {x : f(x) u }. Markov Chain Monte Carlo Lecture 5 Slice sampler: Suppose that one is interested in sampling from a density f(x), x X. Recall that sampling x f(x) is equivalent

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

I. Bayesian econometrics

I. Bayesian econometrics I. Bayesian econometrics A. Introduction B. Bayesian inference in the univariate regression model C. Statistical decision theory D. Large sample results E. Diffuse priors F. Numerical Bayesian methods

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

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

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

J ij S i S j B i S i (1) LECTURE 18 The Ising Model (References: Kerson Huang, Statistical Mechanics, Wiley and Sons (1963) and Colin Thompson, Mathematical Statistical Mechanics, Princeton Univ. Press (1972)). One of the simplest

More information

Paul Karapanagiotidis ECO4060

Paul Karapanagiotidis ECO4060 Paul Karapanagiotidis ECO4060 The way forward 1) Motivate why Markov-Chain Monte Carlo (MCMC) is useful for econometric modeling 2) Introduce Markov-Chain Monte Carlo (MCMC) - Metropolis-Hastings (MH)

More information

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic CS 188: Artificial Intelligence Fall 2008 Lecture 16: Bayes Nets III 10/23/2008 Announcements Midterms graded, up on glookup, back Tuesday W4 also graded, back in sections / box Past homeworks in return

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

Asymptotics and Simulation of Heavy-Tailed Processes

Asymptotics and Simulation of Heavy-Tailed Processes Asymptotics and Simulation of Heavy-Tailed Processes Department of Mathematics Stockholm, Sweden Workshop on Heavy-tailed Distributions and Extreme Value Theory ISI Kolkata January 14-17, 2013 Outline

More information

Reduction of Variance. Importance Sampling

Reduction of Variance. Importance Sampling Reduction of Variance As we discussed earlier, the statistical error goes as: error = sqrt(variance/computer time). DEFINE: Efficiency = = 1/vT v = error of mean and T = total CPU time How can you make

More information

References. Markov-Chain Monte Carlo. Recall: Sampling Motivation. Problem. Recall: Sampling Methods. CSE586 Computer Vision II

References. Markov-Chain Monte Carlo. Recall: Sampling Motivation. Problem. Recall: Sampling Methods. CSE586 Computer Vision II References Markov-Chain Monte Carlo CSE586 Computer Vision II Spring 2010, Penn State Univ. Recall: Sampling Motivation If we can generate random samples x i from a given distribution P(x), then we can

More information

Monte Carlo Simulation of the 2D Ising model

Monte Carlo Simulation of the 2D Ising model Monte Carlo Simulation of the 2D Ising model Emanuel Schmidt, F44 April 6, 2 Introduction Monte Carlo methods are a powerful tool to solve problems numerically which are dicult to be handled analytically.

More information

MSc MT15. Further Statistical Methods: MCMC. Lecture 5-6: Markov chains; Metropolis Hastings MCMC. Notes and Practicals available at

MSc MT15. Further Statistical Methods: MCMC. Lecture 5-6: Markov chains; Metropolis Hastings MCMC. Notes and Practicals available at MSc MT15. Further Statistical Methods: MCMC Lecture 5-6: Markov chains; Metropolis Hastings MCMC Notes and Practicals available at www.stats.ox.ac.uk\ nicholls\mscmcmc15 Markov chain Monte Carlo Methods

More information

Monte Carlo Simulation of the Ising Model. Abstract

Monte Carlo Simulation of the Ising Model. Abstract Monte Carlo Simulation of the Ising Model Saryu Jindal 1 1 Department of Chemical Engineering and Material Sciences, University of California, Davis, CA 95616 (Dated: June 9, 2007) Abstract This paper

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

25.1 Markov Chain Monte Carlo (MCMC)

25.1 Markov Chain Monte Carlo (MCMC) CS880: Approximations Algorithms Scribe: Dave Andrzejewski Lecturer: Shuchi Chawla Topic: Approx counting/sampling, MCMC methods Date: 4/4/07 The previous lecture showed that, for self-reducible problems,

More information

Chapter 4 Dynamic Bayesian Networks Fall Jin Gu, Michael Zhang

Chapter 4 Dynamic Bayesian Networks Fall Jin Gu, Michael Zhang Chapter 4 Dynamic Bayesian Networks 2016 Fall Jin Gu, Michael Zhang Reviews: BN Representation Basic steps for BN representations Define variables Define the preliminary relations between variables Check

More information

The Ising model and Markov chain Monte Carlo

The Ising model and Markov chain Monte Carlo The Ising model and Markov chain Monte Carlo Ramesh Sridharan These notes give a short description of the Ising model for images and an introduction to Metropolis-Hastings and Gibbs Markov Chain Monte

More information

Markov-Chain Monte Carlo

Markov-Chain Monte Carlo Markov-Chain Monte Carlo CSE586 Computer Vision II Spring 2010, Penn State Univ. References Recall: Sampling Motivation If we can generate random samples x i from a given distribution P(x), then we can

More information

Markov Chain Monte Carlo Lecture 6

Markov Chain Monte Carlo Lecture 6 Sequential parallel tempering With the development of science and technology, we more and more need to deal with high dimensional systems. For example, we need to align a group of protein or DNA sequences

More information

Information in Biology

Information in Biology Lecture 3: Information in Biology Tsvi Tlusty, tsvi@unist.ac.kr Living information is carried by molecular channels Living systems I. Self-replicating information processors Environment II. III. Evolve

More information

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

Statistical Thermodynamics and Monte-Carlo Evgenii B. Rudnyi and Jan G. Korvink IMTEK Albert Ludwig University Freiburg, Germany Statistical Thermodynamics and Monte-Carlo Evgenii B. Rudnyi and Jan G. Korvink IMTEK Albert Ludwig University Freiburg, Germany Preliminaries Learning Goals From Micro to Macro Statistical Mechanics (Statistical

More information

A Monte Carlo Implementation of the Ising Model in Python

A Monte Carlo Implementation of the Ising Model in Python A Monte Carlo Implementation of the Ising Model in Python Alexey Khorev alexey.s.khorev@gmail.com 2017.08.29 Contents 1 Theory 1 1.1 Introduction...................................... 1 1.2 Model.........................................

More information

Inference in Bayesian Networks

Inference in Bayesian Networks Andrea Passerini passerini@disi.unitn.it Machine Learning Inference in graphical models Description Assume we have evidence e on the state of a subset of variables E in the model (i.e. Bayesian Network)

More information

Lecture 11: Probability, Order Statistics and Sampling

Lecture 11: Probability, Order Statistics and Sampling 5-75: Graduate Algorithms February, 7 Lecture : Probability, Order tatistics and ampling Lecturer: David Whitmer cribes: Ilai Deutel, C.J. Argue Exponential Distributions Definition.. Given sample space

More information

REVIEW: Derivation of the Mean Field Result

REVIEW: Derivation of the Mean Field Result Lecture 18: Mean Field and Metropolis Ising Model Solutions 1 REVIEW: Derivation of the Mean Field Result The Critical Temperature Dependence The Mean Field Approximation assumes that there will be an

More information

Applications of Hidden Markov Models

Applications of Hidden Markov Models 18.417 Introduction to Computational Molecular Biology Lecture 18: November 9, 2004 Scribe: Chris Peikert Lecturer: Ross Lippert Editor: Chris Peikert Applications of Hidden Markov Models Review of Notation

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

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

CS168: The Modern Algorithmic Toolbox Lecture #14: Markov Chain Monte Carlo

CS168: The Modern Algorithmic Toolbox Lecture #14: Markov Chain Monte Carlo CS168: The Modern Algorithmic Toolbox Lecture #14: Markov Chain Monte Carlo Tim Roughgarden & Gregory Valiant May 17, 2018 The previous lecture covered several tools for inferring properties of the distribution

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

CS155: Probability and Computing: Randomized Algorithms and Probabilistic Analysis

CS155: Probability and Computing: Randomized Algorithms and Probabilistic Analysis CS155: Probability and Computing: Randomized Algorithms and Probabilistic Analysis Eli Upfal Eli Upfal@brown.edu Office: 319 TA s: Lorenzo De Stefani and Sorin Vatasoiu cs155tas@cs.brown.edu It is remarkable

More information