prospects_bounded_rationality#

  • Series: lecture-python.myst

  • File: lectures/prospects_bounded_rationality.md

  • Audit date: 2026-08-26

  • Corpus snapshot: e25fdf2345

  • Categories audited: writing, math, code, figures, references, links (JAX out of scope)

  • Overall score: 8.8 / 10

  • Priority: NONE

Score breakdown#

Category

Score

One-line note

Writing

6.5/10

qe-writing-005 ×3; qe-writing-003 ×3; qe-writing-007 ×3.

Math

10/10

no mechanical violations detected.

Code

7.5/10

qe-code-001 ×3; qe-code-002 ×1.

JAX

out of scope

JAX rules target lecture-jax.

Figures

8.5/10

qe-fig-004 ×1; qe-fig-001 ×2.

References

10/10

no mechanical violations detected.

Links

10/10

no mechanical violations detected.

Admonitions

N/A

no admonitions, exercises or solutions.

Issues#

Critical#

None found.

High severity#

None found.

Medium severity#

  • [qe-code-001] (reviewer) — Follow PEP8 unless closer to mathematical notation. Count: 3. Lines: 248, 342, 599. Example: the trailing comments at 248-249 are padded with 39 and 23 spaces respectively and still do not line up - the # lands three columns apart - because the second line begins with the two-byte β of β_star, so aligning on bytes and aligning on columns are different things. The same line pair carries the drafted qe-code-002 hit: 247 spells sigma_u out where 249 and everything after use Unicode (β_star, β0, β), so the file is inconsistent with itself within three lines. Second, the belief parameter has two spellings and one of them collides with a live global: it is β0 as a parameter at 251, 281 and 302, and b0 as the loop variable at 342 (curve = np.array([ssr(b0, p) for b0 in grid])) - in a module whose global b is the Phillips-curve-style slope used in the very same expression through ssr. Third, 599 is 84 characters (penalties.append(ssr_gain(0.08, p, β_star) - ssr_gain(gain_true, p, β_star))), the file’s only long line. Worth folding in: simulate (251), belief_path (302), ssr (311) and ssr_gain (584) all read a, b and t0 from module globals rather than taking them, which is what makes the b/b0 collision reachable; and the loop at 594-601 runs 20 seeds over samples up to 50,000 in pure Python twice over, about two million iterations at build time.

  • [qe-fig-001] — Do not set figure size unless necessary. Count: 2. Lines: 280, 345. Example: figsize=.

  • [qe-writing-003] (reviewer) — Maintain logical flow. Count: 3. Lines: 341, 247, 268. Example: the identification exercise removes the transient it is about, and does not say so. 268 sets up three economies “with very different initial beliefs” and {numref}`fig-pbr-belief` shows them converging from \(\beta_0 \in \{2, 16.667, 40\}\). Then excess_curve (338-343) generates its data with p, _ = simulate(β_star, u) and the table at 364-366 does the same - so both the figure at 329-353 and the table at 362-375 are computed on a sample whose true initial belief already is \(\beta^\star = 16.667\), the middle, flat line of the previous figure. There is no transient in the data at all. The conclusion (“information about \(\beta_0\) stops accumulating”) survives, but the demonstration is being run in the least favourable case for finding a transient and the reader is not told which \(\beta_0\) generated the prices - 348’s ax.axvline(β_star, ...) is the only hint. Second, sigma_u is declared at 247 and never used anywhere in the lecture: all four shock draws are rng.standard_normal(...) (278, 340, 364, 597), so the shock scale the line names is inert and the variance is silently fixed at one. Third, the lecture previews itself three times before it starts - 64-67 (“This lecture explains that asymmetry, gives it a concrete numerical face, and reads the ledger against the opening quest”), then 76-79 restates the first lecture, then 100-101 gives the running order again (“first the debits, then the central asymmetry, then the credits”).

  • [qe-writing-005] (reviewer) — Use bold for definitions, italic for emphasis. Count: 3. Lines: 421, 194, 470. Example: bold is used as a heading in one section and as emphasis throughout, in a lecture that otherwise has real headings. 421, 438 and 449 set the three credits as bold lines on their own - Equilibrium selection., Evolutionary programming., New tools for the econometrician. - while the postscript uses ### for exactly the same job six times (505, 530, 555, 625, 646, 667), so three of the lecture’s nine subsections are invisible to the table of contents. Second, emphasis is split across both weights, and the clearest case is one contrast rendered two ways: 194 bolds it (“Replacing a rational agent with a boundedly rational one adds parameters”) and 401 italicises the opposite (“methods that reduce the number of parameters”). The same pattern recurs at 47 (econometricians), 54-55 (selecting, computing), 208 (converges), where the file’s own habit for emphasis is italic - not (107), do (111), while it is still adjusting (95), only (184), transient (209), particular (424), own (455), models / tools (460-461), independent (515), departures from (534). Third, 470 and 476 bold debit and credit as emphasis, having already used both words unbolded at 57, 103, 414 and 416. The genuine definitions are all correctly bolded and are worth keeping: transition dynamics (43), hard-wiring (121), excess (320), nuisance to estimate (396), expectational stability (510), robustness (632).

  • [qe-writing-007] (reviewer) — Use visual elements to enhance understanding. Count: 3. Lines: 362, 466, 594. Example: the lecture’s punchline is a printed table and its own governing metaphor is never drawn. 362-375 computes, for \(T \in \{50, 500, 5000, 50000\}\), the fit penalty for a wrong \(\beta_0\) beside the penalty for a wrong slope \(b\), and prints them as two f-string columns; 377-389 then spends four paragraphs reading the shape out in words - “The penalty for getting the slope wrong grows in proportion to the sample: a hundredfold more data makes a hundredfold stronger case … The penalty for getting the initial belief wrong stops growing … Past a few thousand observations it is pinned at a constant”. Both columns against \(T\) on log axes, with a slope-one reference line, shows “proportional” against “flat” at a glance and is two ax.loglog calls on numbers the cell already has. Second, 52 says Sargent’s answer “is a ledger, with entries on both sides” and 468 says “Line the two columns up against the destination” - and the ledger is never a ledger. A two-column table (debits: arbitrariness, hard-wiring, over-simple learning tasks, no empirical traction; credits: selection, computation, tools for the econometrician) with a third column for what 1993 got wrong would carry 466-498 and 667-683 together, and it is the one figure the lecture’s own framing asks for. Third, the constant-gain check at 594-602 is the mirror image of the first table and is likewise printed - three numbers whose whole content is that they grow linearly, which is a line on a chart.

