2
$\begingroup$

I have a question regarding section 7.1.1 here. I have two questions to ask you.

  1. What does the following sentence mean?

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

  1. 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?
$\endgroup$

1 Answer 1

1
$\begingroup$

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

  1. $C_T\sim p(C_T|x^{(T)}, θ)$
  2. $C_{T-1}\sim p(C_{T-1}|C_T,x^{(T)}, θ)$
  3. $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)}$.

$\endgroup$
2
  • $\begingroup$ I appreciate if you could verify my understanding. Let me assume T=20 and there are 3 states c1, c2 and c3. Then alpha (we call it A here) is a 20 by 3 matrix. Let p(x,y) be the transition probabilities. First I normalize rows of A to get probabilities. Then I sample C[T] (the last state) in R by: C[20]<-sample(C("c1","c2","c3"),1,prob = A[T,]) Assume C[20]= c2. Then to compute C[19] we first compute the following 3 probabilities: Prob=A[19,'c1']*p(c1,c2),A[19,'c2']*p(c2,c2), A[19,'c3']*p(c3,c2) And then C[19]<-sample(C("c1","c2","c3"),1,prob = Prob) $\endgroup$
    – pmjn6
    Commented Oct 31, 2016 at 1:01
  • $\begingroup$ Correct understanding. $\endgroup$
    – Xi'an
    Commented Oct 31, 2016 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.