Skip to content

Audit: 边际分布 → 边缘分布 for "marginal distribution" across 8 remaining lectures (54 occurrences) #201

Description

@mmcky

The AI review on #198 caught a real terminology defect — the glossary specifies 边缘分布 for "marginal distribution" but the translation used 边际分布. #198 merged before it was fixed; #200 corrects that one lecture. Checking the scope turned up 8 more lectures with the same defect, 54 occurrences in total, and the edition is currently inconsistent with itself.

The rule

The zh-cn glossary is explicit and context-aware: "Marginal distribution" → 边缘分布 with "context": "probability", while the economics senses correctly keep 边际 — 边际产量, 边际消费倾向, 边际收入, 边际效用. 边缘分布 is the standard mathematical term for a marginal distribution; 边际 is "marginal" as in marginal cost. So not every 边际 is wrong — only the probability sense. That is why this needs reading rather than a blanket find-and-replace.

Occurrences

Lecture 边际分布 (check) 边缘分布 (correct)
prob_matrix 25 35
finite_markov 15 0
ak_aiyagari 3 0
aiyagari 2 0
ar1_turningpts 1 0
lake_model 1 0
mle 1 0
multi_hyper 1 0
inventory_dynamics 4 fixed in #200

prob_matrix.md is the striking one: both renderings, in the same document, 25 against 35. finite_markov.md is the other priority — 15 occurrences and it includes a Marginal Distributions heading, so its heading-map value needs updating in step with the heading or the next sync will mis-map the section. That applies to any lecture where the term appears in a heading.

lecture-intro.zh-cn has one affected file too — markov_chains_I.md, 1 wrong against 2 correct — worth a matching pass there.

Why it happened

Traced upstream and filed as QuantEcon/action-translation#149. In short: translate forward (the CLI resync path used for the 2026-07-19 wave) resolves its glossary only relative to the current working directory, has no --glossary override, and logs nothing either way — so a resync run from the wrong directory silently translates with no glossary and looks identical to one that applied it.

The production signature matches. The init path honoured the glossary: all four lectures containing the term among the 37 seeded in #196 use 边缘分布, zero wrong. The forward path did not: prob_matrix.md went from 12 wrong / 28 correct before its 2026-07-19 resync to 25 wrong / 35 correct after — the resync introduced 13 new occurrences of the non-glossary rendering into a document where the correct term was already dominant.

The term also predates the engine entirely — it first appears in the March 2025 bulk translations — so this is partly inherited debt that the resync compounded rather than corrected.

Suggested approach

Lecture by lecture, not a sweep: confirm each occurrence is the probability sense, update the heading-map value wherever the term appears in a heading, and keep the PRs small enough to review. prob_matrix and finite_markov account for 40 of the 54 and are worth doing first.

Worth treating as a pilot for the audit workflow rather than just a fix: it is a concrete, bounded, glossary-anchored terminology pass over a real corpus, which is exactly the shape the human-review program's audit stage is meant to produce (QuantEcon/project-translation#15, QuantEcon/action-translation#136).

Related

