Saturday, 26 January 2019

Markov Chains - A Mathematical Treatise

Markov Chains

We have a set of stated, = {}. A Markov process starts in one of these states and moves successively from one state to another. Each move is called a step . If the chain is currently in state , then it moves to state at the next step with a probability denoted by , and this probability does not depend upon which states the chain was in before the current state.These probabilities are called transition probabilities. The process can remain in the state it is in, and this occurs with probability . Initially a probability is defined by specifying a particular state as the starting state.

Say, we stay in Patna (Capital of the State of Bihar, India), and at my home we usually eat either Roti (), Rice (), Parantha ()) or Bread () for dinner. There are also some days when we eat one particular dinner on two or three or more consecutive days.

Now, we define transition probabilities of using a Transition Matrix which is given as,

From the above matrix, it can be seen that and similarly, .

In the similar lines of the above concept, a Transition Diagram can also be drawn.

Let us dig further into the concept now. Imagine today we eat Rice at home and two days from today we eat Bread. This is written as . We see that if we ate Rice today then the event of us eating Bread two days from today is a disjoint union of the following,

  1. We ate Rice tomorrow and Bread day after.
  2. We ate something else tomorrow and Bread day after.
  3. We ate Bread tomorrow and Bread day after.

Therefore, we can write as ,

The has pointed towards a more generalized concept of Dot product of two vectors.

Considering there are states in the Markov chain,

This study was for , meaning we are yet to define this in a more generalized manner. Obviously, looking at the present scenario of high-end computing software packages available, this attempt seems to be a waste of efforts, but then knowing the math is always good fun!

Before doing that, we will again go into the basic definition as defined above and try to make an iterative approach into the problem.

We have assumed that our meal starts at state Rice, so, for us,

is the state of our system at state or the beginning of the system.

Similarly, if we want to find we will do it as,

In the similar lines,

This means, for generalization’s sake,

Using some very basic Linear Algebra methods to compute ,

Recall :

Here, is a Diagonal matrix and is a matrix whose columns correspond to the Eigen-vectors of .

I leave the computation to your own practice.

There for,

Since, is a diagonal matrix, which is obviously of form,

Therefore, will be,

Hence, we can easily compute .

The Python implementation of this concept is relatively simple once we understand the math behind it.

All the best with that.

Cheers!

Resources:

  1. Matrix Diagonalization

  2. Eigen Values and Eigen Vectors

  3. Markov Chains

  4. Markov Chains

No comments:

Post a Comment