# A derivation problem related with Hidden Markov Chain

I encountered the problem here(Hidden Markov Chain)

It is like this:

The task is to compute, given the parameters of the model, the probability of a particular output sequence(observed sequence). This requires summation over all possible state sequences: The probability of observing a sequence(output sequence)

of length L is given by

(*)

where the sum runs over all possible hidden-node sequences

For more specific information on the related information, refer to here

My problem is:

How the (*) equation can be derived?

It seems to be according to Total Probability Theorem. But this does not make sense to me.

-
Does $P(Y) = \sum_X P(Y \; X)$ makes sense to you? – leonbloy Sep 27 '11 at 15:46

Your notations are awful but this is indeed nothing else than the law of total probabilities: you consider two discrete random variables $X$ and $Y$ defined on the same probability space with values in sets $E$ and $F$ respectively and you are asserting that for every $y$ in $F$, $$\mathrm P(Y=y)=\sum\limits_{x\in E}\mathrm P(Y=y\mid X=x)\mathrm P(X=x).$$ Compare with this for $A=[Y=y]$.
Do you mean that $E$ is countable or finite? – Ilya Sep 27 '11 at 17:23