This post gives some examples to demonstrate the useful technique called first step analysis. A great number of problems involving Markov chains can be evaluated by this technique. As we demonstrate here, the general idea of the method is to break down the possibilities resulting from the first step (first transition) in the Markov chain. Then use the law of total probability and Markov property to derive a set of relationship among the unknown variables. This topic will be further developed in subsequent posts. We start with the following examples.
Consider a Markov process that cycles through the states 0, 1 and 2 according to the following transition probability matrix.
Once the process reaches state 0 or state 2, it stays there forever. Hence these two states are called absorbing states. If the process starts at state 1, the process may stay in state 1 for a duration but eventually the process will leave state 1 and enter one of the absorbing states. Here are two natural questions.
- Which state is more likely (state 0 or state 2) for the process to enter into if the process starts at state 1?
- On average how long does it take to reach one of the absorbing states?
To answer these questions, we define the following random variable.
The random variable is the amount of time it takes for the process to be absorbed (to enter into one of the absorbing states). In other words, is the time to absorption. Then the two questions are answered by finding the following two quantities.
The event is the event that the process is absorbed into state 0. The quantity is the probability of being absorbed into state 0 if the starting state is 1. The quantity is mean time to absorption if the starting state is 1. Both are conditional quantities with being a conditional probability and being a conditional mean. Of course, once is known, would be the probability .
First, we calculate the quantity . Consider the first step in the process. There are three possibilities, which are , and , with probabilities , and , respectively. In the first case, and (this means that the probability of absorption into state 0 at time 1 is 1). In the second case, and the problem repeats itself (this means that the probability of absorption into state 0 at time 1 is again). In the third case, and (the probability of absorption into state 0 at time 1 is 0). Weighting these three cases by their respective probabilities gives the following equation.
Solving for gives the following.
The quantity is simply the conditional probability of a transition into state 0 given that a transition into state 0 or state 2 has occurred. So far the result from the first step analysis is encouraging.
To determine the quantity , consider the first step again. Starting at state 1, the time to absorption is at least 1 (it takes at least one step to get to 0 or 2). There are the same three possibilities for the first step – , and . After the first step is taken, let’s look at the mean time to absorption in each case. In the first case the process is absorbed into state 0 at time 1. So the mean time to absorption at time 1 is 0. In the second case, the process goes back to its starting point. So the mean time to absorption at time 1 is . In the third case, the process is absorbed into state 2. The mean time to absorption at time 1 is 0. Weighting these three cases by their respective probabilities gives the following equation.
Solving for produces the following answer.
Note that if is large (i.e. it is highly likely that the process keeps staying in state 1), then it will make more steps on average to reach 0 or 2. Thus both and make sense.
We would like to comment that in this small example (only one transient state), the problem can be computed directly from the time to absorption . With starting state being 1, each step of the process is like a Bernoulli event – either staying in state 1 or being absorbed into 0 or 2. Consider absorption as a success. The probability of success at each step is thus . Then the number of steps it takes to be absorbed (i.e. the random variable as described above) has a geometric distribution with mean is shown above. Thus we can solve this simple problem (with only one transient state) without using first step analysis. But for a larger problem, the time to absorption does not have a simple characterization. The next example further demonstrates how first step analysis is done.
Consider a process that cycles through three states (0, 1, 2 and 3) according to the following transition probability matrix.
In this 4-state process, state 0 and state 3 are absorbing states. State 1 and state 2 are transient states. We are interested in the same questions: what is the probability of being absorbed into state 0? What is the mean time to absorption? The time to absorption (into 0 or 3) depends on the starting state (1 or 2). To answer these questions, we state the following quantities.
The subscripts in the and reflect the starting state of the process. Based on the first reasoning, the following gives the equations involving and the equations involving .
The following is the derivation for the equation for .
Note that the first line shows the four cases for the first step weighted by their probabilities (the law of total probability). The second line uses the Markov property. The third line lists out the 4 cases. the following shows the derivation of .
We carry out the numerical calculation using the following matrix.
Plugging in the numerical values gives the following two sets of equations.
The solutions are:
It is more likely to reach state 0 if the starting position is 1 (53% chance). If the process starts from state 2, it is more likely to reach state 3 (only 34% chance to reach state 0). However, the average number of steps it takes to reach state 0 is about the same (either starting from 1 or 2).
One More Example
We present one more example. This example will be used in the next post to demonstrate another angle of first step analysis.
Consider the following transition probability matrix.
The state space is one state bigger than the two examples shown above. There are two absorbing states as in the two previous examples. We focus on the same two problems. Given a starting state (1, 2 or 3), we want to see how fast the process transition to state 0 (one of the absorbing states). Secondly, we want to see on average how many steps it takes the process to transition to one of the absorbing states.
As before let the time it takes the process to be absorbed into 0 or 4. More specifically let be defined by . As before if the starting state is , let be the probability of the process being absorbed into state 0 and let be the expected time to absorption (into state 0 or state 4). More specifically, define and as follows:
Applying the first step analysis produces the following two sets of equations.
For a reason that will be made clear in the next post, we rearrange the equations by putting the variables or on one side and the constant terms on the other side.
Solving these two systems of equations produces the following solutions.
|Starting State||Probability of Absorption to State 0||Expected Time to Absorption|
The introductory examples here show that first step analysis on time to absorption involves the solving of systems of linear equations. Thus the larger the state space in the Markov chain, the larger of the systems of equations. Using software when the matrix is large is an excellent approach. First step analysis can also be approached in other angles. Applications of first step analysis will be presented. The technique of first step analysis will be further explored in subsequent posts.
Dan Ma Markov chains
Daniel Ma Markov chains