giddy.ergodic.var_mfpt_ergodic¶
- giddy.ergodic.var_mfpt_ergodic(p)[source]¶
Variances of mean first passage times for an ergodic transition probability matrix.
- Parameters:
- Parray
(k, k), an ergodic Markov transition probability matrix.
- Returns:
- : array
(k, k), elements are the variances for the number of intervals required for a chain starting in state i to first enter state j.
Notes
Uses formulation (and examples on p. 83) in [KS67].
Examples
>>> import numpy as np >>> from giddy.ergodic import var_mfpt_ergodic >>> p=np.array([[.5, .25, .25],[.5,0,.5],[.25,.25,.5]]) >>> vfm=var_mfpt_ergodic(p) >>> vfm array([[ 5.58333333, 12. , 6.88888889], [ 6.22222222, 12. , 6.22222222], [ 6.88888889, 12. , 5.58333333]])