QuantEcon / QuantEcon/lecture-python.myst

prob_matrix.md: assorted corrections

Open
#879 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
123
Forks
57
Avg merge
3d 10h
Merged PRs (30d)
11

Description

A collection of issues found in lectures/prob_matrix.md, similar to those addressed in #877 / #878 for prob_meaning.md.

  • Typos and grammar:
    • "Among concepts that we'll be studying include" → "Concepts that we'll study include" (line 22)
    • "underly" → "underlie" (line 75)
    • "a small number parameters" → "a small number of parameters" (line 284)
  • IID terminology: Lines 134, 137, 1788 use "i.i.d." while line 167 uses both "IID" and "iid" in the same sentence. Standardize to IID for consistency with prob_meaning.
  • PEP 8 naming: class discrete_bijoint: should be DiscreteBijoint (line 748). Verbose docstring style could also be trimmed.
  • Replace prettytable with pandas: prettytable is used heavily throughout (lines 644–691, 748–857, 1327–1505). Replacing with pandas DataFrames would drop the dependency and render better in notebooks — same change made in #878 for prob_meaning.
  • Plotting style: Commented-out # %matplotlib notebook magic commands on lines 956, 967 (dead code). Lines 972–973 mix plt.ylabel and ax.set_zlabel — should standardize to ax. methods.
  • Unused import: from mpl_toolkits.mplot3d import Axes3D (line 58) is not needed since matplotlib 3.1+.
  • Cross-reference: Line 1021 uses {doc}\this quantecon lecture <multivariate_normal>`` — should use the actual lecture title for better PDF rendering.
  • {\rm Prob} vs \textrm{Prob} (line 149): One instance uses {\rm Prob} while the rest of the lecture uses \textrm{Prob}. Should be consistent.
  • Braces vs parentheses for Prob: Lines 104, 110, 210 use \textrm{Prob}(...) with parentheses, but most other lines use \textrm{Prob}\{...\} with braces. Should pick one convention. Note that prob_meaning uses parentheses throughout.
  • Variance operator: Lines 579, 588, 1050 use $\mathbb{D}[X]$ for variance, which is uncommon. The exercises (line 1694) already use $\text{Var}(Z)$, creating an inconsistency. Standardize to $\mathbb{V}[X]$.
  • $\mathrm{E}$ vs $\mathbb{E}$ (line 588): One instance uses \mathrm{E} while the rest of the lecture uses \mathbb{E}. Should be \mathbb{E} consistently.
  • Normal distribution notation: Lines 1015–1016 use $\mathbb{N}[...]$ with blackboard bold and square brackets. Should be $N(\mu, \sigma^2)$ with plain $N$ and parentheses.
  • Cross-lecture density notation: prob_meaning uses $p(\theta)$ for density while prob_matrix uses $f(x)$. Using $f$ for densities is standard but readers encounter $p$ first in the TOC ordering. Worth noting for future consistency passes.
  • Ill-defined integral (lines 107–111): The equation $\textrm{Prob}(X \in A) = \int_{\mathcal{G}} p(\omega), d\omega$ assumes $\Omega \subseteq \mathbb{R}^n$ with Lebesgue measure, but $\Omega$ was introduced as an abstract set of outcomes. Either qualify (e.g., "If $\Omega \subseteq \mathbb{R}^n$ and $\mu$ has a density with respect to Lebesgue measure...") or introduce a dominating measure.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read lectures/prob_matrix.md alongside prob_meaning.md, starting with the listed line ranges and the prettytable sections. Work through the checklist, including terminology, notation, imports, plotting style, dependency replacement, and the measure-theoretic qualification. Done means every correction is resolved consistently and the lecture’s rendered output remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, markdown, matplotlib, pandas, python
Domain
content, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.