Skip to content

Make the posterior-concentration argument visible and concrete#917

Merged
jstac merged 2 commits into
mainfrom
prob-meaning-posterior-convergence
Jun 18, 2026
Merged

Make the posterior-concentration argument visible and concrete#917
jstac merged 2 commits into
mainfrom
prob-meaning-posterior-convergence

Conversation

@jstac

@jstac jstac commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Addresses two issues in the "Why the posterior concentrates" section of prob_meaning.md.

1. The referenced plots were hidden

The section opened with "How shall we interpret the patterns above?", but the plots it pointed to lived inside the pm_ex3 solution dropdown, which is collapsed by default — so for most readers there was nothing visibly above.

Fix: move the mean/std figure out of the solution into this always-visible section, and reword the opening to stand on its own.

2. It showed the prior's moments, not the posterior's

The section gave the generic beta mean α/(α+β) and variance using the symbols α, β — but those are the prior parameters, so it literally displayed the prior mean (0.5), never the posterior's. The stated convergence was therefore asserted, not shown.

Fix: substitute the posterior parameters a = α+k, b = β+n−k and take the limit explicitly:

  • mean (α+k)/(α+β+n) ≈ k/n → 0.4 (since k/n → 0.4 by the LLN),
  • variance ≈ θ(1−θ)/n → 0 (numerator ~ n², denominator ~ n³).

Now a reader can see why the posterior concentrates on the truth.

Verified end-to-end via jupytext --to py + headless execution (exit 0).

🤖 Generated with Claude Code

Two fixes to the "Why the posterior concentrates" section of prob_meaning:

- The opening referred to "the patterns above", but those plots lived
  inside the pm_ex3 solution dropdown (collapsed by default). Move the
  mean/std figure out of the solution into this always-visible section
  and reword the opening so it stands on its own.

- The section gave the generic beta mean/variance in terms of (alpha,
  beta) — which are the *prior* parameters, so it actually displayed the
  prior's moments, not the posterior's. Substitute the posterior
  parameters (alpha+k, beta+n-k) and take the limit explicitly: the mean
  -> 0.4 since k/n -> 0.4, and the variance ~ theta(1-theta)/n -> 0. Now
  the stated convergence is shown, not merely asserted.

Verified with jupytext export + headless execution.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-917--sunny-cactus-210e3e.netlify.app

Commit: 3b1ce3a

📚 Changed Lectures


Build Info

- Add a one-line pointer from the pm_ex3 part-f solution to the
  "Why the posterior concentrates" section.
- Open that section with a back-reference to the solution of Exercise 3
  ("In the solution to pm_ex3 we watched ..."), since the concentration
  it discusses is shown in a solution box that is collapsed by default.
- Introduce the coverage-interval plot with a lead-in sentence (it
  previously followed the mean/std figure with none).
- Replace the 5th/95th-quantile scatter with a box-and-whisker plot
  (median, IQR, 5-95% whiskers) built from the analytical posterior
  quantiles, with the true theta marked.

Verified with jupytext export + headless execution.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jstac jstac merged commit 1f15346 into main Jun 18, 2026
1 check passed
@jstac jstac deleted the prob-meaning-posterior-convergence branch June 18, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant