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 chains] Use Consistent Math Notations (#108)
* clean up math notations
* clean code to match math
* revert one change in distribution definition
* update according to feedback
---------
Co-authored-by: mmcky <mamckay@gmail.com>
1. $\{X_t\}$ is a Markov chain with stochastic matrix $P$
481
481
1. the distribution of $X_t$ is known to be $\psi_t$
@@ -581,12 +581,12 @@ Recall the stochastic matrix $P$ for recession and growth {ref}`considered above
581
581
582
582
Suppose that the current state is unknown --- perhaps statistics are available only at the *end* of the current month.
583
583
584
-
We guess that the probability that the economy is in state $x$ is $\psi(x)$.
584
+
We guess that the probability that the economy is in state $x$ is $\psi_t(x)$ at time t.
585
585
586
586
The probability of being in recession (either mild or severe) in 6 months time is given by
587
587
588
588
$$
589
-
(\psi P^6)(1) + (\psi P^6)(2)
589
+
(\psi_t P^6)(1) + (\psi_t P^6)(2)
590
590
$$
591
591
592
592
+++ {"user_expressions": []}
@@ -606,26 +606,26 @@ described by the specified dynamics, with each worker's outcomes being
606
606
realizations of processes that are statistically independent of all other
607
607
workers' processes.
608
608
609
-
Let $\psi$ be the current *cross-sectional* distribution over $\{ 0, 1 \}$.
609
+
Let $\psi_t$ be the current *cross-sectional* distribution over $\{ 0, 1 \}$.
610
610
611
-
The cross-sectional distribution records fractions of workers employed and unemployed at a given moment.
611
+
The cross-sectional distribution records fractions of workers employed and unemployed at a given moment t.
612
612
613
-
* For example, $\psi(0)$ is the unemployment rate.
613
+
* For example, $\psi_t(0)$ is the unemployment rate.
614
614
615
615
What will the cross-sectional distribution be in 10 periods hence?
616
616
617
-
The answer is $\psi P^{10}$, where $P$ is the stochastic matrix in
617
+
The answer is $\psi_t P^{10}$, where $P$ is the stochastic matrix in
618
618
{eq}`p_unempemp`.
619
619
620
620
This is because each worker's state evolves according to $P$, so
621
-
$\psi P^{10}$ is a marginal distribution for a single randomly selected
621
+
$\psi_t P^{10}$ is a marginal distribution for a single randomly selected
622
622
worker.
623
623
624
624
But when the sample is large, outcomes and probabilities are roughly equal (by an application of the Law
625
625
of Large Numbers).
626
626
627
627
So for a very large (tending to infinite) population,
628
-
$\psi P^{10}$ also represents fractions of workers in
628
+
$\psi_t P^{10}$ also represents fractions of workers in
629
629
each state.
630
630
631
631
This is exactly the cross-sectional distribution.
@@ -778,13 +778,13 @@ Notice that `ψ @ P` is the same as `ψ`
778
778
Such distributions are called **stationary** or **invariant**.
779
779
780
780
(mc_stat_dd)=
781
-
Formally, a distribution $\psi^*$ on $S$ is called **stationary** for $P$ if $\psi P = \psi $.
781
+
Formally, a distribution $\psi^*$ on $S$ is called **stationary** for $P$ if $\psi^* P = \psi^* $.
782
782
783
-
Notice that, post-multiplying by $P$, we have $\psi P^2 = \psi P = \psi$.
783
+
Notice that, post-multiplying by $P$, we have $\psi^* P^2 = \psi^* P = \psi^*$.
784
784
785
-
Continuing in the same way leads to $\psi = \psi P^t$ for all $t$.
785
+
Continuing in the same way leads to $\psi^* = \psi^* P^t$ for all $t$.
786
786
787
-
This tells us an important fact: If the distribution of $X_0$ is a stationary distribution, then $X_t$ will have this same distribution for all $t$.
787
+
This tells us an important fact: If the distribution of $\psi_0$ is a stationary distribution, then $\psi_t$ will have this same distribution for all $t$.
788
788
789
789
The following theorem is proved in Chapter 4 of {cite}`sargent2023economic` and numerous other sources.
790
790
@@ -1065,19 +1065,19 @@ P @ P
1065
1065
1066
1066
+++ {"user_expressions": []}
1067
1067
1068
-
Let's pick an initial distribution $\psi$ and trace out the sequence of distributions $\psi P^t$.
1068
+
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$
1069
1069
1070
-
First, we write a function to iterate the sequence of distributions for `n` period
1070
+
First, we write a function to iterate the sequence of distributions for `ts_length` period
0 commit comments