How can I calculate the Total Variation Distance of a transition Matrix? is there any built in function? I've searched all documentation and haven;t found anything.
** More information:
Let me try to explain it better. let's say we have a transition matrix ($P$), $4\times4$ that describes the probability of going from a, b, c and d to a, b, c or d in 1 step.
We can calculate the stationary distribution of $P$, and that's called $\pi$ in the following equation, and $P_{yx}$ is the probability of going from state $y$ to state $x$ (a,b,c,d):
$$\frac12\sum_x\left|P_{yx}^t-\pi(x)\right|$$
What I want to do is calculate the Total Variation Distance of $P$ from $\pi$ after $n$ steps and starting on a given state.
*** This is what I have so far:
M = {{0.3, 0, 0.5, 0.2}, {0, 0.4, 0.3, 0.3}, {0.3, 0.2, 0, 0.5}, {0.4, 0.1, 0, 0.5}}
B = Transpose[M]
N[B] // MatrixForm
{eVals, eVecs} = Eigensystem[B]
eVals // MatrixForm
eVecs // MatrixForm
eigenvector = eVecs[[1]]
Print["Stationary Distribution"];
eigenvector/Total[eigenvector]
Print["M after 1 step"];
M2 = MatrixPower[M, 2]
Max[mat1-mat2]
) between the probabilities of events in some time given some initial condition (MatrixPower[Q, n].initialVector
) versus in the limit should there be any? $\endgroup$