Skip to content

Typos in markov_chains_I.md #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions lectures/markov_chains_I.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ From US unemployment data, Hamilton {cite}`Hamilton2005` estimated the followin

```

+++

Here there are three **states**

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

We can also find a higher probability from collapse to growth in democratic regimes
We can also find a higher probability from collapse to growth in democratic regimes.


### Defining Markov chains
Expand Down Expand Up @@ -411,7 +409,6 @@ def mc_sample_path(P, ψ_0=None, ts_length=1_000):
X = np.empty(ts_length, dtype=int)

# Convert each row of P into a cdf
n = len(P)
P_dist = np.cumsum(P, axis=1) # Convert rows into cdfs

# draw initial state, defaulting to 0
Expand Down Expand Up @@ -683,7 +680,7 @@ P = np.array([[0.4, 0.6],
ψ @ P
```

Notice that `ψ @ P` is the same as `ψ`
Notice that `ψ @ P` is the same as `ψ`.



Expand Down Expand Up @@ -772,11 +769,11 @@ For example, we have the following result
(strict_stationary)=
```{prf:theorem}
Theorem: If there exists an integer $m$ such that all entries of $P^m$ are
strictly positive, with unique stationary distribution $\psi^*$, and
strictly positive, with unique stationary distribution $\psi^*$, then

$$
\psi_0 P^t \to \psi^*
\quad \text{as } t \to \infty
\quad \text{ as } t \to \infty
$$
```

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

+++ {"user_expressions": [], "tags": []}

Here

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

```

+++

Since the matrix is everywhere positive, there is a unique stationary distribution.

Solution 2:
Expand Down