Skip to content

DoE: variance-components figure for blocked experiments - #41

Open
kgdunn wants to merge 1 commit into
mainfrom
claude/chapter-7-8-key-points
Open

kgdunn wants to merge 1 commit into
mainfrom
claude/chapter-7-8-key-points

Conversation

@kgdunn

@kgdunn kgdunn commented Jul 9, 2026

Copy link
Copy Markdown
Owner

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/*.py convention (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

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
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.

2 participants