UE Stochastic Processes - Beispiel 28

From StatWiki
Jump to: navigation, search

Man berechne die stationäre Verteilung des Prozesses mit der Intensitätsmatrix

 Q = \left[\begin{array}{rrr}
-9 & 6 & 3 \\
4 & -6 & 2 \\
5 & 1 & -6 \\
\end{array} \right] 
\pi Q = 0 \, and \sum_{i=1}^n \pi_i = 1 \,

 \begin{array}{rcrcrcl}
6 \pi_1 & - & 6 \pi_2 & + & 1 \pi_3 & = & 0 \\
3 \pi_1 & + & 2 \pi_2 & - & 6 \pi_3 & = & 0 \\
  \pi_1 & + & \pi_2   & + & \pi_3 & = & 1 \\
\end{array} 
> Q = matrix(c(-9,6,3,4,-6,2,5,1,-6),nrow=3,byrow=T)
>
> # add row of 1's, remove first row of Q
> lh = rbind(rep(1,nrow(Q)), t(Q)[-1,])
> # sum pi = 1
> rh = c(1, rep(0,nrow(Q)-1))
> # solve equations
> pi=solve(lh, rh)
>
> library(MASS)
> fractions(pi)
[1] 34/103 39/103 30/103