Skip to content

Commit f0d3fd6

Browse files
authored
Update markov_chains_I.md
1 parent f46622b commit f0d3fd6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lectures/markov_chains_I.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ Looking at the data, we see that democracies tend to have longer-lasting growth
294294
regimes compared to autocracies (as indicated by the lower probability of
295295
transitioning from growth to growth in autocracies).
296296

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

299299

300300
### Defining Markov chains
@@ -411,7 +411,6 @@ def mc_sample_path(P, ψ_0=None, ts_length=1_000):
411411
X = np.empty(ts_length, dtype=int)
412412
413413
# Convert each row of P into a cdf
414-
n = len(P)
415414
P_dist = np.cumsum(P, axis=1) # Convert rows into cdfs
416415
417416
# draw initial state, defaulting to 0
@@ -683,7 +682,7 @@ P = np.array([[0.4, 0.6],
683682
ψ @ P
684683
```
685684

686-
Notice that `ψ @ P` is the same as `ψ`
685+
Notice that `ψ @ P` is the same as `ψ`.
687686

688687

689688

@@ -772,11 +771,11 @@ For example, we have the following result
772771
(strict_stationary)=
773772
```{prf:theorem}
774773
Theorem: If there exists an integer $m$ such that all entries of $P^m$ are
775-
strictly positive, with unique stationary distribution $\psi^*$, and
774+
strictly positive, with unique stationary distribution $\psi^*$, then
776775
777776
$$
778777
\psi_0 P^t \to \psi^*
779-
\quad \text{as } t \to \infty
778+
\quad \text{ as } t \to \infty
780779
$$
781780
```
782781

0 commit comments

Comments
 (0)