Conversation
A reproducible matplotlib figure for the new "Fixed and random block effects" material in the pid-book Design and Analysis of Experiments chapter. It shows a blocked experiment's two variance components: the block-to-block scatter of the block means about the grand mean (sigma_gamma, the random block effect) and the within-block scatter of the runs about their block mean (sigma_eps, the residual). Values are hard-coded so the figure is deterministic; run from this directory to write the PNG alongside it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TH8TdNx3iJmWqvaoZz5mQx
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.
What this adds
A reproducible matplotlib figure (script + PNG in
doe/) for the new Fixed and random block effects material in the pid-book Design and Analysis of Experiments chapter:blocking-variance-components: a blocked experiment shown as runs grouped by block (day), with each block's mean offset from the grand mean. It labels the two variance components: the block-to-block scatter of the block means (σ_γ, the random block effect) and the within-block scatter of the runs about their block mean (σ_ε, the residual). This visualizes the intraclass correlationρ = σ_γ² / (σ_γ² + σ_ε²).Follows the existing
doe/*.pyconvention (standalone matplotlib,savefig(..., dpi=300, transparent=True), deterministic hard-coded values, run from its own directory).Paired PR
The pid-book side that embeds this is kgdunn/pid-book# (linked from that PR). Merge this figures PR first (or together) so the pid-book PDF build can read the PNG.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TH8TdNx3iJmWqvaoZz5mQx
Generated by Claude Code