# Confusion about hidden Markov models definition and graphical notation?

In Wikipedia the following diagram has been sketched and the following text has been written:

From the diagram, it is clear that the conditional probability distribution of the hidden variable x(t) at time t, given the values of the hidden variable x at all times, depends only on the value of the hidden variable x(t − 1): the values at time t − 2 and before have no influence.

Now the problem is I don't understand why this is true for $X_1$ as there is a loop there and as a result I cannot see why this follows: $$p(X_1|X_2,X_3)=p(X_1|X_0=\emptyset)=p(X_1)$$ But it actually should be: $$p(X_1|X_2,X_3)=p(X_1|X_2)$$

• The diagram is about the potential realizations, whereas the probability statements are about the random variables that attain those realizations. – tchakravarty Dec 26 '13 at 21:16
• @fgnu, sorry I am not following... – Cupitor Dec 26 '13 at 21:28
• In the picture you posted, $x_1, x_2$ and $x_3$ is the state space. These are the values that $X_t$ can take on. They are not random variables. You should take a look at the picture below that one--the one that looks like a time series. That's what you want – Taylor May 28 '15 at 21:28
• @Taylar answered perfectly. I am expanding it and demonstrating in my answer. Please carefully read the statement and plot in my answer. I had same confusion before, and believe it can clearly explain. – hxd1011 Jul 5 '16 at 12:36

Transition probability is a potential for switching between any 2 states, not a statement about the relationship of events that have happened. These transition probabilities are independent of each other, as shown in the diagram by the fact that $a_{12}$ has no explicit relationship to $a_{21}$ or $a_{23}$.

The diagram is showing that there are probabilities of transition between hidden states $X_1$ and $X_2$. Moreover, any transition probability is referent to 2 states: the initial state and the state that will be transitioned to.

A loop in this case means that transitions between states 1 and 2 can happen in both directions (to and from $X_1$, to and from $X_2$) with some probabilities $a_{12}$, $a_{21}$. So, a process can start at $X_1$ and has the probability of moving to $X_2$ with $P(X_1 \rightarrow X_2) = a_{12}$, which, if it were to do so, would then have the probability of moving back to $X_1$ with $P(X_2 \rightarrow X_1) = a_{21}$.

This is what is meant when it is said the state at time $t$, $x(t)$, is dependent on the immediately prior state, which was at $t-1$, $x(t-1)$: a given state will be moved out of only with the probabilities of its immediately adjacent states.

• Indeed this is not true. From the same page: From the diagram, it is clear that the conditional probability distribution of the hidden variable x(t) at time t, given the values of the hidden variable x at all times, depends only on the value of the hidden variable x(t − 1): the values at time t − 2 and before have no influence. This is called the Markov property. Similarly, the value of the observed variable y(t) only depends on the value of the hidden variable x(t) (both at time t). – Cupitor Dec 29 '13 at 0:04
• The foundational concept being missed here is the difference between probabilities of transitioning between states and actualizations of random variables, as in the first comment in response to your post. – learner Dec 29 '13 at 1:24
• Can you give me a source for this claim? – Cupitor Dec 29 '13 at 22:46
• You may want to read a more in-depth tutorial than the Wikipedia page. 'A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition' link by Lawrence Rabiner seems to be a good choice. Another, shorter work that is also a good introduction to the subject is 'What is a hidden Markov model?' by Sean Eddy. – learner Dec 30 '13 at 15:30
• The Rabiner review is excellent. – bdeonovic Oct 13 '15 at 23:09

I think the problem is a misinterpretation of the notation. $X_1$ stands for $X(t)=1$, not for $X(t=1)$, and $a_{ij}=P(X(t)=j| X(t-1)=i)$. $X_1, X_2$ and $X_3$ are the three possible values of the variable $X$ at a time $t$, not three variables a $t=1, t=2$ and $t=3$.

So at time $t=1$ you have an initial value. Let's take, for the sake of the example, $X(1)=1$. the probability of $X(2)=2$ is $a_{12}$ and the probability of $X(2)=1$ is $1-a_{12}$.

The value of $X(t)$ is only dependant of the value of $X(t-1)$ because there is no arrow pointing from a $Y$ node to an $X$ node.

Your confusion is coming from different graphical notations about HMM. Specifically, there are two types of notations.

• Type 1 is using nodes to represent possible values of random variables and use arrows to represent transitions
• Type 2 is using nodes to represent random variables, and use errors to represent conditional dependencies.

Here is the same HMM using two different notation

Type 1 notation (Note, for the model shown below, random variable $X$ has $3$ possible values, and random variable $Y$ has $4$ possible values. But it does not show how many observations.)

Type 2 notation (Note, the model shown below has $N$ random variables / observations, but not show how many possible values for $X$ and $Y$)

PS,I think the figure in Wikipedia is confusing, if you want to use vertex to represent possible values, you should not capitalize $X$, but make it consistent with $y$.