QuantEcon / QuantEcon/test-translation-sync
[lecture-backward-test.md] The source contains a bug: the steady-state formula omits population growth rate…
@mmcky is already working on this.
Since Mar 5, 2026.
- Dominant language
- TeX
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Summary
The source contains a bug: the steady-state formula omits population growth rate n in the denominator (s/δ should be s/(n+δ)). The code also has the same bug. The translation corrects both, and adds a comparative statics visualization and a clarifying note about the effects of n and s.
Details
| Field | Value |
|---|---|
| File | lecture-backward-test.md |
| Section | ## Steady State |
| Category | BUG FIX |
| Confidence | 99% (high) |
| Source repo | test-translation-sync |
| Target repo | test-translation-sync.zh-cn |
Analysis
The omission of n in the steady-state formula is a clear mathematical error — in the standard Solow model with population growth, the steady state satisfies s*k^α = (n+δ)k, giving k = (s/(n+δ))^(1/(1-α)). The source defines n=0.02 in the code but then fails to use it in the denominator, producing an incorrect numerical result. This is a high-confidence bug fix. The comparative statics visualization and clarifying notes are genuine content improvements that should also be considered for backport.
Suggested Changes
1. Bug fix in steady-state formula
Before:
$$
y^* = \left(\frac{s}{\delta}\right)^{\frac{\alpha}{1-\alpha}}
$$
After:
$$
y^* = \left(\frac{s}{n + \delta}\right)^{\frac{\alpha}{1-\alpha}}
$$
2. Bug fix in code: k_star computation
Before:
k_star = (s / delta) ** (1 / (1 - alpha))
After:
k_star = (s / (n + delta)) ** (1 / (1 - alpha))
3. Clarifying note on comparative statics
Before:
This means higher savings rates lead to higher steady-state output per worker.
After:
Note that the denominator includes the population growth rate $n$. This means higher savings rates lead to higher steady-state output per worker, while higher population growth rates reduce steady-state output per worker.
4. Code improvement: comparative statics plot
Before:
(no comparative statics visualization in source)
After:
Add a comparative statics plot showing steady-state output per worker as a function of the savings rate:
```python
# Comparative statics: effect of savings rate
s_values = np.linspace(0.05, 0.5, 50)
y_star_values = (s_values / (n + delta)) ** (alpha / (1 - alpha))
fig, ax = plt.subplots(figsize=(8, 5))
ax.plot(s_values, y_star_values, 'b-', linewidth=2)
ax.set_xlabel('Savings rate (s)', fontsize=12)
ax.set_ylabel('Steady-state output per worker (y*)', fontsize=12)
ax.set_title('Effect of Savings Rate on Steady-State Output', fontsize=14)
ax.axvline(x=s, color='r', linestyle='--', label=f's = {s}')
ax.legend()
ax.grid(True, alpha=0.3)
plt.tight_layout()
plt.show()
```
5. Code improvement: print statement clarity
Before:
print(f"Steady state capital: {k_star:.2f}")
print(f"Steady state output: {y_star:.2f}")
After:
print(f"Steady state capital per worker: {k_star:.2f}")
print(f"Steady state output per worker: {y_star:.2f}")
Generated by resync backward on 2026-03-05.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.