Vous êtes sur la page 1sur 1

Start at a point x0

Propose a move to
a new point x1 = x0h

Calculate the ratio


R = X(x1)/X(x0)

Generate an
If R < r:
uniformly distributed Compare R and r
Go back to x=x0
random variable r

Repeat many times


(number of MC cycles)
If R > r:
accept move, x=x1

Collect statistics
(add up sum of functions to Store
be integrated , which are distributed of stats
according to X(x) )

Figure 1: Schematic overview of the Metropolis algorithm

is very low. This will in turn lead to highly biased statistics, as we will
barely move at all. A good rule of thumb for ecient calculation is to set
the stepsize so we get about 50% of our moves accepted.

1.2.3 Metropolis-Hastings algorithm


The Metropolis-Hastings algorithm also utilizes a variety of the diusion
equation called the Fokker-Planck equation, which reads

P
= D Fi (xi ) P (16)
t xi xi
i

12

Vous aimerez peut-être aussi