Skip to content

Update markov_chains_II.md #462

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 10 commits into from
Jun 17, 2024
Merged

Update markov_chains_II.md #462

merged 10 commits into from
Jun 17, 2024

Conversation

longye-tian
Copy link
Collaborator

Dear @jstac ,

I have updated the lecture: markov_chains_II.md, based on #460.

In particular, the changes include:

  • "We discussed the uniqueness of stationary distributions our earlier lecture on Markov chains" -> We discussed the uniqueness of stationary distributions in our earlier lecture on Markov chains.
  • Unifymathbb for indicator function.
  • "an initial." -> "an initial".
  • Fix capitalization of the subtitle.
  • Discussed before -> discussed in [add doc link]. -1 + np.arrange(ts_length) -> np.arrange(1, ts_length + 1).
  • Change the time length for the periodic chain.
  • Political institution mode -> political institution model.
  • Remove the alpha parameter for the 33.3.4 graph and remove the figsize.
  • Add a seed for the mc. simulate
  • Delete https://intro.quantecon.org/markov_chains_II.html#expectations-of-geometric-sums.
  • Change the graph to the simple one in the exercise.
  • Change the number in the range to len(P)

In addition, I have opened a new issue to discuss the way to add the definition of accessibility, as it may require altering the main text.

Thank you for reviewing the changes ❤️

Longye

This pull request update the lecture markov_chains_II.md based on #460

In particular, the changes include:

- "We discussed uniqueness of stationary distributions our [earlier lecture on Markov chains](https://intro.quantecon.org/markov_chains_I.html)" -> We discussed uniqueness of stationary distributions in our [earlier lecture on Markov chains](https://intro.quantecon.org/markov_chains_I.html).
- Unify`mathbb` for indicator function.
- "an initial." -> "an initial".
- Fix capitalization of the subtitle.
- Discussed before -> discussed in [add doc link].
-`1 + np.arrange(ts_length)` -> `np.arrange(1, ts_length + 1)`.
- Change the time length for the periodic chain.
- Political institution mode -> political institution model.
- Remove the `alpha` parameter for 33.3.4 graph and remove the `figsize`.
- Add a seed for the `mc.simulate` (@longye-tian).
- Delete https://intro.quantecon.org/markov_chains_II.html#expectations-of-geometric-sums.
- Change the graph to the simple one in the exercise.

- Change the number in the range to len(P)
Copy link

netlify bot commented Jun 17, 2024

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 298e812
🔍 Latest deploy log https://app.netlify.com/sites/taupe-gaufre-c4e660/deploys/66700e73c025fe0008384ef1
😎 Deploy Preview https://deploy-preview-462--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Jun 17, 2024

@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 03:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 03:48 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 04:06 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 05:19 Inactive
@mmcky
Copy link
Contributor

mmcky commented Jun 17, 2024

@longye-tian I just merged Humphrey's fixes for this lecture in #459.

can you merge in the latest main when you're ready.

Please let me know if you need any help with the conflict.

@longye-tian
Copy link
Collaborator Author

@longye-tian I just merged Humphrey's fixes for this lecture in #459.

can you merge in the latest main when you're ready.

Please let me know if you need any help with the conflict.

Thank you @mmcky. I just merged the conflict!

@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 05:36 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 05:37 Inactive
@@ -196,16 +196,16 @@ This gives us another way to interpret the stationary distribution (provided irr

Importantly, the result is valid for any choice of $\psi_0$.

The theorem is related to {doc}`the Law of Large Numbers <lln_clt>`.
The theorem is related to {doc}`the law of large numbers <lln_clt>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jstac re: style guide. Do we want to always use {doc} without replacing the title text (i.e. leaving the title text from the lecture it references) or have a more nuanced approach using replacement text in some cases where it makes sense. Just thinking of a "rule" we can have in the style guide.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question @mmcky . I think we should default to the title text but replace it when clarity is enhanced. In this case it's enhanced.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @jstac I will add a section to our style guide.


for x0 in range(8):
for x0 in range(len(P)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 for removing the magic numbers. Really nice work @longye-tian

* $\mathbb{1} \{X_t = x\} = 1$ if $X_t = x$ and zero otherwise.
* $\{X_t\}$ is a Markov chain with stochastic matrix $P$ and initial distribution $\psi_0$

* $\mathbf{1} \{X_t = x\} = 1$ if $X_t = x$ and zero otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@longye-tian , I think this should be mathbb. (We should make all of them \mathbb{1}.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thank you for pointing this out! I have just updated this issue.


It tells us that, in some settings, the law of large numbers sometimes holds even when the
sequence of random variables is [not IID](iid_violation).
sequence of random variables is {ref}`not IID <iid_violation>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@longye-tian , is this different? I have a feeling the html will be the same...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be the same. I changed this line while I was doing troubleshooting. (I was a bit desperate hhaha :))

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just changed them back

Best ❤️
Longye

@jstac
Copy link
Contributor

jstac commented Jun 17, 2024

These are big improvements @longye-tian , many thanks!

Please address the small comments above.

@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 09:43 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 09:45 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 10:29 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 17, 2024 10:32 Inactive
@jstac
Copy link
Contributor

jstac commented Jun 17, 2024

Thanks @longye-tian , much appreciated.

@jstac jstac merged commit f4c78ca into main Jun 17, 2024
7 checks passed
@jstac jstac deleted the markov_chain_II branch June 17, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants