Markov zincirinin bir geçişini, koşullu dağılımından sırayla her bir bileşeni örneklediğiniz 'Gibbs süpürmesi' olarak değerlendirerek elde edilen Markov zinciri için ayrıntılı bir denge göstermeye çalıştınız. Bu zincir için ayrıntılı denge sağlanmamaktadır. Buradaki nokta, belirli bir bileşenin koşullu dağıtımından her bir örneklemesinin ayrıntılı dengeyi sağlayan bir geçiş olmasıdır. Gibbs örneklemesinin, birden fazla farklı teklif arasında geçiş yaptığınız, biraz genelleştirilmiş bir Metropolis-Hastings'in özel bir örneği olduğunu söylemek daha doğru olur. Daha fazla detay takip eder.
Taramalar ayrıntılı dengeyi sağlamaz
X1,X2), with probabilities as shown in the following table:
X1=0X1=1X2=0130X2=11313
Assume the Gibbs sweep is ordered so that
X1 is sampled first. Moving from state
(0,0) to state
(1,1) in one move is impossible, since it would require going from
(0,0) to
(1,0). However, moving from
(1,1) to
(0,0) has positive probability, namely
14. Hence we conclude that detailed balance is not satisfied.
However, this chain still has a stationary distribution that is the correct one. Detailed balance is a sufficient, but not necessary, condition for converging to the target distribution.
The component-wise moves satisfy detailed balance
Consider a two-variate state where we sample the first variable from its conditional distribution. A move between (x1,x2) and (y1,y2) has zero probability in both directions if x2≠y2 and thus for these cases detailed balance clearly holds. Next, consider x2=y2:
π(x1,x2)Prob((x1,x2)→(y1,x2))=π(x1,x2)p(y1∣X2=x2)=π(x1,x2)π(y1,x2)∑zπ(z,x2)=π(y1,x2)π(x1,x2)∑zπ(z,x2)=π(y1,x2)p(x1∣X2=x2)=π(y1,x2)Prob((y1,x2)→(x1,x2)).
How the component-wise moves are Metropolis-Hastings moves?
Sampling from the first component, our proposal distribution is the conditional distribution. (For all other components, we propose the current values with probability 1). Considering a move from (x1,x2) to (y1,y2), the ratio of target probabilities is
π(y1,x2)π(x1,x2).
But the ratio of proposal probabilities is
Prob((y1,x2)→(x1,x2))Prob((x1,x2)→(y1,x2))=π(x1,x2)∑zπ(z,x2)π(y1,x2)∑zπ(z,x2)=π(x1,x2)π(y1,x2).
So, the ratio of target probabilities and the ratio of proposal probabilities are reciprocals, and thus the acceptance probability will be
1. In this sense, each of the moves in the Gibbs sampler are special cases of Metropolis-Hastings moves. However, the overall algorithm viewed in this light is a slight generalization of the typically presented Metropolis-Hastings algorithm in that you have alternate between different proposal distributions (one for each component of the target variable).