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

2 visualizaciones (últimos 30 días)
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.

Respuestas (1)

Yazan
Yazan el 7 de Jul. de 2021
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(:))

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by