Make the posterior-concentration argument visible and concrete#917
Merged
Conversation
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>
📖 Netlify Preview Ready!Preview URL: https://pr-917--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_ex3solution 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−kand take the limit explicitly:(α+k)/(α+β+n) ≈ k/n → 0.4(sincek/n → 0.4by the LLN),≈ θ(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