You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[markov_chain_I] Update animation for different initial distributions (#515)
* update markov_chain_animation
Dear John,
This pull request updates the Markov chain animation for different initial distributions.
In addition, this pull request also updates the descriptions of the code.
The previous pull request #492 can be closed as this one has no merge conflict.
Best,
Longye
* Revert "update markov_chain_animation"
This reverts commit f699174.
* Update markov_chains_I.md
* Update markov_chains_I.md
* Update markov_chains_I.md
Copy file name to clipboardExpand all lines: lectures/markov_chains_I.md
+34-12Lines changed: 34 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -812,7 +812,7 @@ P = np.array([[0.971, 0.029, 0.000],
812
812
P @ P
813
813
```
814
814
815
-
Let's pick an initial distribution $\psi_0$ and trace out the sequence of distributions $\psi_0 P^t$ for $t = 0, 1, 2, \ldots$
815
+
Let's pick an initial distribution $\psi_1, \psi_2, \psi_3$ and trace out the sequence of distributions $\psi_i P^t$ for $t = 0, 1, 2, \ldots$, for $i=1, 2, 3$.
816
816
817
817
First, we write a function to iterate the sequence of distributions for `ts_length` period
* $P$ is the stochastic matrix for recession and growth {ref}`considered above <mc_eg2>`.
863
-
* The highest red dot is an arbitrarily chosen initial marginal probability distribution $\psi_0$, represented as a vector in $\mathbb R^3$.
864
-
* The other red dots are the marginal distributions $\psi_0 P^t$ for $t = 1, 2, \ldots$.
865
-
* The black dot is $\psi^*$.
883
+
* The red, blue and green dots are initial marginal probability distributions $\psi_1, \psi_2, \psi_3$, each of which is represented as a vector in $\mathbb R^3$.
884
+
* The transparent dots are the marginal distributions $\psi_i P^t$ for $t = 1, 2, \ldots$, for $i=1,2,3.$.
885
+
* The yellow dot is $\psi^*$.
866
886
867
887
You might like to try experimenting with different initial conditions.
868
888
@@ -899,6 +919,8 @@ We can see similar phenomena in higher dimensions.
899
919
The next figure illustrates this for a periodic Markov chain with three states.
0 commit comments