I am acquiring samples that are Gaussian distributed and I need to calculate

$$ p(x_n | x_{n-1}, x_{n-2}, \ldots , x_1) $$

for each sample $x_n$ as it comes in. I am trying to break this expression down so that I can calculate this recursively. I can not store past variables indefinitely as the system will run for long time periods and the calculations will become progressively more expensive.

Is it valid to express this as $p(x_n | x_{n-1})p(x_{n-1} | p_{n-2})p(x_{n-2} | x_{n-3}) \cdots p(x_2 | x_1)$ ?


1 Answer 1


Generally speaking the formula you wish to be true is not true.

In a simpler version, you're asking: $\text{Is }P(A|B,C) = P(A|B).P(B|C)\text{?}$

It's not generally so, not even for Gaussian variables.

You might be thinking of:

$p(x_n, x_{n-1}, x_{n-2}, ... , x_1) = \\ \, p(x_n | x_{n-1}, x_{n-2}, ... , x_1).p( x_{n-1}| x_{n-2}, ... , x_1).p(x_{n-2}| x_{n-3}, ... , x_1)...p(x_2|x_1).p(x_1) $ - which is true.

You might even be thinking of the Markov property: $p(x_n, x_{n-1}, x_{n-2}, ... , x_1) = p(x_n | x_{n-1}).p( x_{n-1}| x_{n-2}).p(x_{n-2}| x_{n-3})...p(x_2|x_1).p(x_1)$, where each conditional can be replaced with conditioning on the previous value alone - which is sometimes true.

However, your actual problem sounds closer to a regression-updating problem.

Followup: when does the Markov property hold?

It will hold when the first equation is the same thing as the second equation.

i.e. when

$p(x_t | x_{t-1}, x_{t-2}, ... , x_1)= p(x_t | x_{t-1})$ at each value of $t$.

That is, when the distribution at time $t$ only depends on the value at time $t-1$.

With Gaussian distributions, and models that can be written in state space form, it's common to use one of the forms of the Kalman filter for this situation.

  • $\begingroup$ Is there any rule to check if the Markov property applies to my situation? That sounds very appropriate for implementation but I don't know if it would be correct. $\endgroup$
    – ankit
    Commented Feb 27, 2014 at 18:44

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.