TI Nspire shortcuts for finding Markov chain stationary distribution

In previous installment, the stationary distribution of Markov chain is determined in TI Nspire using built-in linSolve function. Apart from the implementation used, there are some shortcuts in TI Nspire that will arrive the same result. The first one is kind of a one-liner that distill all steps for solving for the stationary distribution, which can easily be programmed in Nspire using TI-Basic, is exemplified below in self-explanatory notes:
markov_stationarydist_quick1

The full one-liner in TI Nspire is as below:

simult(colAugment((subMat(p,1,1,rowDim(p),rowDim(p)-1))T,augment(list>mat(seqn(1,rowDim(p)-1)),[2]))-identity(rowdim(p)),colAugment(newMat(rowDim(p)-1,1),[1]))

markov_stationarydist_quick2

The other one is based on the fact the stationary distribution converges itself after repeated multiplication. This is tedious before the advent of modern computation power, but a piece of cake today even with hand-held calculators 🙂

markov_stationarydist_quick3

Advertisements

One thought on “TI Nspire shortcuts for finding Markov chain stationary distribution

  1. Pingback: Finding stationary distribution in Markov chain with TI Nspire | gmgolem

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s