Activity

  1. mmcky commented on Jul 23, 2026

    @mmcky
    ContributorAuthor

    The upstream cause is fixed and released — this is now purely a content cleanup, with no risk of reintroduction.

    The engine defect that produced this drift was QuantEcon/action-translation#149: translate forward resolved its glossary only relative to process.cwd(), and no edition repo carries a glossary — they ship inside the engine package — so a resync launched from this repo translated with no glossary at all, and logged nothing either way. That is why the 2026-07-19 wave took prob_matrix.md from 12 wrong / 28 correct to 25 wrong / 35 correct: it was generating new text with terminology enforcement silently switched off.

    Fixed in QuantEcon/action-translation#150 and shipped in v0.23.0 (2026-07-23), verified running on @v0. Glossary resolution is now package-relative and reported on every run, so a future resync of these lectures cannot reintroduce the wrong term the same way.

    Two things that means for this audit:

    1. Nobody needs to re-investigate the cause. It is understood, fixed and released.
    2. The remaining work is the existing text, which the fix does not touch — 50 occurrences across 8 lectures still need correcting by hand or by a fresh resync now that the glossary reaches the model.

    One caveat worth carrying: the fix guarantees the glossary is delivered, not that the model adheres to it. A live post-fix run honoured 4 of 5 glossary terms in newly generated text and rendered the fifth as a variant. So a resync is likely to fix most of these but should still be reviewed rather than trusted — tracked generally at QuantEcon/action-translation#154.

  2. mmcky commented on Aug 7, 2026

    @mmcky
    ContributorAuthor

    The 2026-08-07 glossary re-run on the v0.25.0 estate (report) confirms this wave's cluster on exactly the same 8 lectures — no shrink, no growth. One sequencing constraint before the hand-fix: #230 (open sync backlog) touches kalman_filter_var.md — merge it first or the wave conflicts on that file, the same collision pattern #208/mle.md produced on 2026-07-27. The other seven cluster files are untouched by the open backlog and safe to fix any time.

  3. mmcky commented on Aug 7, 2026

    @mmcky
    ContributorAuthor

    Sequencing constraint discharged: #230 merged 2026-08-07, so kalman_filter_var is no longer contested and all 8 cluster lectures are safe to hand-fix any time. One logistics note: the edition republished the same day (publish-2026aug07b), so the wave's fixes will need the next cache run + publish tag to reach readers.

  4. mmcky commented on Aug 18, 2026

    @mmcky
    ContributorAuthor

    Wave staged as #253: 边际分布 → 边缘分布 across the six uncontested lectures (46 occurrences — prob_matrix 25, finite_markov 15, ak_aiyagari 3, aiyagari 2, ar1_turningpts 1, mle 1), re-verified against live state 2026-08-18. The residual is one occurrence each in multi_hyper and lake_model, deliberately held back: open sync PRs #241 and #247 re-deliver those files and both heads still carry the rival term, so fixing them now would be overwritten. Fix them on main after those two merge — this issue stays open to track that residual.

  5. mmcky commented on Aug 19, 2026

    @mmcky
    ContributorAuthor

    The last two occurrences are fixed in #257: multi_hyper (the marginal distribution of each $k_i$) and lake_model (the marginal distribution over employment/unemployment states), both the probability sense the glossary assigns 边缘分布.

    These were held out of the #253 wave because sync PRs #241 and #247 still carried the rival term on their branches; both merged during the 2026-08-19 backlog drain, so the fix can now land without being reverted.

    After #257 merges the edition has zero occurrences of 边际分布 and is self-consistent on the term for the first time — this issue can close then. The economics senses (边际产量, 边际消费倾向, 边际收入, 边际效用) are untouched throughout, as ruled.

  6. mmcky commented on Aug 19, 2026

    @mmcky
    ContributorAuthor

    Complete. #257 merged, and the edition now has zero occurrences of 边际分布 — verified against main across all of lectures/.

    The audit's full arc, for the record:

    Stage Where Occurrences
    Found by the AI review on #198 one lecture fixed in #200
    Scope check 8 further lectures 54 total, edition inconsistent with itself
    Main wave #253 46 across 6 uncontested lectures
    Held behind sync PRs #241/#247 multi_hyper, lake_model 2
    Final #257 those last 2

    The two held occurrences waited because #241 and #247 still carried the rival term on their branches and would have reverted the fix; both merged during the 2026-08-19 backlog drain, which unblocked the closure.

    Both final instances were the probability sense the glossary assigns 边缘分布 — the marginal distribution of each $k_i$ in multi_hyper, and the marginal distribution over employment/unemployment states in lake_model. The economics senses (边际产量, 边际消费倾向, 边际收入, 边际效用) keep 边际 throughout, as ruled.

    The upstream cause was fixed engine-side on 2026-07-23 by QuantEcon/action-translation#150, so no future resync can reintroduce the term. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions