3
$\begingroup$

Imagine the following (very concrete) model: We have a series of random variables $x_k$ with values in $\lbrace 0, 1\rbrace$. We assume $x_k \mid p_k \sim \operatorname{Alt}(p_k),$ where $p_0 \sim R(0,1)$ has uniform distribution on interval $[0,1]$ and $p_k$ for $k>0$ is defined as $p_k = \sigma(\operatorname{logit}(p_{k-1}) + \varepsilon_k),$ where $\varepsilon_k \sim \mathcal{N}(0,1)$ are normally distributed independent errors and $\sigma, \operatorname{logit}$ are the logistic resp. logit functions.

We observe only $x_0, \dots, x_n$ and the goal is to get the posterior distribution of $p_n$. Now it is quite straightforward to write down the prior and likelihood of this model, thus we have the unnormalized posterior from which we can sample using some MCMC algorithm.

Now the problem is that in my case (and I guess in many other general cases) I get the observations in real time / online and I would like to have this distribution for each incoming observation (and I would like to have it fast). Is there some method to that can do this efficiently for example by reusing some previously calculated samples?

Naive approach would be for example this: Imagine I want 1000 samples of the posterior in total, if I get a new observation, I could throw away 100 samples from the ones I calculated in the previous step and replace them with 100 calculated using the last observation.

$\endgroup$
2
  • $\begingroup$ Do you mean you want $1000$ simulated samples of $p_n$ for some $n$? When you say you get a new observation, do you mean you get a real $x_{n+1}$ and want to convert the $1000$ simulated samples of $p_n$ into $1000$ simulated samples of $p_{n+1}$? $\endgroup$ Commented Feb 5, 2019 at 21:49
  • $\begingroup$ @ClaudeChaunier Yes, that is what I mean (perhaps not convert but somehow use them to calculate the $1000$ simulated samples of $p_{n+1}$) $\endgroup$
    – Joe
    Commented Feb 6, 2019 at 9:35

1 Answer 1

1
$\begingroup$

The model you are discribing is a Markovian state space model. You have a hidden state (p_k). A common approach is to use particle filtering (aka sequential Monte Carlo). The idea is to keep current array of particles targeting (approximately distributed as) the posterior of $p_k$ given observation up to $k$ and to update the posterior upon arrival of an observation by reweighting (importance sampling). Let me know if need references, best

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .