The simple change-point problem can be described as follows. Here it is assumed that both $p_1(y)$ and $p_2(y)$ are known completely.
- $y_1,...,y_\tau|\tau $ are iid with distribution $p_1(y)$ and $y_{\tau + 1},...,y_n|\tau$ are iid as $p_2(y)$ and $\tau$ takes the values $1,...,n-1$
- If $\tau = 0$ it is assumed that $y_1,...,y_n|\tau = 0$, are iid $p_2(y)$
- If $\tau = n$ it is assumed that $y_1,...,y_n|\tau = n$, are iid $p_1(y)$
The case $\tau = n$ corresponds to 'No change' and $\tau < n$ to 'change'.
I need to find an expression for the posterior distribution of change-point for this model. Assuming the values $\tau = 0,1,2,...,n$ are allowed.
I know the following: $$\text{posterior} \propto \text{likelihood} \cdot \text{prior}$$ So for this example it might look like: $$p(\tau | y) \propto p(\tau|y)p(\tau)$$
For this case I think it is sufficient to leave the prior as $p(\tau)$ as we are given no additional information about the distributions of $p_1(y)$ and $p_2(y)$. The issue is the likelihood. Any help appreciated.
Likelihood: $$p(y|\tau) = \bigg[\prod_{n=1}^{\tau} p_1(y) \cdot \prod_{\tau + 1}^{n} p_2(y)\bigg]$$ Prior: $$p(\tau)$$ Therefore the posterior is given by: $$p(\tau|y) \propto \bigg[\prod_{n=1}^{\tau} p_1(y) \cdot \prod_{\tau + 1}^{n} p_2(y)\bigg] \cdot p(\tau)$$