Eight schools
The classic partial-pooling example (Rubin, 1981): eight schools each ran a coaching program and measured its effect on SAT scores, with a reported effect and standard error per school. A hierarchical model lets each school’s estimate borrow strength from the others, shrinking noisy small-effect estimates toward the group mean rather than treating every school in isolation.
Non-centered parameterization (theta = mu + tau * theta_tilde in a transformed parameters block, with theta_tilde ~ normal(0, 1)) rather than sampling theta directly with theta ~ normal(mu, tau) – the direct form couples theta and tau tightly when tau is small, which is the textbook “funnel” geometry NUTS struggles with. This reparameterization is the standard fix.
Everything runs in a single block – see linear-regression.qmd for why.