3
$\begingroup$

$$ \begin{bmatrix} 0.8 & 0.2 & 0 \\ 0 & 0.5 & 0.5 \\ 0 & 0 & 1 \\ \end{bmatrix} = T $$

$$ \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 1 \\ 0 & 0 & 1 \\ \end{bmatrix} = F $$

This is a Markov Chain for a virus (well, sick, immune) and I'm trying to find out the exact number of cycles (and thus the exact amount of time) that the virus will last.

$T^x = F$ becomes $x = \log_{T} F$. From there... I just have no clue.

  • 0
    It seems that $x$ is a number, while $\log_{T} F$ is a matrix...2017-02-21
  • 1
    Very interesting question, but it is not probable that it will be a finite time.2017-02-21
  • 0
    also, it seems that $T$ is not row stochastic.2017-02-21
  • 1
    It also does not seem to be a stochastic matrix, since either rows or columns should sum to 1. Have you maybe gotten a typo?2017-02-21
  • 0
    you can also just do natural log on both sides: $x\log(T) = \log(F)$ and then do matrix division $\log (F)$ divided by $\log (T)$2017-02-21
  • 0
    @mathreadler Yeah, there was a typo in $T_21$. The stable state vector of this matrix is F, so it will be a finite time. It doesn't have to be exactly "1 1 1", decimal truncation may be required. I tried doing the natural logarithm on both sides, and I just barely understand it. $F$ seems to return a natural logarithm of all zeros, but I don't know if I'm doing it right. I'm using [this](https://matrixcalc.org/en) to do matrix math.2017-02-21
  • 0
    That there exists a stable vector does not mean there will be a finite time reaching it with 100% chance.2017-02-21
  • 0
    If you want something more powerful to do matrix math I can recommend Mathworks Matlab or Gnu Octave (which are pretty much compatible to one another). But they are both desktop apps so maybe they are not as easily accessible from everywhere.2017-02-22
  • 0
    "$T^x = F$ becomes $x = \log_{T} F$" Sorry but this is pure fantasy building on undefined notions. One can only regret that two users see fit to continue in the same vein in the comments. Regarding the question itself, whose meaning seems to have escaped the answerer below, partly thanks to the strange "explanations" by the OP, the mosst natural guess is that it asks for $$E_0(T_2)$$ where $T_2$ is the first hitting time of $2$, and $E_0=E(\ \mid X_0=0)$. The answer is $$\frac1{0.2}+\frac1{0.5}=7$$2017-04-09
  • 0
    @mathreadler "you can also just do natural log on both sides: xlog(T)=log(F) and then do matrix division log⁡(F) divided by log(T)" Sorry but *what are you talking about?*2017-04-09
  • 0
    @Did "Most natural guess". Is it reasonable to make such guesses about what is being asked without any prior knowledge of the level of mathematics the person posting has? There clearly was a lack of knowledge about eigenvectors and eigenvalues so I wanted to explain them. Where is the harm in that?2017-04-09
  • 0
    @mathreadler "Reasonable"? Yes, very much so, when one is familiar with this arch classical exercise about Markov chains. "Harm"? None done, except that as a consequence you do not answer the question the OP means to ask. (No comment about the ludicrous "if T^x=F then xlog(T)=log(F) then solve for x" part?)2017-04-09
  • 0
    So when is one supposed to say that the question is too badly formulated (lacking detail et.c.) and when a guess is warranted? I am having some trouble seeing it... It might be that you have a favourite question on the subject but it does not automatically mean that everyone asks it all the time (even if you would love that they did!).2017-04-09
  • 0
    @mathreadler Suuure. What about talking maths seriously and explaining your "if T^x=F then xlog(T)=log(F) then solve for x"? (Anyway, sorry to disappoint you but I have no favorite question, I am just reading the question asked and proposing a meaningful interpretation (did you?). But please use @.)2017-04-09
  • 0
    @Did You are being terribly inconsistent. Certain questions somewhere else you want taken down for lack of detail, but this particular question is magically super clear to you if you allow yourself to guess 95% of it. Did you leave your judgement on a rollercoaster or maybe roue de Paris?2017-04-09
  • 0
    @mathreadler You are again evading the mathematical point and this is quite revealing, but ok, let us play at your game: 1. Where did I say the question is super clear? Nowhere. 2. Can you understand that some interpretations of a not-so-clear question are more plausible than others? 3. If "taking down" means voting to close in your lingo,how do you know whether I voted to close this question or not? Oops. (And you have the chutzpah of invoking inconsistency...)2017-04-09
  • 0
    @Did Of course I can explain it but it would be a waste of time if the OP is not around to read the explanation and you are just here to reinterpret questions and bash my efforts. Your interpretation of this question was not particularly plausible at all. Wait there is a close vote, maybe that is why that spin started...2017-04-09
  • 0
    @mathreadler Still not addressing the mathematical point? That makes sense, I guess.2017-04-09

1 Answers 1

-1
  1. The eigenvalues of your $T$ matrix are $0.8,0.5,1$
  2. The 1 eigenvalue corresponds to the $[1,1,1]^T$ vector which is found last column in your matrix. So far so good.
  3. When multiplying, what happens is that the eigenvalues multiply on themselves. So the eigenvalues of $T^k$ will be $0.8^k,0.5^k,1^k$ and as you know the power function will not totally zero any non-zero base, but it will get arbitrarily close as $k$ increases.

So a better question is something like "after how long time can we say with at least X% certainty that we are in this distribution?"

You can calculate the expected probability of being in last state after k hops :

 [1/3,1/3,1/3]*T^k*[0;0;1]

or $$\frac{1}{3}\begin{bmatrix}1&1&1\end{bmatrix}\begin{bmatrix} 0.8 & 0.2 & 0 \\ 0 & 0.5 & 0.5 \\ 0 & 0 & 1 \\ \end{bmatrix}^{\,k}\begin{bmatrix}0\\0\\1\end{bmatrix}$$

Where 1/3 chance of starting in any position. Set k=1 and you should get 50% which you can check by hand.

What you may want to check is then to solve for when this expressions gets "close enough" to 1.

Here is a plot of the above expression for $k\in[1,32]$: As you can see, gets closer and closer but never quite hits $100\%$.

enter image description here