Metropolis–Hastings algorithm: Difference between revisions

Content deleted Content added
Line 80:
## Set <math>t = 0</math>.
# Iterate
## ''Generate'' a random candidate state <math>x'</math> according to <math>g(x' \mid x_t)</math>.
## ''Calculate'' the acceptance probability <math>A(x', x_t) = \min\left(1, \frac{P(x')}{P(x_t)} \frac{g(x_t \mid x')}{g(x' \mid x_t)}\right)</math>;.
## ''Accept or reject'':
### generate a uniform random number <math>u \in [0, 1]</math>;