Low severity#

  • [qe-code-002] — Use Unicode symbols for Greek letters in code. Count: 1. Lines: 247. Example: spelled-out sigma.

  • [qe-fig-004] — Caption formatting conventions. Count: 1. Lines: 329. Example: caption of 7 words.

Strengths#

  • 213-397 turns an abstract econometric claim into something the reader can watch stop happening. 209 states it (“the extra parameters influence only the transient”), 320-325 says what identification would look like (“the excess grows in proportion to \(T\) and the confidence interval shrinks like \(1/\sqrt{T}\)”), and 362-375 puts the penalty for a wrong \(\beta_0\) beside the penalty for a wrong slope in one loop over four sample sizes - identification and its failure measured on the same data with the same criterion.

  • 233-241 justifies a modelling constant instead of asserting it: \(t_0\) has to be positive because “With \(t_0 = 0\) the first gain is \(\gamma_1 = 1\), so \(\beta_1 = p_0\) exactly and the initial belief is erased after a single period — there would be no transient left for the econometrician to try to estimate.” And the weight formula quoted at 235 is right: \(\prod_{s=1}^{t}(1 - \frac{1}{s+t_0}) = t_0/(t+t_0)\).

  • The algebra and the two implementations agree despite writing the index differently: 226-228 gives \(\gamma_t = 1/(t+t_0)\), simulate writes the gain as 1 / (t + 1 + t0) while updating β[t + 1] (260) and belief_path writes 1 / (t + t0) while updating β[t] (308) - I checked the offset and both give \(\beta_1\) the gain \(1/(1+t_0)\) and \(\beta_2\) the gain \(1/(2+t_0)\).

  • The postscript (500-683) does something rare in the corpus: it grades its own source’s 1993 predictions three decades on, and separates the ones that were overtaken (555-623, the econometricians did return the compliment), the one that was delivered in narrower form (530-553, escape dynamics rather than transition dynamics), and the ones that still stand (669-673).

  • 561-607 identifies the precise technical reason the 1993 obstacle dissolved rather than gesturing at progress - constant-gain beliefs never settle, so the gain is part of the stationary distribution rather than of a bounded initial episode - and then verifies it on the same cobweb with the same fit criterion (593-602), so the two experiments are directly comparable.

  • Citations are typed more precisely than the corpus norm: 8 {cite:t} in author position (38, 100, 183, 525, 540, 542, 609, 613) and 4 {cite:p} where the reference really is parenthetical (217, 512, 632, 655), which is why qe-ref-001 measures zero.

  • The lecture is scrupulous about whose judgment it is reporting - “Sargent’s own answer” (52), “Sargent noted” (184), “Sargent judged in 1993” (157), “Sargent is candid” (430), “on Sargent’s own accounting” (489) - and hands him the two concessions directly, including the frank one at 433-436 about doubting the dynamics while keeping the equilibria they select.

  • Every {doc} reference is doing specific work rather than padding a list: bounded_rationality at 40, 124, 514 and 639, marimon_mcgrattan_sargent at 132, 428, 444 and 657, olg_adaptive_money at 184, 426, 523 and 537, and genetic_classifier at 458, 653 and 659, each cited for the one thing that lecture supplies.

  • Not one sentence in 683 lines runs past 32 words and qe-writing-001 measures zero - which for an essay with almost no equations to break the prose up is the hardest setting in the corpus to hold that convention, and 681-683 still lands the ending on a measurable claim rather than a flourish.