M-H法の一種であるメトロポリス法を導入する。
M-H法は次のようなアルゴリズムであった。
<aside> <img src="/icons/cursor_gray.svg" alt="/icons/cursor_gray.svg" width="40px" /> Metropolis-Hastings Algorithm
$$ \begin{darray}{rl}
</aside>
ただし、$A(y | x)$ は受理確率と呼ばれる関数で、次式で表される。
$$ \begin{aligned} A(y | x) = \frac{P(y) Q(x | y)}{P(x) Q(y | x)} \end{aligned} $$
ここで、提案分布 $Q(y | x)$ を、関数の台 $\mathcal Y$ が
$$ \begin{gathered} \mathcal Y = \{x + \lambda c | \lambda \in [1, -1]\} \end{gathered} $$
であるような連続一様分布、すなわち
$$ \begin{aligned} Q(y | x) = \mathcal U(y | x-c, x+c) = \frac{1}{2c} \mathbb I\{x-c\le y \le x+c\} \end{aligned} $$
とおくと、
$$ \begin{aligned} Q(x | y) ={}& \mathcal U(x | y-c, y+c) \\ ={}& \frac{1}{2c} \mathbb I\{y-c\le x \le y+c\} \\ ={}& \frac{1}{2c} \mathbb I\{x-c\le y \le x+c\} \\ ={}& Q(y | x) \end{aligned} $$
ゆえ、受理確率は次式に変化する。
$$ \begin{aligned} A(y | x) = \frac{P(y) Q(x | y)}{P(x) Q(y | x)} = \frac{P(y)}{P(x)} \end{aligned} $$
これを用いれば、MH法は次のようなアルゴリズムに変化する。
$$ \begin{darray}{rl}
このようなMH法をとくにメトロポリス法 (Metropolis algorithm) という。定数 $c$ はステップ幅と呼ばれる。