Skip to content

Commit 60980c2

Browse files
authored
Merge pull request #327 from QuantEcon/Typos
Typos in markov_chains_I.md
2 parents f46622b + 221d2c2 commit 60980c2

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

lectures/markov_chains_I.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ From US unemployment data, Hamilton {cite}`Hamilton2005` estimated the followin
107107
108108
```
109109

110-
+++
111-
112110
Here there are three **states**
113111

114112
* "ng" represents normal growth
@@ -294,7 +292,7 @@ Looking at the data, we see that democracies tend to have longer-lasting growth
294292
regimes compared to autocracies (as indicated by the lower probability of
295293
transitioning from growth to growth in autocracies).
296294

297-
We can also find a higher probability from collapse to growth in democratic regimes
295+
We can also find a higher probability from collapse to growth in democratic regimes.
298296

299297

300298
### Defining Markov chains
@@ -411,7 +409,6 @@ def mc_sample_path(P, ψ_0=None, ts_length=1_000):
411409
X = np.empty(ts_length, dtype=int)
412410
413411
# Convert each row of P into a cdf
414-
n = len(P)
415412
P_dist = np.cumsum(P, axis=1) # Convert rows into cdfs
416413
417414
# draw initial state, defaulting to 0
@@ -683,7 +680,7 @@ P = np.array([[0.4, 0.6],
683680
ψ @ P
684681
```
685682

686-
Notice that `ψ @ P` is the same as `ψ`
683+
Notice that `ψ @ P` is the same as `ψ`.
687684

688685

689686

@@ -772,11 +769,11 @@ For example, we have the following result
772769
(strict_stationary)=
773770
```{prf:theorem}
774771
Theorem: If there exists an integer $m$ such that all entries of $P^m$ are
775-
strictly positive, with unique stationary distribution $\psi^*$, and
772+
strictly positive, with unique stationary distribution $\psi^*$, then
776773
777774
$$
778775
\psi_0 P^t \to \psi^*
779-
\quad \text{as } t \to \infty
776+
\quad \text{ as } t \to \infty
780777
$$
781778
```
782779

@@ -837,8 +834,6 @@ ax.scatter(ψ_star[0], ψ_star[1], ψ_star[2], c='k', s=60)
837834
plt.show()
838835
```
839836

840-
+++ {"user_expressions": [], "tags": []}
841-
842837
Here
843838

844839
* $P$ is the stochastic matrix for recession and growth {ref}`considered above <mc_eg2>`.
@@ -1083,8 +1078,6 @@ Solution 1:
10831078
10841079
```
10851080

1086-
+++
1087-
10881081
Since the matrix is everywhere positive, there is a unique stationary distribution.
10891082

10901083
Solution 2:

0 commit comments

Comments
 (0)