Generating Sample Path of HMM via Gibbs Sampling I have a question regarding section 7.1.1 here. I have two questions to ask you.


*

*What does the following sentence mean? 



we shall be drawing values for $C_T,C_{T-1},\cdots,C_1$ in order.



*How the final formula $$\mathrm{P}(C^{(T)}|X^{(T)},\theta)\propto\mathrm{P}(C_T|X^{(T)},\theta)\times\Pi_{t=1}^{T-1}\alpha_t(C_t)\;\mathrm{P}(C_{t+1}|C_t,\theta)$$
can help us to sample the path? Is it Gibbs sampling?

 A: 1. The sentence 

we shall be drawing values for $C_T,C_{T-1},\cdots,C_1$ in order.

means that the vector $C^{(T)}=(C_1,\ldots,C_T)$ is generated as


*

*$C_T\sim p(C_T|x^{(T)}, θ)$

*$C_{T-1}\sim p(C_{T-1}|C_T,x^{(T)}, θ)$

*$C_{T-2}\sim p(C_{T-2}|C_{T-1},x^{(T)}, θ)$


until$$C_{1}\sim p(C_{1}|C_{2},x^{(T)})$$
2. Simulating $C_T$ proceeds from the marginal relation
$$\text{Pr}(C_TT | x^{(T)}, θ) ∝ α_T (C_T )$$
then simulating $C_{T-1}$ conditional on $C_T$ and $x^{(T)}$ is based on the backward conditional
\begin{align}p(C_{T-1}|C_T,x^{(T)}, θ)&\propto \text{Pr}(C_{T-1} | x^{(T-1)}, θ) \text{Pr}(x_T,C_T| x^{(T-1)}, C_{T-1}, θ)\\
&\propto \text{Pr}(C_{T-1} | x^{(T-1)}, θ)\text{Pr}(C_T|C_{T-1}, θ)\text{Pr}(x_T|C_T,\theta)\\
&\propto\alpha(C_{T-1})\text{Pr}(C_T|C_{T-1}, θ)
\end{align}
by virtue of the hidden Markov representation. And so on for the next or rather previous terms in the series. Since each term only depends on higher order indices and known values $x^{(T)}$ and $\theta$, it is possible to simulate $C_T$, then $C_{T-1}$, then ... down to $C_1$. In the Gibbs sampler, this provides the conditional simulation of $C^{(T)}$.
