Question: Write a code that takes a N N transition probability matrix and a positive number n, and produces the n-th power of a transition probability

Write a code that takes a N N transition probability matrix and a positive number n, and produces the n-th power of a transition probability matrix, presenting the output in visual form (i.e. writing the rows and columns of the matrix)

(a) Use this to calculate p2, p5, p10, p20 and p40 for: the Gamblers ruin (with M = 5) and the Ehrenfest chain (with N = 6).

(b) What pattern do you see as n increases for each matrix?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!