🌐 [translation-sync] Split "Observed Distributions" out of prob_dist and develop it - #278
Conversation
✅ Deploy Preview for playful-platypus-17d3bb ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
| Criterion | Score |
|---|---|
| Accuracy | 8/10 |
| Fluency | 8/10 |
| Terminology | 8/10 |
| Formatting | 7/10 |
| Overall | 7.9/10 |
Summary: The translation of lln_clt.md and observed_distributions.md (including all newly added sections like 样本矩, 样本分位数, 箱线图, 经验累积分布函数, 独立性的作用) is accurate, fluent, and terminologically consistent with the glossary. However, prob_dist.md's changed sections show significant content loss: the companion-lecture reference sentence in the Outline is missing, and substantial explanatory paragraphs in the Discrete distributions and Continuous distributions sections (covering E[f(X)], moments, skewness, kurtosis, excess kurtosis, quantile function, median/quartiles/interquartile range, and robustness discussion) were dropped compared to the English source. These omissions materially reduce the completeness of the translated document in the changed sections and should be restored. Overall terminology usage is highly consistent with the provided glossary (e.g., 大数定律, 中心极限定理, 独立同分布, 小提琴图, 核密度估计, 经验累积分布函数) The newly added sections in observed_distributions.md (样本矩, 样本分位数, 箱线图, 独立性的作用) are translated fluently and accurately, preserving mathematical notation and code blocks correctly Long narrative passages (e.g., the Bernoulli LLN example, the AR(1) exercise solution) read naturally in academic Chinese and preserve the logical structure of the proofs
Suggestions:
- [major · accuracy] lectures/prob_dist.md — ## Outline: The English source added a sentence referencing a companion lecture: 'A companion lecture, {doc}
observed_distributions, treats observed data...' This sentence is missing from the Simplified Chinese translation's Outline section. → 添加:'姐妹讲座 {doc}observed_distributions讨论观测数据——我们测量或收集的一组数字——以及它与本讲所研究的概率分布之间的联系。' - [major · accuracy] lectures/prob_dist.md — ## Discrete distributions (mean/variance/moments section): Substantial content was silently dropped from the translation of the discrete distributions section, including the paragraphs on 'Expectation is also called the first moment...', the general definition of E[f(X)], the paragraph on standard deviation being in the same units as X, the discussion of moments/central moments/standardized moments, skewness, kurtosis, excess kurtosis, and the note about… → Restore the omitted paragraphs on E[f(X)], standard deviation units, moments/central moments, skewness, kurtosis, excess kurtosis, and the scipy.stats.kurtosis fisher note, translated into Chinese.
- [major · accuracy] lectures/prob_dist.md — ## Continuous distributions: The English source's introductory paragraphs for 'Continuous distributions' include definitions of E[f(X)], variance/moments/skewness/kurtosis (same as discrete case), the CDF, quantile function, median, quartiles, interquartile range, and their robustness to outliers (with a forward reference to heavy_tails). Nearly all of this is missing from the Chinese translation, which jumps directly from t… → Add the missing paragraphs on quantile function, median, quartiles, interquartile range, and robustness, with reference to {doc}
heavy_tails, translated into Chinese. - [minor · terminology] lectures/prob_dist.md — ### Beta distribution: The gamma function link target was changed from the English Wikipedia URL to a Baidu Baike URL, which is an unnecessary and inconsistent substitution not required by any stated policy. → Keep consistent with other links in the document (e.g., use the Wikipedia link as in the English source) unless there's a project-wide policy on link localization.
- [minor · formatting] lectures/prob_dist.md — ```{code-cell} ipython3 imports block: The translation's import block for prob_dist.md still references a hardcoded local font path and yfinance-unrelated font setup that differs from the English source's simpler import block; while this may be intentional site-wide styling, it introduces a difference not present in the source and not mentioned in any stated policy, which could be flagged as an unexplained addition. → Confirm this font-loading addition is part of an approved site-wide template; if not required, align with the English source's import block.
🔍 Diff Quality
| Check | Status |
|---|---|
| Scope Correct | ✅ |
| Position Correct | ✅ |
| Structure Preserved | ❌ |
| Heading-map Correct | ❌ |
| Overall | 5/10 |
Summary: File scope and section positions match the source's reorganization, but prob_dist.md in the target is missing significant new conceptual content (moments, skewness, kurtosis, quantiles) that the source added, making structure not fully preserved.
Issues:
- prob_dist.md target is missing substantial new content that source added: generalized expectation E[f(X)], standard deviation definition, standardized moments, skewness, kurtosis, excess kurtosis discussion, and quantile function/median/quartile definitions in both discrete and continuous distribution sections
- Target prob_dist.md lacks the new normal/lognormal distribution additions showing skew/kurtosis stats (u.stats(moments='sk'), ppf median/quartiles) that source added
- This represents missing translated content rather than just a heading-map issue, since large blocks of new source prose were not synced to the target file
This review was generated automatically by action-translation review mode.
There was a problem hiding this comment.
Pull request overview
该 PR 由 translation-sync 自动生成,目的是将上游英文仓库中从 prob_dist 拆分出来的 “Observed Distributions” 讲义同步到中文仓库,并更新目录与相关讲义中的引用关系。
Changes:
- 新增中文讲义
lectures/observed_distributions.md(观测分布) - 更新
lectures/lln_clt.md,将小提琴图引用改为指向新讲义的内部锚点 - 更新
lectures/_toc.yml以在目录中加入新讲义(但当前变更引入了缺失章节引用与本地化不一致问题)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lectures/observed_distributions.md | 新增“观测分布”讲义(含绘图/示例代码),但存在至少一处会运行报错的示例代码与一处图形含义不一致的问题 |
| lectures/lln_clt.md | 将小提琴图链接改为 {ref} 指向新讲义锚点,并清理多余空行 |
| lectures/_toc.yml | 目录加入 observed_distributions,但同时新增了当前仓库不存在的章节引用,且多个 caption 从中文变为英文 |
| .translate/state/observed_distributions.md.yml | 新增翻译状态记录 |
| .translate/state/lln_clt.md.yml | 更新翻译状态记录(source sha / synced-at / tool-version 等) |
Suppressed comments (2)
lectures/_toc.yml:52
- _toc.yml 中新增的章节 msy_fishery 在当前仓库中不存在(lectures/msy_fishery.* 未找到),会导致构建失败。若该讲义尚未同步/翻译,应先从 TOC 中移除或注释掉。
- file: scalar_dynam
- file: solow
- file: msy_fishery
- file: cobweb
lectures/_toc.yml:92
- _toc.yml 中新增的章节 bayes_intro 在当前仓库中不存在(lectures/bayes_intro.* 未找到),会导致构建失败。若该讲义尚未同步/翻译,应先从 TOC 中移除或注释掉。
chapters:
- file: simple_linear_regression
- file: mle
- file: bayes_intro
- caption: Other
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fig, ax = plt.subplots() | ||
| ax.hist(x_amazon, bins=20) | ||
| ax.set_xlabel('monthly return (percent change)') | ||
| ax.set_ylabel('density') | ||
| plt.show() |
| fig, ax = plt.subplots() | ||
| ax.violinplot([x_amazon['AMZN'], x_costco['COST']]) | ||
| ax.set_ylabel('monthly return (percent change)') |
| - file: pv | ||
| - file: cons_smooth | ||
| - file: tax_smooth | ||
| - file: equalizing_difference |
| - caption: Introduction | ||
| numbered: true | ||
| chapters: | ||
| - file: about | ||
| - caption: 经济数据 | ||
| - caption: Economic Data |
|
This is not a one-off. The identical thing already happened on the sibling edition: QuantEcon/lecture-python.zh-cn#202 merged 2026-07-24 and that site served 19 English captions and zero Chinese ones for 17 days before it was caught — repair in QuantEcon/lecture-python.zh-cn#245. The mechanism is that a lecture-adding sync regenerates Filed for the durable fix as QuantEcon/action-translation#254. Until that lands, restore the Chinese captions on this branch before merging — same for #279, which carries the same revert. Noting for whoever picks it up that this PR has three other issues recorded in the 2026-08-10 review: a missing bib key ( |
The sync for QuantEcon/lecture-python-intro#811 landed only half the split and clobbered the translated table of contents. Four repairs: - _toc.yml: the sync overwrote the file with upstream's English version, reverting every part caption to English and adding entries for tax_smooth, msy_fishery and bayes_intro, none of which are translated here. Restored the translated toc and added just the one new entry. - quant-econ.bib: observed_distributions.md cites decock2011ames, which the action does not carry across because it never syncs .bib files. Appended the upstream entry. - prob_dist.md: upstream #811 moved the "observed distributions" material into its own lecture, but only the addition was synced, so the content would have appeared twice. Removed the migrated sections along with their heading-glossary entries. - prob_dist.md: dropped the now-unused yfinance and seaborn imports and the yfinance install cell, which only the migrated sections needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review: four defects, remediation preparedReviewed this against the upstream source in QuantEcon/lecture-python-intro#811. The preview build failure is the visible symptom of a broader problem — the sync applied only half of the upstream split and overwrote the translated table of contents. Two further defects are not visible in the CI log at all.
FixDefect 1 is repaired by restoring the translated toc and adding a single entry, Net effect on VerificationChecked before committing: every StatusThe branch has been rebased onto current Two notes beyond this PRThe toc clobbering and the unsynced #283 carries the same dropped-file bug: its metadata lists |
0dda3dd to
6083116
Compare
The sync for QuantEcon/lecture-python-intro#819 declared lectures/prob_dist.md in its metadata but emitted no diff for it, the same dropped-file fault seen in #278 and #280. Upstream changed that file +7 -2, rewriting the outline to introduce the three-lecture sequence. Added the three sequence paragraphs to prob_dist.md, translated to match the register this PR already uses for the same cross-links in observed_distributions.md. Both {doc} targets are on main, so they resolve. Upstream's edit replaces an earlier "A companion lecture" paragraph, but that paragraph never reached this repo — it belongs to the wider prob_dist.md gap from QuantEcon/lecture-python-intro#811, tracked in #290 — so the net change here is an addition. prob_dist's state file is deliberately left untouched so that gap stays flagged for resync. Also rebased onto current main. observed_distributions.md and its state file conflicted add/add against the copy #278 landed; both resolved in favour of this branch, whose version is the strict superset — 903 lines against 785, with 19 figure captions and both fitting_distributions cross-links that main's older copy lacks. Verified against upstream at a453cf5: same 2 anchors, 13 headings, 42 code cells and 19 caption blocks, with no duplicate labels or figure names repo-wide. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Update translation: lectures/mle.md * Update translation: .translate/state/mle.md.yml * Update translation: lectures/observed_distributions.md * Update translation: .translate/state/observed_distributions.md.yml * FIX: apply the dropped prob_dist.md half of the sequence linking The sync for QuantEcon/lecture-python-intro#819 declared lectures/prob_dist.md in its metadata but emitted no diff for it, the same dropped-file fault seen in #278 and #280. Upstream changed that file +7 -2, rewriting the outline to introduce the three-lecture sequence. Added the three sequence paragraphs to prob_dist.md, translated to match the register this PR already uses for the same cross-links in observed_distributions.md. Both {doc} targets are on main, so they resolve. Upstream's edit replaces an earlier "A companion lecture" paragraph, but that paragraph never reached this repo — it belongs to the wider prob_dist.md gap from QuantEcon/lecture-python-intro#811, tracked in #290 — so the net change here is an addition. prob_dist's state file is deliberately left untouched so that gap stays flagged for resync. Also rebased onto current main. observed_distributions.md and its state file conflicted add/add against the copy #278 landed; both resolved in favour of this branch, whose version is the strict superset — 903 lines against 785, with 19 figure captions and both fitting_distributions cross-links that main's older copy lacks. Verified against upstream at a453cf5: same 2 anchors, 13 headings, 42 code cells and 19 caption blocks, with no duplicate labels or figure names repo-wide. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python-intro.
Source PR
#811 - Split "Observed Distributions" out of prob_dist and develop it
Files Added
lectures/observed_distributions.md.translate/state/observed_distributions.md.ymlFiles Updated
lectures/lln_clt.md.translate/state/lln_clt.md.ymllectures/_toc.ymlDetails
This PR was created automatically by the translation action.