# Understanding Chib (1998) Bayesian multiple changepoint model

Ungated link to the paper Chib, S. (1998). Estimation and comparison of multiple change-point models. Journal of Econometrics, 86(2), 221–241. doi:10.1016/S0304-4076(97)00115-2

The context of the paper is an algorithm to detect multiple change points in a time series. We have $m$ change points, leading to $m+1$ regimes.

• $s_t \in \{1, 2, \dots, m+1 \}$ denotes which regime the data is from at time $t$
• $\theta_t$ is the parameter of the data distribution at time $t$ (aka during regime $s_t$)
• $Y_t$ is the data up to time $t$
• $P$ is the probability transition matrix between regimes. $$P = \left(\begin{matrix} p_{11} & p_{22} & 0 & \dots & 0 \\ 0 & p_{22} & p_{23} & \dots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ \dots & \vdots & 0 & p_{mm} & p_{m,m+1} \\ 0 & 0 & \dots & 0 & 1 \end{matrix}\right)$$

Equation 6 on page 227 states:

$$p(s_t=k \mid Y_t, \Theta, P) = \frac{p(s_t = k \mid Y_{t-1}, \Theta, P) \times f(y_t \mid Y_{t-1}, \theta_k)}{\sum_{l=k-1}^k p(s_t = l \mid Y_{t-1}, \Theta, P) \times f(y_t \mid Y_{t-1}, \theta_l)}$$

1. Why does the denominator marginalize $s_t$ out by summing over only $s_t=k-1$ and $s_t=k$? Shouldn't we sum over all possible values, i.e. $(1, \dots, m+1)$?

2. If the equation is true, then how does one calculate $p(s_t = 1 | Y_{t-1}, \Theta, P)$? Since $p(s_t = 0 \mid \dots)$ doesn't exist, the denominator has only one element that is exactly like the numerator. Thus, it seems that $p(s_t = 1 | Y_{t-1}, \Theta, P) = 1$ for all $t$. That doesn't seem right.

EDIT: In response to hejseb:

\begin{align} p(s_t=k \mid Y_t, \Theta, P) &= \frac{p(s_t = k \mid Y_{t-1}, \Theta, P) \times f(y_t \mid Y_{t-1}, \theta_k)}{\sum_{l=k-1}^k p(s_t = l \mid Y_{t-1}, \Theta, P) \times f(y_t \mid Y_{t-1}, \theta_l)} \\ &= \frac{p(s_t = k \mid Y_{t-1}, \Theta, P) \times f(y_t \mid Y_{t-1}, \theta_k)}{\sum_{l=k-1}^k\sum_{l'=l-1}^lp_{l'l}\times p(s_{t-1}=l'|Y_{t-1}, \Theta, P)} \end{align}

• I removed my answer now since it was more of a misplaced comment and now you've seen it. Isn't it simply then because if at time $t$ we're in state $k$, then at $t-1$ we can only have been in state $k-1$ and then transitioned into $k$, or we were in $k$ at $t-1$ too. It would for example be impossible to be in state $k$ at time $t$ and state $k-2$ at time $t-1$, since you can only transition to the next one... – hejseb Mar 23 '15 at 19:00
• Perhaps could you answer the second question of mine? It points out a very clear contradiction. $p(s_t=1)$ can't be 1 for all $t$. – Heisenberg Mar 23 '15 at 21:04
• I agree it looks a bit odd, but I don't know this very well (I just threw some ideas out there, as that is sometimes all you need for it all to fall into place). – hejseb Mar 24 '15 at 6:17
• To your first point, I think it's a typo and we need to add from 1 to k (all states). I tried simulation, and it does not work if we only add two states as in the paper. – user51966 Feb 22 at 1:42