Title: Markov Chain Monte Carlo
1Markov Chain Monte Carlo
(MCMC)
2The Metropolis Algorithm
Procedure
3The Metropolis Algorithm
- Accept a move from x to y with probability
- Otherwise, stay at state x.
4Claim This procedure produces a Markov chain
whose stationary distribution is
Proof
5Yuck! Dont go this way to show that
Once we have shown that, we are done since
6So, it remains to show that the detailed balance
condition holds.
7The Metropolis Algorithm
Example
Use the Metropolis algorithm to draw values from
the distribution
8The Metropolis Algorithm
Example (continued)
Find a symmetric candidate density to draw from
how?
9The Metropolis Algorithm
Example (continued)
For this example, lets try
ie if we are at state x, we will draw a
candidate state y from the N(x,1/2) distribution.
10The Metropolis Algorithm
Example (continued)
Specifically,
- draw y from N(x,1/2) I used Box-Muller
11The Metropolis Algorithm
Simulation Results
Output of 10,000 chains, each of length 1,000.
12The Metropolis Algorithm
The Ising Model The Quintessential Example
13The Metropolis Algorithm
The Ising Model The Quintessential Example
- Nnxn sites on a square lattice
- the spin at site i takes on one of two values
14The Metropolis Algorithm
The Ising Model The Quintessential Example
15The Metropolis Algorithm
The Ising Model The Quintessential Example
Assuming N is large and the system is in thermal
equlibrium, the probability that the system is in
state S is given by the Boltzmann probability
distribution
k Boltzmanns constant
T temperature
16The Metropolis Algorithm
The Ising Model Simulation
The standard practice is to use the Metropolis
algorithm
- pick a spin either at random or in sequence
17The Metropolis Algorithm
The Ising Model Simulation
Note that
18The Metropolis Algorithm
The Ising Model Simulation
This standard method can be very slow
- people run simulations like this for several
weeks even for small grids (lt20x20)
19The Metropolis Algorithm
The Random Cluster Model
- Let G be a square lattice graph with undirected
edges.
- Let V be the set of vertices.
- Let E be the set of edges.
20The Metropolis Algorithm
The Random Cluster Model
- A configuration of the random cluster model
(state of a Markov chain) is a random
configuration of edges.
21The Metropolis Algorithm
The Random Cluster Model
22The Metropolis Algorithm
The Random Cluster Model
- The random cluster distribution is defined as
where C(S) is the number of connected regions in
configuration S.
23The Metropolis Algorithm
The Random Cluster Model
where B(S) is the number of bonds in
configuration S.
24The Metropolis Algorithm
The Random Cluster Model Simulation
- pick an edge either at random or in sequence
- flip a fair coin to propose including or not
including the edge
25The Metropolis Algorithm
The Random Cluster Model
- Clearly a good algorithm for determining
connectivity is needed.
- Well talk about a super-fast one later.
Be clever!
26The Metropolis Algorithm
The Random Cluster Model and Ising
For example, if you sampled this configuration
from the random cluster model with appropriate p
27The Metropolis Algorithm
The Random Cluster Model and Ising
Then you would flip a coin for each connected
component to determine up/down
28The Metropolis Algorithm
The Random Cluster Model and Ising
Then you would flip a coin for each connected
component to determine up/down
-
-
-