Is expm accurate to compute transition probabilities for a continuous-time Markov chain?

조회 수: 3 (최근 30일)
I have the following Q-matrix for a continuous time Markov chain and use expm to compute transition probabilities.
syms t positive
Q = [-2 1 1;
1 -1 0;
2 1 -3];
P(t) = expm(Q*t);
double(P(2))
Matlab gives
ans =
0.3797 0.4908 0.1295
0.3704 0.5092 0.1205
0.3794 0.4908 0.1298
My question is that I think ans(2,3) should be zero, becasue Q(2,3)=0. But Matlab shows that ans(2,3)=0.1205.
Thanks in advantage.

답변 (1개)

Yazan
Yazan 2021년 7월 7일
expm(sig) computes the matrix exponential of sig according to:
[V,D] = eig(sig)
expm(sig) = V*diag(exp(diag(D)))/V
For your example:
Q = [-2 1 1;
1 -1 0;
2 1 -3];
P = expm(Q*2);
[V,D] = eig(Q*2);
P2 = V*diag(exp(diag(D)))/V;
% maximum difference
max(P2(:) - P(:))

카테고리

Help CenterFile Exchange에서 Markov Chain Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by