[organization_capital] posterior-mean figure does not show the convergence the text describes

Open Beginner friendly
#1,015 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Open lectures/organization_capital.md and inspect the cell producing the "Posterior mean convergence and uncertainty" figure, including its T = 20 setting and the prose below it. Rerun the cell to compare the posterior mean with θ_true = 0.8, then either adjust the sample size or revise the explanation so the figure and text agree.

Written by the indexing model from the issue text.

Description

medium-priority new-lecture

In lectures/organization_capital.md, the cell producing the "Posterior mean convergence and uncertainty" figure simulates a single worker with T = 20. The text just below it says:

As the number of screening observations $n$ increases, the posterior mean converges to the true $\theta$, and the posterior uncertainty shrinks at rate $1/\sqrt{n}$.

The posterior mean in the left panel does not converge to θ_true = 0.8. It wanders and ends well away from it.

This is about the sample size rather than the seed: PR #1014 migrates the cell to np.random.default_rng(0), which changes the draws but not this behaviour. Screenshots of the figure before and after that migration are attached below.

Before the migration:

Image

After the migration:

Image

Two ways to make the figure match the text:

  1. Increase T.
  2. Or soften the prose so that it describes what the figure shows at T = 20.

CC @mmcky and @HumphreyYang.

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

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.

More from QuantEcon/lecture-python.myst

All issues in QuantEcon/lecture-python.myst

Similar issues

More Data Visualization issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.