MATLAB Answers

Calculating stationary distribution of Markov chain

184 ビュー (過去 30 日間)
Sargondjani
Sargondjani 2012 年 6 月 28 日
コメント済み: yizhou yang 2019 年 11 月 25 日
I am calculating the stationary distribution of a Markov chain. The transition matrix P is sparse (at most 4 entries in every column)
The solution is the solution to the system: P*S=S
I use the following method:
St = eigs(P,1,1);
S = St/sum(St); %S is the (normalized) stationary distribution
but i was wondering if there is a faster method... I have no clue yet how fast it is going to be, but the faster the better, because the speed will determine how accurate i can make my grid (more accurate = larger transition matrix)
thanks in advance!

回答 (2 件)

Oscar
Oscar 2013 年 11 月 5 日
The algorithm only worked for 2 dimensions. I have written an algorithm implementing the same method and it works for all dimensions. See attached file.

Oscar
Oscar 2013 年 11 月 3 日
編集済み: Oscar 2013 年 11 月 3 日
Section 6 and 7 of this document explain a method called 'state space reduction' for calculating the stationary distribution of a Markov Chain: http://www.math.wustl.edu/~feres/Math450Lect04.pdf
I have removed a typo from the program that is given in the document and now it is working. See attached file.
  2 件のコメント
yizhou yang
yizhou yang 2019 年 11 月 25 日
Please try using this:
p(j)=sum(p(1:j1).*(P(1:j1,j))');
just need to transpose.

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by