Lecture notes · Introduction to Mathematical Statistics · Chapter 13

Chapter 13. Randomized Block Designs: Lecture Notes

Chapter 12 compared \(k\) treatments on \(k\) independent samples. Here every block of similar experimental units receives all \(k\) treatments, so the observations in a block are dependent and the block-to-block variation, which would otherwise inflate the error, can be removed from the comparison. The chapter builds the analysis of variance for this design (three sums of squares instead of two), its Tukey and contrast follow-ups, the special case of two treatments (the paired t test, which is the randomized block F test in disguise) and the practical question of when pairing or blocking pays. The book states the distribution results and omits their proofs; these notes add the missing arguments (the least-squares fit and the decomposition, why the three sums of squares are independent chi-squared variables, expected mean squares and power, when blocking pays, Tukey intervals and contrasts for block data, the paired t as the likelihood ratio test, the block F ratio for two treatments, the exact randomization test and the power comparison with the two-sample test) and correct a few slips of the printed text.

Course home Ch. 1 Introduction Ch. 2 Probability Ch. 3 Random variables Ch. 4 Special distributions Ch. 5 Estimation Ch. 6 Hypothesis testing Ch. 7 Normal-based inference Ch. 8 Types of data Ch. 9 Two-sample inference Ch. 10 Goodness of fit Ch. 11 Regression Ch. 12 Analysis of variance Ch. 13 Randomized blocks Ch. 14 Nonparametric statistics

How to use the gap boxes and selected questions

Each Filling the gap box completes a step or a proof the book leaves out, and each selected question asks you to apply the chapter. Try it yourself first. When you are stuck, open Hint 1; the next hint unlocks one minute after you open the previous one, so take one hint at a time and think about it before moving on: the key idea first, then the tools, then the steps, with intermediate results to aim for. The full proof or solution appears after the last hint and unlocks two minutes later: use it to check your own argument. If you use a generative AI assistant, use it the same way: ask for a hint or for the next step only, then check what it says against these notes (why I teach this way). Spotted a mistake? Use the Report an error link at the end of each box: confirmed errors are corrected and listed, with thanks, in the errata.

How to read these notes

They follow the book. Sections carry the book's numbers (13.1 to 13.4) and numbered items keep theirs (Theorem 13.2.3, Case Study 13.2.2, Question 13.3.6). Everything is written in new words; the book is cited for each result, example and question, and numbered equations keep their number, e.g. \((13.2.1)\).

Filling the gaps. Wherever the book says "the details will be omitted", "the proofs are similar", leaves a proof as an exercise or states a result without proof, an orange Filling the gap box gives the full argument. Proofs and derivations start hidden: open one with its bar, or use the button below. Each gap box and each selected question offers graded hints, one at a time, before the full solution.

Figures and demonstration. The book's two figures in this chapter are a drawing of two field layouts (Figure 13.1.1) and a printed ANOVA table (Figure 13.2.1, reproduced as a table below), so none is redrawn. Three figures of my own (x13.1 to x13.3) show the structure of block data, when blocking pays and how the paired test's power depends on the correlation inside a pair; they are computed by the Python code. The ▶ Demo boxes open interactive demonstrations: one is new for this chapter and one first-year demonstration is reused.

Main reference

R. J. Larsen and M. L. Marx, An Introduction to Mathematical Statistics and Its Applications, 6th edition, Pearson (2018), Chapter 13, pages 613–637. Section, case-study, figure, equation and question numbers below refer to this book. Further reading is listed in the references.

The explanations, derivations, figures and code are my own; equations are cited by their numbers in the book.

Companion courses

Blocking and pairing are also developed, at other levels and in other words, in the companion courses of this site. Where a proof there is complete, these notes give the statement and a short sketch and link to it rather than repeating it.

Earlier chapters of this course. Chapter 8 of the book already argues, in words, why blocking and pairing remove variation and that the paired \(t^2\) equals the block \(F\): Filling the gap 8.3 (pairing shrinks the variance of a comparison, and what it costs), 8.4 (blocking removes the block effect from every comparison of levels) and 8.10 (for two levels the analysis-of-variance \(F\) is the square of the \(t\) statistic). These notes link to them instead of repeating them and concentrate on the distribution theory and the analyses. The one-way analysis of variance of Chapter 12 of the book is referred to in plain text (its notes are written at the same time as these). The normal-sample theorem (Theorem 7.3.2), the \(F\) and \(t\) laws (Definition 7.3.2, 7.3.3), the one-sample \(t\) test (Theorem 7.4.2) and the non-central \(t\) law (Filling the gap 7.17) are used as known results; so are the two-sample tests of Theorem 9.2.2.

New here: the least-squares fit and the three-way decomposition (Filling the gap 13.1, 13.2), the independent chi-squared laws (13.3), expected mean squares and the power of the \(F\) test (13.4), what "error" means and why it has \((b-1)(k-1)\) degrees of freedom (13.5), when blocking pays (13.6), Tukey intervals (13.7), contrasts (13.8), the paired \(t\) law (13.9) and its likelihood ratio (13.10), the block \(F\) ratio for two treatments (13.11), the exact randomization test (13.12) and the power of paired against unpaired (13.13).

The chapter at a glance

  • 13.1 Blocks are groups of similar units; each block receives every treatment, in random order, so that block-to-block differences cancel out of the treatment comparisons.
  • 13.2 Model \(Y_{ij}=\mu+\beta_i+\tau_j+\varepsilon_{ij}\). The total sum of squares splits into three independent parts, treatments, blocks and error (Theorem 13.2.1, 13.1 to 13.3); the treatment \(F\) ratio has \(k-1\) and \((b-1)(k-1)\) degrees of freedom (Theorem 13.2.3). Tukey intervals and contrasts follow with the new error term (Theorem 13.2.5).
  • 13.3 With two treatments the block analysis is the paired \(t\) test on the within-pair differences, which are free of the pair effect (Theorem 13.3.1, 13.9 to 13.12).
  • 13.4 Pairing wins when subjects in a pair resemble each other (large within-pair correlation) and loses when they do not, because it gives up degrees of freedom (13.6, 13.13).

Notation. The data form a \(b\times k\) table \(y_{ij}\): row \(i=1,\dots,b\) is block \(i\), column \(j=1,\dots,k\) is treatment \(j\). Row totals \(T_{i\cdot}\), column totals \(T_{\cdot j}\), grand total \(T_{\cdot\cdot}\), row means \(\bar y_{i\cdot}\), column means \(\bar y_{\cdot j}\), grand mean \(\bar y_{\cdot\cdot}\). The error variance is \(\sigma^2\), the degrees of freedom of error are \(\nu=(b-1)(k-1)\), and \(F_{p,a,c}\) is the point with area \(p\) to its left under the \(F_{a,c}\) density (the book's convention).

Derivations start hidden: click any bar to open one.

13.1 Introduction

pp. 613–614 The smaller the error variance \(\sigma^2\), the better the chance of rejecting a false null hypothesis. One way to shrink it is better technique; the statistical way is to block. Fisher introduced the idea for field trials. To compare four varieties of corn, planting variety A in the western strip, B next to it and so on confuses variety with position (Figure 13.1.1(a) of the book, a drawing, not redrawn): a soil gradient would be credited to the variety. Instead cut the field into blocks of four neighbouring plots, plant all four varieties in every block with the plots assigned at random (Figure 13.1.1(b)), and compare varieties within blocks: the soil of a block is shared by its four plots, so it cancels from every within-block comparison, and the analysis pools these within-block comparisons from block to block. The total sum of squares, split into two parts in the one-way design of Chapter 12 of the book, is now split into three: treatments, blocks and error.

Blocks can be sets of subjects of the same age, sex and condition, litters of animals, days or shifts, or, as an extreme, a single subject receiving every treatment, so that each subject is its own block. The observations inside a block are dependent (they share the block's conditions), whereas different blocks are independent: that is the structural difference from the \(k\) independent samples of Chapter 12 (see also Section 8.2). The hypotheses are the same as in Chapter 12, \(H_0\colon\mu_1=\dots=\mu_k\) against "not all equal". For \(k=2\) the same inference can be made by the paired \(t\) test of Section 13.3.

The price of blocking is paid in degrees of freedom: the error has \((b-1)(k-1)\) of them instead of \(k(b-1)\). Whether the price is worth paying is the subject of Filling the gap 13.6 and of Section 13.4.

13.2 The \(F\) Test for a Randomized Block Design

pp. 614–615 The data are a \(b\times k\) table (Table 13.2.1 of the book) in which every column has the same number \(b\) of observations. Assume that the block effect is additive, \[ Y_{ij}=\mu_j+\beta_i+\varepsilon_{ij},\qquad \varepsilon_{ij}\ \text{independent}\ \N(0,\sigma^2),\tag{1}\] where \(\beta_i\) is the effect of block \(i\) and \(\mu_j\) the true mean of treatment \(j\). Write \(\mu=\frac1k\sum_j\mu_j\) and \(\tau_j=\mu_j-\mu\) for the treatment effects; the equivalent form (page 620 of the book) is \(Y_{ij}=\mu+\beta_i+\tau_j+\varepsilon_{ij}\) with \(\sum_j\tau_j=0\) and, to make the block effects identifiable, \(\sum_i\beta_i=0\). The next box shows why these constraints are harmless and finds the least-squares fit.

Filling the gap 13.1: the two forms of the model are the same, and the least-squares estimates (Question 13.2.12) pp. 614–615, 620, 628

Question 13.2.12 asks you to minimise \(L=\sum_{i,j}(y_{ij}-\beta_i-\mu_j)^2\) by differentiating. Here is the minimisation by an orthogonal decomposition, which also gives the identity of Filling the gap 13.2, and the reason the model needs a constraint.

Hint 1 of 5: the key idea

Can you write \(y_{ij}-\mu-\beta_i-\tau_j\) as a sum of pieces that are perpendicular when summed over the whole table, so that each piece can be made as small as possible on its own?

Hint 2 of 5: tools you will need
  • Why a constant can move between \(\beta_i\) and \(\mu_j\): the identifiability constraint \(\sum\beta_i=0\).
  • Deviations from a mean sum to zero.
  • The residual \(r_{ij}=y_{ij}-\bar y_{i\cdot}-\bar y_{\cdot j}+\bar y_{\cdot\cdot}\) has zero row and column sums.
Hint 3 of 5: step 1

Show that adding \(c\) to every \(\beta_i\) and subtracting it from every \(\mu_j\) changes no mean. Aim for: \(b+k-1\) free quantities, and the constraints that remove the ambiguity.

Hint 4 of 5: step 2

Split the deviation into the four parts \(a\), \(u_i\), \(v_j\), \(r_{ij}\) and show every cross product sums to zero. Aim for: \(L=bk\,a^2+k\sum u_i^2+b\sum v_j^2+\sum r_{ij}^2\).

Hint 5 of 5: step 3

Which choice of parameters makes the first three terms vanish? Aim for: \(\hat\mu=\bar y_{\cdot\cdot}\), \(\hat\beta_i=\bar y_{i\cdot}-\bar y_{\cdot\cdot}\), \(\hat\tau_j=\bar y_{\cdot j}-\bar y_{\cdot\cdot}\); then say why least squares is maximum likelihood.

Proof

Identifiability. In \(y_{ij}\approx\beta_i+\mu_j\) one can add a constant \(c\) to every \(\beta_i\) and subtract it from every \(\mu_j\) without changing any mean: the \(b+k\) parameters of the book's form (1) determine only \(b+k-1\) free quantities (the book's "\(bk\) parameters" in Question 13.2.12 should read \(b+k\)). Imposing \(\sum_i\beta_i=0\) removes this ambiguity and then \(\mu=\frac1k\sum_j\mu_j\) is the overall mean. With \(\tau_j=\mu_j-\mu\) the two forms \(\mu_j+\beta_i\) and \(\mu+\beta_i+\tau_j\) describe the same set of mean tables, namely all tables of the form "row effect plus column effect".

Least squares. For any candidate \(\mu,\beta_i,\tau_j\) with \(\sum\beta_i=\sum\tau_j=0\), split \(y_{ij}-\mu-\beta_i-\tau_j\) into four parts: \[ y_{ij}-\mu-\beta_i-\tau_j=(\bar y_{\cdot\cdot}-\mu)+\big[(\bar y_{i\cdot}-\bar y_{\cdot\cdot})-\beta_i\big]+\big[(\bar y_{\cdot j}-\bar y_{\cdot\cdot})-\tau_j\big]+r_{ij},\qquad r_{ij}=y_{ij}-\bar y_{i\cdot}-\bar y_{\cdot j}+\bar y_{\cdot\cdot}.\] Let \(a=\bar y_{\cdot\cdot}-\mu\), \(u_i=(\bar y_{i\cdot}-\bar y_{\cdot\cdot})-\beta_i\) and \(v_j=(\bar y_{\cdot j}-\bar y_{\cdot\cdot})-\tau_j\). Then \(\sum_iu_i=0\) and \(\sum_jv_j=0\) (both sets of effects and the deviations of means sum to zero), and \(\sum_jr_{ij}=0\) for each \(i\), \(\sum_ir_{ij}=0\) for each \(j\). Therefore every cross product vanishes when summed over the table: \(\sum_{i,j}a\,u_i=ak\sum_iu_i=0\), \(\sum_{i,j}u_iv_j=(\sum_iu_i)(\sum_jv_j)=0\), \(\sum_{i,j}u_ir_{ij}=\sum_iu_i\sum_jr_{ij}=0\), and similarly for the others. Hence \[ L=bk\,a^2+k\sum_iu_i^2+b\sum_jv_j^2+\sum_{i,j}r_{ij}^2.\] Only the first three terms depend on the parameters, and each is non-negative, so \(L\) is smallest exactly when \(a=u_i=v_j=0\): \[ \hat\mu=\bar y_{\cdot\cdot},\qquad \hat\beta_i=\bar y_{i\cdot}-\bar y_{\cdot\cdot},\qquad \hat\tau_j=\bar y_{\cdot j}-\bar y_{\cdot\cdot},\qquad \hat\mu_j=\bar y_{\cdot j}.\] Because the errors are normal with common variance, the maximum likelihood estimates are the same (the log-likelihood is a constant minus \(L/(2\sigma^2)\) minus \(bk\ln\sigma\)), and the maximum is at \(\hat\sigma^2=\sum r_{ij}^2/(bk)\). The minimum value of \(L\) is \(\sum r_{ij}^2\), the error sum of squares. For the book's estimate of \(\beta_i\) in the noiseless case (page 615, \(\bar Y_{i\cdot}-\bar Y_{\cdot\cdot}\)) this is the same formula. ∎

Illustration (Case Study 13.2.1, the wine data, \(b=4,k=2\)): the fitted value of the DRS-FTIR measurement of white wine 1 is \[ \hat y_{11}=\bar y_{\cdot\cdot}+\hat\beta_1+\hat\tau_1=128.525+(114.0-128.525)+(127.85-128.525)=113.325 \], as in Table 13.2.5 of the book.

The decomposition (13.2.1) and its computing formulas pp. 615–618

For a one-way analysis the error sum of squares would be \(\sum_{i,j}(y_{ij}-\bar y_{\cdot j})^2\). Adding and subtracting \(\bar y_{i\cdot}-\bar y_{\cdot\cdot}\) splits it into a block part and a new, smaller error: \[ \sum_{i,j}(y_{ij}-\bar y_{\cdot j})^2=\underbrace{\sum_{i,j}(\bar y_{i\cdot}-\bar y_{\cdot\cdot})^2}_{\mathrm{SSB}}+\underbrace{\sum_{i,j}(y_{ij}-\bar y_{\cdot j}-\bar y_{i\cdot}+\bar y_{\cdot\cdot})^2}_{\mathrm{SSE}}.\tag{13.2.1}\] With \(\mathrm{SSTOT}=\sum(y_{ij}-\bar y_{\cdot\cdot})^2\) and \(\mathrm{SSTR}=b\sum_j(\bar y_{\cdot j}-\bar y_{\cdot\cdot})^2\), this gives \[ \mathrm{SSTOT}=\mathrm{SSTR}+\mathrm{SSB}+\mathrm{SSE}\qquad(\text{Theorem 13.2.1(a)}).\] Writing \(C=T_{\cdot\cdot}^2/(bk)\), the computing formulas are \[ \mathrm{SSTR}=\sum_j\frac{T_{\cdot j}^2}{b}-C,\qquad \mathrm{SSB}=\sum_i\frac{T_{i\cdot}^2}{k}-C,\qquad \mathrm{SSTOT}=\sum_{i,j}y_{ij}^2-C,\qquad \mathrm{SSE}=\mathrm{SSTOT}-\mathrm{SSTR}-\mathrm{SSB}.\tag{13.2.2–13.2.4}\]

Filling the gap 13.2: proof of (13.2.1), of Theorem 13.2.1(a) and of the computing formulas (Question 13.2.11) pp. 615–618, 628

The book carries out the algebra for (13.2.1) and leaves the computing formulas as an exercise. Both follow from one orthogonality fact. (The same computation appears in Filling the gap 8.4; it is written out here because the rest of the chapter rests on it.)

Hint 1 of 5: the key idea

Add and subtract the row and column means so that \(y_{ij}-\bar y_{\cdot\cdot}\) becomes a sum of three terms. Why does every cross product then vanish?

Hint 2 of 5: tools you will need
  • Deviations from a mean sum to zero, so \(\sum_i\alpha_i=\sum_j\gamma_j=0\).
  • Zero row and column sums of \(r_{ij}\).
  • A double sum of a product of a row quantity and a column quantity factorises.
Hint 3 of 5: step 1

Define \(\alpha_i,\gamma_j,r_{ij}\) and check \(y_{ij}-\bar y_{\cdot\cdot}=\alpha_i+\gamma_j+r_{ij}\). Aim for: the four vanishing sums.

Hint 4 of 5: step 2

Square, sum over the table and kill the three cross products. Aim for: \(\mathrm{SSTOT}=\mathrm{SSB}+\mathrm{SSTR}+\mathrm{SSE}\), and (13.2.1) from \(y_{ij}-\bar y_{\cdot j}=\alpha_i+r_{ij}\).

Hint 5 of 5: step 3

Expand \(\sum_j(\bar y_{\cdot j}-\bar y_{\cdot\cdot})^2=\sum_j\bar y_{\cdot j}^2-k\bar y_{\cdot\cdot}^2\) and substitute \(T_{\cdot j}/b\). Aim for: the three computing formulas with \(C=T_{\cdot\cdot}^2/(bk)\).

Proof

Put \(\alpha_i=\bar y_{i\cdot}-\bar y_{\cdot\cdot}\), \(\gamma_j=\bar y_{\cdot j}-\bar y_{\cdot\cdot}\) and \(r_{ij}=y_{ij}-\bar y_{i\cdot}-\bar y_{\cdot j}+\bar y_{\cdot\cdot}\), so that \(y_{ij}-\bar y_{\cdot\cdot}=\alpha_i+\gamma_j+r_{ij}\) (the three parts add up by the definition of \(r_{ij}\)). The sums that matter are \[ \sum_i\alpha_i=0,\qquad\sum_j\gamma_j=0,\qquad \sum_jr_{ij}=0\ \text{ for each }i,\qquad \sum_ir_{ij}=0\ \text{ for each }j.\] (The first two hold because deviations from a mean sum to zero. For the third, \(\sum_jr_{ij}=k\bar y_{i\cdot}-k\bar y_{i\cdot}-\sum_j\bar y_{\cdot j}+k\bar y_{\cdot\cdot}\), which is 0 since \(\sum_j\bar y_{\cdot j}=k\bar y_{\cdot\cdot}\); the fourth is the same with rows and columns exchanged.) Squaring and summing over the table, the cross products are \[ \sum_{i,j}\alpha_i\gamma_j=\Big(\sum_i\alpha_i\Big)\Big(\sum_j\gamma_j\Big)=0,\quad \sum_{i,j}\alpha_ir_{ij}=\sum_i\alpha_i\sum_jr_{ij}=0,\quad \sum_{i,j}\gamma_jr_{ij}=\sum_j\gamma_j\sum_ir_{ij}=0.\] The three squared parts each have the same value in every cell of a row (respectively column), so the table sums are \(\sum_{i,j}\alpha_i^2=k\sum_i\alpha_i^2\) and \(\sum_{i,j}\gamma_j^2=b\sum_j\gamma_j^2\). Hence \[ \mathrm{SSTOT}=\underbrace{k\sum_i\alpha_i^2}_{\mathrm{SSB}}+\underbrace{b\sum_j\gamma_j^2}_{\mathrm{SSTR}}+\underbrace{\sum_{i,j}r_{ij}^2}_{\mathrm{SSE}},\] which is Theorem 13.2.1(a). For (13.2.1), \(y_{ij}-\bar y_{\cdot j}=\alpha_i+r_{ij}\), so \[ \sum(y_{ij}-\bar y_{\cdot j})^2=k\sum\alpha_i^2+\sum r_{ij}^2=\mathrm{SSB}+\mathrm{SSE} \], the cross term vanishing by the third identity. (In words: the one-way error is exactly the block sum of squares plus the new error.)

Computing formulas. Since \(\sum_j(\bar y_{\cdot j}-\bar y_{\cdot\cdot})=0\), expand \(\sum_j(\bar y_{\cdot j}-\bar y_{\cdot\cdot})^2=\sum_j\bar y_{\cdot j}^2-k\bar y_{\cdot\cdot}^2\). With \(\bar y_{\cdot j}=T_{\cdot j}/b\) and \(\bar y_{\cdot\cdot}=T_{\cdot\cdot}/(bk)\) multiply by \(b\): \[ \mathrm{SSTR}=b\Big[\sum_j\frac{T_{\cdot j}^2}{b^2}-k\frac{T_{\cdot\cdot}^2}{b^2k^2}\Big]=\sum_j\frac{T_{\cdot j}^2}{b}-\frac{T_{\cdot\cdot}^2}{bk}.\] The same steps with rows (\(\bar y_{i\cdot}=T_{i\cdot}/k\), multiplier \(k\)) give \(\mathrm{SSB}=\sum_iT_{i\cdot}^2/k-C\), and \[ \sum_{i,j}(y_{ij}-\bar y_{\cdot\cdot})^2=\sum y_{ij}^2-bk\bar y_{\cdot\cdot}^2=\sum y_{ij}^2-C \]. ∎

Theorem 13.2.1 (the three sums of squares) p. 616

For \(k\) treatments measured in \(b\) blocks, (a) \(\mathrm{SSTOT}=\mathrm{SSTR}+\mathrm{SSB}+\mathrm{SSE}\), and (b) under model (1) the three sums of squares \(\mathrm{SSTR}\), \(\mathrm{SSB}\), \(\mathrm{SSE}\) are independent.

Theorem 13.2.2 (chi-squared laws) p. 616

(a) If \(H_0\colon\mu_1=\dots=\mu_k\) holds, \(\mathrm{SSTR}/\sigma^2\sim\chi^2_{k-1}\). (b) If \(\beta_1=\dots=\beta_b\), \(\mathrm{SSB}/\sigma^2\sim\chi^2_{b-1}\). (c) Whatever the \(\mu_j\) and \(\beta_i\), \(\mathrm{SSE}/\sigma^2\sim\chi^2_{(b-1)(k-1)}\).

The book proves part (a) of Theorem 13.2.1 by the algebra above and says that the independence in (b) and the laws in Theorem 13.2.2 follow "as in Chapter 12" (the proofs are "similar", the details "omitted"). Here is a complete argument that proves both theorems together, and also gives the law when \(H_0\) is false.

Filling the gap 13.3: the independence and the chi-squared laws of Theorems 13.2.1(b) and 13.2.2 p. 616

The idea: the table is a point of \(\R^{bk}\); the decomposition of Filling the gap 13.2 splits it into four mutually perpendicular pieces, and a spherical normal vector has independent chi-squared squared lengths on perpendicular subspaces.

Hint 1 of 5: the key idea

Think of the table as one point in \(\R^{bk}\) and of the decomposition as four perpendicular subspaces. How does a spherical normal vector behave on perpendicular subspaces?

Hint 2 of 5: tools you will need
  • The decomposition and its vanishing cross products (gap 13.2).
  • Rotating a spherical normal vector keeps it spherical, and \(\chi^2\) is a sum of squared standard normals (gap 7.4).
  • Independent functions of disjoint sets of independent variables are independent.
Hint 3 of 5: step 1

Show the four maps are orthogonal projections and count dimensions. Aim for: \(1,\ b-1,\ k-1,\ (b-1)(k-1)\), summing to \(bk\).

Hint 4 of 5: step 2

Prove the lemma with an orthonormal basis adapted to the subspaces. Aim for: the squared lengths are sums over disjoint sets of independent \(\N(\eta_s,1)\) squares.

Hint 5 of 5: step 3

Check where the mean table \(m_{ij}=\mu+\beta_i+\tau_j\) lies. Aim for: \(Q_Em=0\), \(\|Q_Tm\|^2=b\sum\tau_j^2\); read off Theorems 13.2.1(b) and 13.2.2 (and which are central).

Proof

Step 1: four perpendicular subspaces. View a table \(y\) as a vector of \(\R^{bk}\) and let \(Q_0y\) have every entry \(\bar y_{\cdot\cdot}\), \(Q_By\) the entries \(\alpha_i=\bar y_{i\cdot}-\bar y_{\cdot\cdot}\), \(Q_Ty\) the entries \(\gamma_j=\bar y_{\cdot j}-\bar y_{\cdot\cdot}\) and \(Q_Ey\) the entries \(r_{ij}\). All four are linear in \(y\), they add to \(y\), and by the vanishing cross products of Filling the gap 13.2 the four pieces of any \(y\) are pairwise orthogonal. Hence each \(Q\) is the orthogonal projection onto its range: it fixes the vectors of its own type (for instance a table \(z_{ij}=\alpha_i\) with \(\sum\alpha_i=0\) has row means \(\alpha_i\) and grand mean 0, so \(Q_Bz=z\)) and \(y-Q_By\) is orthogonal to every \(Q_Bz\). The ranges are \(V_0\) (constant tables, dimension 1), \(V_B\) (tables \(\alpha_i\) with \(\sum\alpha_i=0\), dimension \(b-1\)), \(V_T\) (tables \(\gamma_j\) with \(\sum\gamma_j=0\), dimension \(k-1\)) and \(V_E\), the tables with all row and column sums zero, of dimension \[ bk-1-(b-1)-(k-1)=(b-1)(k-1) \].

Step 2: a lemma. Let \(\varepsilon\sim\N(0,\sigma^2I_n)\), let \(V_1,\dots,V_m\) be mutually orthogonal subspaces of dimensions \(d_1,\dots,d_m\), \(Q_l\) the orthogonal projection onto \(V_l\), and \(\eta\in\R^n\) a fixed vector. Then the \(Q_l(\eta+\varepsilon)\) are independent and \[ \frac{\|Q_l(\eta+\varepsilon)\|^2}{\sigma^2}\ \text{ has the non-central }\chi^2_{d_l}\text{ law with parameter }\lambda_l=\frac{\|Q_l\eta\|^2}{\sigma^2},\] a central \(\chi^2_{d_l}\) when \(Q_l\eta=0\). Proof of the lemma. Extend orthonormal bases of the \(V_l\) to an orthonormal basis \(e_1,\dots,e_n\) of \(\R^n\) and let \(S_l\) be the indices of the basis of \(V_l\). The vector \((e_s^\T\varepsilon)_s=U^\T\varepsilon\), with \(U\) the orthogonal matrix of the \(e_s\), is jointly normal with covariance \(\sigma^2U^\T U=\sigma^2I\), so \(z_s=e_s^\T\varepsilon/\sigma\) are independent \(\N(0,1)\). Writing \(\eta_s=e_s^\T\eta/\sigma\), \(\|Q_l(\eta+\varepsilon)\|^2/\sigma^2=\sum_{s\in S_l}(z_s+\eta_s)^2\), a function of the \(z_s\) with \(s\in S_l\) only; the index sets are disjoint, so these quantities are independent, and each is a sum of \(d_l\) squares of independent normals with unit variance and means \(\eta_s\) (Theorem 7.3.1 of the book for \(\eta=0\); the non-central law by definition otherwise), with \(\sum_{S_l}\eta_s^2=\|Q_l\eta\|^2/\sigma^2\).

Step 3: apply it. The mean table of model (1) is \(m_{ij}=\mu+\beta_i+\tau_j\), which lies in \(V_0\oplus V_B\oplus V_T\); so \(Q_Em=0\), \(Q_Tm\) has entries \(\tau_j\) and \(Q_Bm\) has entries \(\beta_i\). Since \(\mathrm{SSTR}=\|Q_Ty\|^2\), \(\mathrm{SSB}=\|Q_By\|^2\) and \(\mathrm{SSE}=\|Q_Ey\|^2\), the lemma gives, with \(y=m+\varepsilon\):

  • \(\mathrm{SSE}/\sigma^2\sim\chi^2_{(b-1)(k-1)}\) always (Theorem 13.2.2(c));
  • \(\mathrm{SSTR}/\sigma^2\) is non-central \(\chi^2_{k-1}\) with parameter \(\lambda_T=b\sum_j\tau_j^2/\sigma^2\), which is 0 exactly when all \(\mu_j\) are equal (Theorem 13.2.2(a));
  • \(\mathrm{SSB}/\sigma^2\) is non-central \(\chi^2_{b-1}\) with parameter \(\lambda_B=k\sum_i\beta_i^2/\sigma^2\), zero exactly when the block effects are equal (part (b));
  • the three are independent (Theorem 13.2.1(b)), and so are the grand mean \(\bar y_{\cdot\cdot}\) and, jointly, the column means \(\bar y_{\cdot j}\), which are functions of \(Q_0y+Q_Ty\), independent of \(\mathrm{SSE}\). This last fact is used for Tukey intervals and contrasts. ∎

The degrees of freedom are thus the dimensions of the four subspaces, \[ 1+(b-1)+(k-1)+(b-1)(k-1)=bk \]: the "3 independent errors out of 8" of Case Study 13.2.1 is \(\dim V_E=(4-1)(2-1)\) (Filling the gap 13.5).

Theorem 13.2.3 (the \(F\) test for treatments) p. 617

If \(H_0\colon\mu_1=\dots=\mu_k\) holds, \[ F=\frac{\mathrm{SSTR}/(k-1)}{\mathrm{SSE}/[(b-1)(k-1)]}\sim F_{k-1,(b-1)(k-1)},\] and \(H_0\) is rejected at level \(\alpha\) when \(F\ge F_{1-\alpha,k-1,(b-1)(k-1)}\). (Proof: Theorems 13.2.1 and 13.2.2 and Definition 7.3.2.)

Theorem 13.2.4 (the \(F\) test for blocks) p. 617

If \(\beta_1=\dots=\beta_b\), then \(\mathrm{MSB}/\mathrm{MSE}\sim F_{b-1,(b-1)(k-1)}\), and equality of the block effects is rejected when it is at least \(F_{1-\alpha,b-1,(b-1)(k-1)}\).

The analysis-of-variance table (Table 13.2.2 of the book) has one row for treatments, one for blocks and one for error, with two \(F\) ratios over the same denominator \(\mathrm{MSE}\). The block \(F\) is a diagnostic rather than the object of interest: a large value says the blocking was effective (Filling the gap 13.6); the treatment \(F\) answers the scientific question.

Filling the gap 13.4: expected mean squares (Question 13.2.10), the \(F\) law when \(H_0\) is false, and power pp. 617, 628

Theorems 13.2.3 and 13.2.4 give the law of \(F\) only under the null hypothesis. The same lemma gives it under the alternative and the expectations of the sums of squares.

Hint 1 of 5: the key idea

For a projection \(Q\) of rank \(d\), what is \(\E\|Q(m+\varepsilon)\|^2\)? The same lemma then gives the law of \(F\) when \(H_0\) is false.

Hint 2 of 5: tools you will need
  • The projections and the lemma of gap 13.3.
  • \(\E\|Q\varepsilon\|^2=\sigma^2\operatorname{tr}Q\).
  • The non-central \(\chi^2\) and \(F\) laws (gap 7.17 for the non-central \(t\)).
Hint 3 of 5: step 1

Expand the square and use \(\E[Q\varepsilon]=0\). Aim for: \(\E\|Q(m+\varepsilon)\|^2=\|Qm\|^2+\sigma^2d\).

Hint 4 of 5: step 2

Insert \(\|Q_Tm\|^2\), \(\|Q_Bm\|^2\), \(Q_Em=0\). Aim for: the three expected sums of squares, and \(\E\,\mathrm{MSE}=\sigma^2\).

Hint 5 of 5: step 3

Name the law of \(F\) under an alternative and write the power. Aim for: non-centrality \(\lambda=b\sum\tau_j^2/\sigma^2\) and \(\P(F_{k-1,\nu}(\lambda)\ge F_{1-\alpha,k-1,\nu})\).

Proof

Expectations. For a projection \(Q\) of rank \(d\), \[ \E\|Q(m+\varepsilon)\|^2=\|Qm\|^2+2(Qm)^\T\E[Q\varepsilon]+\E\|Q\varepsilon\|^2=\|Qm\|^2+\sigma^2d \], because \(\E[Q\varepsilon]=0\) and \(\E\|Q\varepsilon\|^2=\sigma^2\operatorname{tr}Q=\sigma^2d\). With \(\|Q_Tm\|^2=b\sum\tau_j^2\), \(\|Q_Bm\|^2=k\sum\beta_i^2\) and \(Q_Em=0\) (Filling the gap 13.3): \[ \E\,\mathrm{SSTR}=(k-1)\sigma^2+b\sum_j\tau_j^2,\qquad \E\,\mathrm{SSB}=(b-1)\sigma^2+k\sum_i\beta_i^2,\qquad \E\,\mathrm{SSE}=(b-1)(k-1)\sigma^2,\] which answers (a) and (b) of Question 13.2.10; dividing by the degrees of freedom, \(\mathrm{MSE}\) is unbiased for \(\sigma^2\) whatever the effects, \(\E\,\mathrm{MSTR}=\sigma^2+\frac{b}{k-1}\sum\tau_j^2\) and \(\E\,\mathrm{MSB}=\sigma^2+\frac{k}{b-1}\sum\beta_i^2\).

The \(F\) law under an alternative. By the lemma \(\mathrm{SSTR}/\sigma^2\) is non-central \(\chi^2_{k-1}(\lambda)\) with \(\lambda=b\sum_j\tau_j^2/\sigma^2\), independent of \(\mathrm{SSE}/\sigma^2\sim\chi^2_\nu\), \(\nu=(b-1)(k-1)\); so \(F\) has the non-central \(F\) law with \(k-1\) and \(\nu\) degrees of freedom and parameter \(\lambda\), and the power of the level-\(\alpha\) test is \(\P(F_{k-1,\nu}(\lambda)\ge F_{1-\alpha,k-1,\nu})\). It grows with \(\lambda\): more blocks, larger treatment differences and smaller \(\sigma\) all help. For \(k=3\) treatments in \(b=5\) blocks with \(\lambda=4\) (for instance effects \(\tau=(0.63,0,-0.63)\) in units of \(\sigma\)), the 5% critical value is \(F_{.95,2,8}=4.459\) and the power is only \(0.30\). For \(k=2\) the \(F\) law is that of \(t^2\) and this is the power of the paired \(t\) test (Filling the gap 13.13). ∎

Because \(\E\,\mathrm{MSTR}\ge\sigma^2=\E\,\mathrm{MSE}\), the ratio tends to exceed 1 under the alternative, but this is only on average: in a given sample either mean square can be the smaller (Question 13.2.10 and the true-false Question 13.2.13(b) of the book, which is false).

Case Study 13.2.1: do two methods agree on the sulfite concentration of wine? pp. 618–621

Four wines (two white, two red) were measured by a new infrared method (DRS-FTIR) and by the standard aeration-oxidation method (Table 13.2.3 of the book: 112.9, 115.1; 123.1, 125.6; 135.2, 132.4; 140.2, 143.7 \(\mu\)g/ml). Each wine is a block and the two methods are the \(k=2\) treatments, so \(b=4\). The hope is not to reject \(H_0\colon\mu_{\mathrm{DRS}}=\mu_{\mathrm{STAN}}\). With \(T_{\cdot\cdot}=1028.2\), \(C=132{,}149.405\), the sums of squares are \(\mathrm{SSB}=872.925\), \(\mathrm{SSTR}=3.645\), \(\mathrm{SSTOT}=888.515\) and by subtraction \(\mathrm{SSE}=11.945\):

SourcedfSSMSFP
Methods13.6453.6450.9150.409
Wines (blocks)3872.925290.97573.080.0027
Error311.9453.982
Total7888.515

The book prints the method \(F\) as 0.92 and concludes "fail to reject": \(F=0.915\) with 1 and 3 degrees of freedom (\(F_{.95,1,3}=10.13\)). The wines differ enormously (block \(F=73.1\)), and ignoring that would be a mistake, since the one-way error would be \((872.925+11.945)/6=147.5\) instead of 3.98. For two methods the same conclusion comes from the paired \(t\) test of Section 13.3 on the four differences \(-2.2,-2.5,2.8,-3.5\): \(t=-0.957\) on 3 degrees of freedom, \(P=0.409\), and \(t^2=0.915=F\) (Filling the gap 8.10). A non-significant result is weak evidence of agreement with only four wines; the 95% interval for the mean difference is \((-5.8,3.1)\) \(\mu\)g/ml, wide compared with differences of practical interest.

Filling the gap 13.5: what "error" means without repeated measurements, and why it has \((b-1)(k-1)\) degrees of freedom pp. 619–621

In a randomized block experiment each cell has one observation, so there is nothing to compute a within-cell variance from. The book explains that "error" is the deviation from the fitted model. Here is the precise statement, including what is silently assumed.

Hint 1 of 5: the key idea

The residuals \(r_{ij}\) are not free: which sums are forced to be zero, and how many independent constraints does that make?

Hint 2 of 5: tools you will need
  • Zero row and column sums of the residuals (gap 13.2).
  • The dimension of \(V_E\) (gap 13.3).
  • Expected sums of squares (gap 13.4).
Hint 3 of 5: step 1

Count constraints on a \(b\times k\) residual table, remembering that the row and column totals share the grand total. Aim for: \(b+k-1\) constraints, \((b-1)(k-1)\) free.

Hint 4 of 5: step 2

For the wine data write the fitted values and residuals. Aim for: residuals \(\pm\) in each row; only 3 of 8 free.

Hint 5 of 5: step 3

Add an interaction \(\theta_{ij}\) with zero row and column sums to the mean table. Aim for: \(\E\,\mathrm{SSE}=(b-1)(k-1)\sigma^2+\sum\theta_{ij}^2\), and what that does to the \(F\) test.

Proof

The fitted value of cell \((i,j)\) is \(\hat y_{ij}=\bar y_{i\cdot}+\bar y_{\cdot j}-\bar y_{\cdot\cdot}\) (Filling the gap 13.1) and the residual is \(r_{ij}=y_{ij}-\hat y_{ij}\); \(\mathrm{SSE}=\sum r_{ij}^2\). The residuals satisfy \(b+k-1\) independent linear constraints (the \(b\) row sums and the \(k\) column sums are zero, but their total is counted twice), so only \(bk-(b+k-1)=(b-1)(k-1)\) of them are free: this is the dimension of \(V_E\) in Filling the gap 13.3, and it is the degrees of freedom of \(\mathrm{SSE}\). For the wine data (\(b=4,k=2\)) the fitted values and residuals are \[\begin{array}{l|cc|cc}&\text{DRS fitted}&\text{STAN fitted}&\text{DRS resid.}&\text{STAN resid.}\\\hline\text{white 1}&113.325&114.675&-0.425&+0.425\\\text{white 2}&123.675&125.025&-0.575&+0.575\\\text{red 1}&133.125&134.475&+2.075&-2.075\\\text{red 2}&141.275&142.625&-1.075&+1.075\end{array}\] so the residual of the second method is minus that of the first in every row: only 3 of the 8 residuals are free (the first three of one column, after which the row sums and the column sum fix the rest), \[ \mathrm{SSE}=2(0.425^2+0.575^2+2.075^2+1.075^2)=11.945 \]. For \(k=2\) the residuals are \(\pm(d_i-\bar d)/2\), half the centred pair differences.

What is assumed. The model is additive: the true cell mean is \(\mu+\beta_i+\tau_j\). Suppose instead that the true mean table is \(m_{ij}=\mu+\beta_i+\tau_j+\theta_{ij}\) with an interaction part \(\theta\) whose row and column sums vanish (a treatment that works better in some blocks than in others). Then \(Q_Em=\theta\ne0\) and, by the expectation formula of Filling the gap 13.4, \(\E\,\mathrm{SSE}=(b-1)(k-1)\sigma^2+\sum\theta_{ij}^2\): error is inflated by the interaction, \(\mathrm{MSE}\) overestimates \(\sigma^2\) and the \(F\) test for treatments becomes conservative. The design cannot separate interaction from noise unless cells are replicated, so a plot of the table with one line per block (Figure x13.1 below) is the natural check: roughly parallel lines support additivity. ∎

Case Study 13.2.2: three therapies for acrophobia pp. 621–623

Fifteen volunteers with severe fear of heights took a Height Avoidance Test (HAT) and were ranked into five blocks of three (A the most severe, E the least); within each block the three therapies, contact desensitization, demonstration participation and live modeling, were assigned at random. The table of HAT-score changes (Table 13.2.6) has rows \((8,2,-2)\), \((11,1,0)\), \((9,12,6)\), \((16,11,2)\), \((24,19,11)\); the therapy totals are \(68,45,17\). With \(C=130^2/15=1126.67\) and \(\sum y_{ij}^2=1894\): \(\mathrm{SSTOT}=767.33\), \(\mathrm{SSB}=438.00\), \(\mathrm{SSTR}=260.93\), \(\mathrm{SSE}=68.40\) (Table 13.2.7):

SourcedfSSMSFP
Therapies2260.93130.4715.260.0019
Blocks4438.00109.5012.810.0015
Error868.408.55
Total14767.33

\(F=15.26>F_{.99,2,8}=8.65\), so \(H_0\) is rejected at the 0.01 level (\(P=0.0019\)). The strong block effect (\(F=12.8\)) is no surprise: the blocks were built from the HAT score to be different. Figure x13.1 shows what the analysis sees: the five lines rise and fall together across the therapies, nearly parallel, so removing the block means leaves a small error.

What the one-way analysis would have said. If the same 15 numbers were treated as three independent samples of five, the error would be \(\mathrm{SSB}+\mathrm{SSE}=506.4\) on \(3\cdot4=12\) degrees of freedom, a mean square of 42.2, and \(F=130.47/42.2=3.09\) on 2 and 12 degrees of freedom: \(P=0.083\), not significant at 0.05 (\(F_{.95,2,12}=3.89\)). Blocking turned a missed difference into a clear one (compare Filling the gap 8.4). One cannot re-analyse data as though they had come from another design (the randomization was within blocks), but the ratio \(\mathrm{MSB}/\mathrm{MSE}=12.8\) says that a future study should block again.

Five lines, one per block, joining the HAT-score changes of the three therapies from left to right: contact desensitization, demonstration participation, live modeling. Four of the five lines decrease from left to right and the third rises slightly from the first to the second therapy; the lines are widely separated vertically (block E highest, block A lowest) and roughly parallel. A dashed black line shows the therapy means 13.6, 9.0 and 3.4.
Figure x13.1. The acrophobia data of Case Study 13.2.2, one line per block, with the therapy means (dashed). The lines are far apart (large block effect) and nearly parallel (additive model), so comparing therapies inside blocks removes a large part of the variation. Own figure. Code: ch13_randomized_block_designs.py, fig_x13_1.

Filling the gap 13.6: when does blocking pay? Degrees of freedom against variance pp. 622–623

The book's comment says that blocking lowers \(\mathrm{SSE}\) but costs error degrees of freedom, \((b-1)(k-1)\) instead of \(k(b-1)\), and that the better design depends on how large \(\mathrm{SSB}\) is. Here is the comparison made exact, with the power of the two \(F\) tests. (That blocking removes the block effect from every comparison is Filling the gap 8.4; the new content is the trade-off.)

Hint 1 of 5: the key idea

Both designs give an \(F\) test with a non-centrality and a number of error degrees of freedom. Which depends on the block variance, and which does not?

Hint 2 of 5: tools you will need
  • Power of the block \(F\) test (gap 13.4).
  • Blocking removes the block effect from comparisons (gap 8.4).
  • The non-central \(F\) law and a numerical root finder for the break-even.
Hint 3 of 5: step 1

Give the error variance of the one-way design when each unit has its own effect of variance \(\sigma_B^2\). Aim for: \(\sigma^2+\sigma_B^2\), non-centrality \(\lambda/(1+r)\), \(k(b-1)\) degrees of freedom.

Hint 4 of 5: step 2

Compare the two powers as \(r\) grows from 0. Aim for: the one-way design is better at \(r=0\) (more degrees of freedom), worse for large \(r\); a unique crossing \(r^*\).

Hint 5 of 5: step 3

Link \(r\) to the data through \(\E\,\mathrm{MSB}/\E\,\mathrm{MSE}=1+kr\) and apply it to Case Study 13.2.2. Aim for: \(\hat r\approx3.9\), far above \(r^*\approx0.13\).

Proof

Model for the comparison. Let the units come from blocks whose effects are independent \(\N(0,\sigma_B^2)\), within-block errors \(\N(0,\sigma^2)\), and suppose the same \(bk\) units could be used in either design. In the block design the treatment \(F\) test has non-centrality \(\lambda=b\sum\tau_j^2/\sigma^2\) and degrees of freedom \(k-1\) and \((b-1)(k-1)\) (Filling the gap 13.4): the block effects cancel from \(\bar y_{\cdot s}-\bar y_{\cdot t}\) exactly. In the one-way design (units allocated to treatments without regard to blocks, \(b\) per treatment) each observation has the extra random term, so its error variance is \(\sigma^2+\sigma_B^2\) and the \(F\) test has non-centrality \(\lambda'=b\sum\tau_j^2/(\sigma^2+\sigma_B^2)=\lambda/(1+r)\), \(r=\sigma_B^2/\sigma^2\), and degrees of freedom \(k-1\) and \(k(b-1)\). Hence \[ \text{power}_{\text{block}}=\P\big(F_{k-1,(b-1)(k-1)}(\lambda)\ge F_{.95,k-1,(b-1)(k-1)}\big),\qquad \text{power}_{\text{one-way}}=\P\big(F_{k-1,k(b-1)}(\tfrac{\lambda}{1+r})\ge F_{.95,k-1,k(b-1)}\big).\] Two forces act. The block design has fewer error degrees of freedom (a larger critical value and a heavier-tailed null law), a disadvantage that does not depend on \(r\); but its non-centrality is not diluted by \(1+r\). At \(r=0\) (no real block effect) the one-way design wins; as \(r\) grows its power falls towards the level \(\alpha\) while the block design's power stays the same. The curves cross at a break-even ratio \(r^*\) found numerically.

Numbers. For \(k=3,b=5\) and \(\lambda=4\) (Figure x13.2): the block power is 0.298; the one-way power is 0.333 at \(r=0\), 0.298 at \(r^*=0.13\), 0.184 at \(r=1\) and 0.100 at \(r=4\). The break-even ratio is strikingly small:

\(k\)\(b\)\(\lambda\)power, block designbreak-even \(r^*=\sigma_B^2/\sigma^2\)
2540.3360.317
3540.2980.132
3580.5410.139
4660.4120.065
31060.5100.058
5880.5250.033

Because \(\E\,\mathrm{MSB}=\sigma^2+k\sigma_B^2\), \(\E\,\mathrm{MSB}/\E\,\mathrm{MSE}=1+kr\): the break-even for \(k=3,b=5\) corresponds to a block mean-square ratio of about \(1.4\). A block \(F\) ratio only a little above 1 already says that blocks of \(k\) units are doing useful work, and with three or more treatments it is rarely costly to block when there is any real reason to think units differ. For two treatments the break-even is larger (\(r^*\approx0.32\) for \(b=5\)) because the lost degrees of freedom matter more (this is the paired against two-sample comparison of Filling the gap 13.13). In Case Study 13.2.2 the observed \(\mathrm{MSB}/\mathrm{MSE}=12.8\) estimates \(r=(12.8-1)/3\approx3.9\): far beyond break-even. The simulation in the demonstration shows both designs at once. ∎

Power at level 0.05 against the ratio of block variance to error variance from 0 to 4. A horizontal blue line at 0.30 for the randomized block F test with 2 and 8 degrees of freedom; a red curve for the one-way F test with 2 and 12 degrees of freedom falling from 0.33 at ratio 0 to 0.10 at ratio 4. They cross at ratio 0.13, marked by a dotted vertical line.
Figure x13.2. Power of the block \(F\) test and of the one-way \(F\) test for \(k=3\) treatments in \(b=5\) blocks as the block variance grows (non-centrality 4 when the blocks do not matter). Blocking costs a little power when the block variance is nearly zero and gains a great deal otherwise. Own figure. Code: ch13_randomized_block_designs.py, fig_x13_2.
▶ DemoBlocking in a one-way versus a block analysisSimulated experiments with a chosen number of treatments and blocks, block spread and treatment effects: the rejection rate of the one-way \(F\) (blocks ignored) against the block \(F\), and the average ratios, with the exact powers for comparison. Preset 2 is the case of Figure x13.2 with a large block spread.

Theorem 13.2.5 (Tukey intervals for block data) p. 623

Let \(\bar Y_{\cdot j}\) be the treatment means of a \(b\times k\) randomized block experiment. With probability \(1-\alpha\) all \(\binom k2\) differences satisfy \[ \bar Y_{\cdot s}-\bar Y_{\cdot t}-D\sqrt{\mathrm{MSE}}<\mu_s-\mu_t<\bar Y_{\cdot s}-\bar Y_{\cdot t}+D\sqrt{\mathrm{MSE}},\qquad D=\frac{Q_{\alpha,k,(b-1)(k-1)}}{\sqrt b},\] where \(Q_{\alpha,k,\nu}\) is the upper \(\alpha\) point of the studentized range (the one-way version of Chapter 12 has \(\nu=k(b-1)\) and \(b\) replaced by the group size). If an interval does not contain 0, \(H_0\colon\mu_s=\mu_t\) is rejected at simultaneous level \(\alpha\).

Filling the gap 13.7: proof of Theorem 13.2.5 p. 623

The book states the result with only a remark on the changed degrees of freedom. The proof is one line once the independence of Filling the gap 13.3 is available.

Hint 1 of 5: the key idea

The differences of column means minus the true differences depend on the errors only. How is the largest of them related to the range of \(k\) independent normal variables, and what is independent of \(\mathrm{MSE}\)?

Hint 2 of 5: tools you will need
  • Column means are independent \(\N(\mu_j,\sigma^2/b)\) and independent of \(\mathrm{SSE}\) (gap 13.3).
  • \(\mathrm{SSE}/\sigma^2\sim\chi^2_\nu\) with \(\nu=(b-1)(k-1)\).
  • The definition of the studentized range.
Hint 3 of 5: step 1

Write \(\bar Y_{\cdot j}-\mu_j\) in terms of the errors. Aim for: independent \(\N(0,\sigma^2/b)\) variables \(U_j\).

Hint 4 of 5: step 2

Express the largest \(|(\bar Y_{\cdot s}-\bar Y_{\cdot t})-(\mu_s-\mu_t)|\) as \(\max U_j-\min U_j\) and divide by \(\sqrt{\mathrm{MSE}/b}\). Aim for: a ratio of a range to an independent root chi-square, i.e. \(Q_{k,\nu}\).

Hint 5 of 5: step 3

Invert the event. Aim for: all \(\binom k2\) intervals cover at once with probability exactly \(1-\alpha\).

Proof

The column mean of model (1) is \(\bar Y_{\cdot j}=\mu_j+\bar\beta+\bar\varepsilon_{\cdot j}\) with \(\bar\beta=\frac1b\sum\beta_i=0\) under the constraint (in general \(\bar\beta\) is the same for every column and cancels in differences). So \(U_j=\bar Y_{\cdot j}-\mu_j=\bar\varepsilon_{\cdot j}\), \(j=1,\dots,k\), are independent \(\N(0,\sigma^2/b)\) variables, and by Filling the gap 13.3 they are independent of \(\mathrm{SSE}\), with \(\mathrm{MSE}/\sigma^2\sim\chi^2_\nu/\nu\), \(\nu=(b-1)(k-1)\). The pivot for all differences is \[ \max_{s,t}\big|(\bar Y_{\cdot s}-\bar Y_{\cdot t})-(\mu_s-\mu_t)\big|=\max_jU_j-\min_jU_j=\frac{\sigma}{\sqrt b}\,R,\] where \(R\) is the range of \(k\) independent standard normal variables. Dividing by \(\sqrt{\mathrm{MSE}/b}\), \[ \frac{\max_jU_j-\min_jU_j}{\sqrt{\mathrm{MSE}/b}}=\frac{R}{\sqrt{\chi^2_\nu/\nu}}\ \sim\ Q_{k,\nu},\] which by definition is the studentized range law with \(k\) means and \(\nu\) degrees of freedom. Hence \[ \P\big(\max_{s,t}|(\bar Y_{\cdot s}-\bar Y_{\cdot t})-(\mu_s-\mu_t)|\le Q_{\alpha,k,\nu}\sqrt{\mathrm{MSE}/b}\big)=1-\alpha \], and the event is exactly "every interval of the theorem covers its difference". Compared with the one-way case, the only changes are the error degrees of freedom \(\nu\) (fewer) and the error mean square (smaller). ∎

Example 13.2.1: which acrophobia therapies differ? pp. 623–624

For Case Study 13.2.2, \(k=3\), \(b=5\), \(\nu=8\), \(Q_{.05,3,8}=4.041\), so \(D=4.041/\sqrt5=1.807\) and the radius is \(D\sqrt{8.55}=5.28\) (the book rounds to 5.3). The therapy means are \(13.6,9.0,3.4\):

Differenceestimate95% Tukey intervalconclusion
\(\mu_1-\mu_2\)4.6(−0.7, 9.9)not significant
\(\mu_1-\mu_3\)10.2(4.9, 15.5)reject
\(\mu_2-\mu_3\)5.6(0.3, 10.9)reject

Live modeling is worse than the other two, which cannot be told apart. The simultaneous radius is wider than a single \(t\) interval's (\(2.306\sqrt{8.55\cdot2/5}=4.26\)), the price of the joint guarantee; even so the \(\mu_2-\mu_3\) interval just excludes 0. A series of separate 5% tests would be more liberal and would not have the simultaneous guarantee.

Contrasts. p. 624 A contrast \(C=\sum_jc_j\mu_j\) with \(\sum_jc_j=0\) is tested exactly as in Chapter 12 of the book, but with the block error: estimate \(\hat C=\sum c_j\bar Y_{\cdot j}\), compute \(\mathrm{SS}_C=\hat C^2\big/\big(\sum_jc_j^2/b\big)\) and \[ F=\frac{\mathrm{SS}_C/1}{\mathrm{SSE}/[(b-1)(k-1)]}\sim F_{1,(b-1)(k-1)}\quad\text{under }H_0\colon C=0.\tag{2}\] The book does not prove that (2) has this law, that contrasts that are orthogonal split the treatment sum of squares (Question 13.2.9(b) asks for a check) or how a contrast can reject when the overall \(F\) does not (Case Study 13.2.3). The next box does.

Filling the gap 13.8: the \(F\) test of a contrast, orthogonal contrasts add up to \(\mathrm{SSTR}\), and why the overall test and a contrast can disagree pp. 624–626

Hint 1 of 6: the key idea

A contrast of column means is one linear combination of a normal vector, independent of \(\mathrm{SSE}\). What is the law of its square, and what does orthogonality of two contrasts say about their covariance?

Hint 2 of 6: tools you will need
  • Column means \(\N(\mu_j,\sigma^2/b)\), independent of \(\mathrm{SSE}\) (gap 13.7).
  • Jointly normal and uncorrelated implies independent.
  • Orthonormal bases and the Cauchy–Schwarz inequality.
Hint 3 of 6: step 1

Find the mean and variance of \(\hat C\), then the law of \(\mathrm{SS}_C/\sigma^2\) under \(H_0\). Aim for: \(F=\mathrm{SS}_C/\mathrm{MSE}\sim F_{1,\nu}\).

Hint 4 of 6: step 2

Complete a set of orthogonal contrasts to an orthonormal basis of \(\{g:\sum g_j=0\}\). Aim for: \(\mathrm{SSTR}=\sum_l\mathrm{SS}_{C_l}\) and the overall \(F\) is the average of the contrast \(F\)s.

Hint 5 of 6: step 3

Maximise \(\mathrm{SS}_c\) over \(c\) by Cauchy–Schwarz. Aim for: \(\max_c F_c=(k-1)F_{\mathrm{overall}}\), Scheffe's threshold.

Hint 6 of 6: step 4

Compute the contrast and its orthogonal partner for the lunar data. Aim for: \(F_C=6.14\), \(F_{C'}=0.29\), average 3.21, and compare 6.14 with \(2F_{.95,2,22}\).

Proof

The law (2). \(\hat C=\sum c_j\bar Y_{\cdot j}\) is normal with mean \(\sum_jc_j\mu_j=C\) and variance \(\sigma^2\sum c_j^2/b\) (the column means are independent \(\N(\mu_j,\sigma^2/b)\), Filling the gap 13.7). Under \(H_0\), \(\hat C^2/(\sigma^2\sum c_j^2/b)=\mathrm{SS}_C/\sigma^2\sim\chi^2_1\). It is independent of \(\mathrm{SSE}\) (functions of \(Q_0y+Q_Ty\) and \(Q_Ey\)), and \(\mathrm{SSE}/\sigma^2\sim\chi^2_\nu\); the ratio of independent \(\chi^2_1/1\) and \(\chi^2_\nu/\nu\) is \(F_{1,\nu}\), and equals \(t_\nu^2\) with \(t=\hat C/\sqrt{\mathrm{MSE}\sum c_j^2/b}\).

Orthogonal contrasts. Let \(c\) and \(c'\) be contrasts with \(\sum_jc_jc'_j=0\). Then \(\operatorname{Cov}(\hat C,\hat C')=\sigma^2\sum c_jc_j'/b=0\), and jointly normal variables with zero covariance are independent. More: if \(c^{(1)},\dots,c^{(k-1)}\) are mutually orthogonal contrasts, the vectors \(u^{(l)}=c^{(l)}/\|c^{(l)}\|\) together with \(\mathbf 1/\sqrt k\) form an orthonormal basis of \(\R^k\), so for the vector \(g=(\bar y_{\cdot j}-\bar y_{\cdot\cdot})_j\) (which has coordinate 0 along \(\mathbf 1\)) \[ \mathrm{SSTR}=b\|g\|^2=b\sum_{l=1}^{k-1}\big(u^{(l)\T}g\big)^2=\sum_{l=1}^{k-1}\frac{(c^{(l)\T}\bar y_{\cdot\cdot})^2}{\|c^{(l)}\|^2/b}=\sum_{l=1}^{k-1}\mathrm{SS}_{C_l},\] using \(c^{(l)\T}g=c^{(l)\T}\bar y\) because \(\sum_jc^{(l)}_j=0\). So \(\mathrm{SSTR}\) is the sum of the single-degree-of-freedom sums of squares of any full orthogonal set of contrasts, and the overall statistic is an average of single-degree-of-freedom statistics: \(F_{\mathrm{overall}}=\frac1{k-1}\sum_lF_{C_l}\).

The largest contrast. By the Cauchy–Schwarz inequality \((c^\T g)^2\le\|c\|^2\|g\|^2\) with equality for \(c=g\), so \(\max_c\mathrm{SS}_c=\mathrm{SSTR}\) over all contrasts and \[ \max_cF_c=\mathrm{SSTR}/\mathrm{MSE}=(k-1)F_{\mathrm{overall}}\sim(k-1)F_{k-1,\nu} \] under \(H_0\). Hence, when \(H_0\) holds, the probability that any contrast, chosen after looking at the data, exceeds \((k-1)F_{1-\alpha,k-1,\nu}\) is exactly \(\alpha\) (Scheffe's method); a single contrast fixed in advance is compared with \(F_{1-\alpha,1,\nu}\) only.

Case Study 13.2.3. For the lunar data \(k=3\), \(b=12\), \(\nu=22\), \(\mathrm{MSE}=132.07/22=6.00\), and the column means are \(10.917,13.333,11.458\). The contrast \(c=(-\frac12,1,-\frac12)\) has \(\hat C=2.146\), \(\sum c_j^2=1.5\), \(\mathrm{SS}_C=2.146^2/(1.5/12)=36.84\) and \(F=6.14\) on 1 and 22 degrees of freedom (\(P=0.021\), critical value 4.30). A second orthogonal contrast, "before against after", \(c'=(1,0,-1)\), has \(\hat C'=-0.542\), \(\mathrm{SS}_{C'}=1.76\), \(F_{C'}=0.29\). Indeed \(36.84+1.76=38.60=\mathrm{SSTR}\) and \(F_{\mathrm{overall}}=(6.14+0.29)/2=3.21\). The overall test spreads the effect over two degrees of freedom, only one of which carries signal, and so loses power compared with the contrast aimed at it; that is why they can disagree. If the contrast is chosen after seeing the means, its fair threshold is Scheffe's \((k-1)F_{.95,2,22}=6.89>6.14\): it would no longer be significant. The book's reasoning (do both analyses, either can err) is right, and the contrast is legitimate only if it was planned in advance. ∎

Case Study 13.2.3: is there a full-moon effect on psychiatric admissions? pp. 624–626

A clinic recorded admission rates (patients per day) in each of twelve months, before, during and after the full moon (Table 13.2.9 of the book; the months are the blocks, \(b=12\), \(k=3\)). The column means are \(10.92,13.33,11.46\). With \(C=5100.34\): \(\mathrm{SSTOT}=621.75\), \(\mathrm{SSTR}=38.60\), \(\mathrm{SSB}=451.08\), \(\mathrm{SSE}=132.07\):

SourcedfSSMSFP
Lunar phase238.6019.303.210.060
Months11451.0841.016.830.0001
Error22132.076.00
Total35621.75

The omnibus test does not reject (\(F=3.21<F_{.95,2,22}=3.44\)). The planned contrast "during against the average of before and after" does (\(F=6.14>4.30\), \(P=0.021\)). The book rounds the means to two decimals before computing \(\hat C=2.14\), \(\mathrm{SS}_C=36.67\), \(F=6.11\) (even \(2.14^2/0.125\) is 36.64, so its \(\mathrm{SS}_C\) is not quite what its own rounded \(\hat C\) gives); the unrounded values are \(2.146\), \(36.84\), \(6.14\) (the conclusion is unchanged), and it cites "Table 13.2.8" for the means where Table 13.2.9 is meant. The two analyses ask different questions and each can err; Filling the gap 13.8 shows how they relate. The 95% Tukey intervals (Question 13.2.5, \(Q_{.05,3,22}=3.56\), radius \(3.56\sqrt{6.00/12}=2.52\)) for the three differences \(\mu_2-\mu_1=2.42\), \(\mu_2-\mu_3=1.88\), \(\mu_3-\mu_1=0.54\) all contain 0, in agreement with the omnibus test.

13.3 The Paired \(t\) Test

pp. 628–629 With only two treatments \(X\) and \(Y\) in \(b\) pairs, the block analysis reduces to something simpler. Model the \(i\)th pair as \[ X_i=\mu_X+P_i+\varepsilon_i,\qquad Y_i=\mu_Y+P_i+\varepsilon_i',\tag{3}\] where \(P_i\) is the contribution of the conditions of pair \(i\) (any size, positive or negative) and \(\varepsilon_i,\varepsilon_i'\) are independent normal errors with means 0 and variances \(\sigma_X^2,\sigma_Y^2\). Subtracting, \(D_i=X_i-Y_i=\mu_X-\mu_Y+\varepsilon_i-\varepsilon_i'\) (equation 13.3.1): the pair effect \(P_i\) has disappeared, so the \(D_i\) are independent \(\N(\mu_D,\sigma_D^2)\) with \(\mu_D=\mu_X-\mu_Y\) and \(\sigma_D^2=\sigma_X^2+\sigma_Y^2\). Testing \(\mu_X=\mu_Y\) is therefore testing \(\mu_D=0\) in a normal sample of size \(b\).

Theorem 13.3.1 (the paired \(t\) test) p. 629

Let \(d_1,\dots,d_b\) be the within-pair differences, a sample from \(\N(\mu_D,\sigma_D^2)\), with mean \(\bar d\) and standard deviation \(s_D\), and \(t=\bar d/(s_D/\sqrt b)\). To test \(H_0\colon\mu_D=0\) at level \(\alpha\): against \(H_1\colon\mu_D<0\) reject if \(t\le-t_{\alpha,b-1}\); against \(\mu_D>0\) reject if \(t\ge t_{\alpha,b-1}\); against \(\mu_D\ne0\) reject if \(|t|\ge t_{\alpha/2,b-1}\). A \(100(1-\alpha)\%\) interval for \(\mu_D\) is \(\bar d\pm t_{\alpha/2,b-1}s_D/\sqrt b\) (Question 13.3.6).

Filling the gap 13.9: why the paired \(t\) ratio has an exact \(t_{b-1}\) law, what the pair effect may be, and why \(\sigma_X=\sigma_Y\) is not needed pp. 628–629

The book says the statistic is "a special case of Theorem 7.3.5" and that the pair effect "disappears". Here is what that needs.

Hint 1 of 5: the key idea

Once the pair effect cancels, what does \(D_i\) look like, and which earlier theorem gives the law of the ratio \(\bar D/(S_D/\sqrt b)\)?

Hint 2 of 5: tools you will need
Hint 3 of 5: step 1

Subtract the two model equations. Aim for: \(D_i\) iid \(\N(\mu_D,\sigma_X^2+\sigma_Y^2)\), whatever the \(P_i\).

Hint 4 of 5: step 2

Apply the normal-sample theorem to the \(D_i\). Aim for: \(t_{b-1}\) exactly, for every \(\mu_D\) and \(\sigma_D\).

Hint 5 of 5: step 3

Say what is and is not needed: the law of \(P_i\), \(\sigma_X=\sigma_Y\), joint normality of the errors. Then invert the pivot. Aim for: \(\bar d\pm t_{\alpha/2,b-1}s_D/\sqrt b\) and its duality with the test.

Proof

The \(D_i\) are independent because different pairs are independent, and each is \(\N(\mu_D,\sigma_X^2+\sigma_Y^2)\) as a difference of independent normal variables with the \(P_i\) cancelling. By the normal-sample theorem (Theorem 7.3.2), \(\bar D\) and \(S_D^2\) are independent, \(\sqrt b(\bar D-\mu_D)/\sigma_D\sim\N(0,1)\) and \((b-1)S_D^2/\sigma_D^2\sim\chi^2_{b-1}\), so \((\bar D-\mu_D)/(S_D/\sqrt b)\sim t_{b-1}\) exactly (Theorem 7.3.5); the test and interval are those of Theorem 7.4.2 applied to the \(d_i\), with exact size \(\alpha\) and exact coverage for every \(\mu_D,\sigma_D\).

What the pair effects may be. Nothing in this argument used the distribution of \(P_i\): the \(P_i\) may be arbitrary fixed numbers, random with any distribution, or dependent on each other across pairs, provided that, given the pair effects, the errors in the two members are independent normal with a variance that does not change from pair to pair. The effect cancels exactly in \(D_i\), so, unlike a method that estimates the pair effects, the test has no nuisance parameters beyond \(\sigma_D\). (With a random \(P_i\) of variance \(\sigma_P^2\) the within-pair correlation is \(\rho=\sigma_P^2/(\sigma_P^2+\sigma^2)\) when \(\sigma_X=\sigma_Y=\sigma\); this is the \(\rho\) of Section 13.4.)

Unequal variances. Only the variance of \(D_i\), namely \(\sigma_X^2+\sigma_Y^2\), has to be the same from pair to pair, not \(\sigma_X=\sigma_Y\). That is a real difference from the randomized block \(F\) analysis for \(k=2\), which assumes one error variance \(\sigma^2\) for all cells; for \(k=2\) the two analyses agree numerically (Filling the gap 8.10), but the paired \(t\) is valid under the weaker assumption. More generally, if the two members of a pair have errors with any joint normal law, \(D_i\) is still normal with a constant variance \(\sigma_X^2+\sigma_Y^2-2\operatorname{Cov}\) and the test is still exact.

Confidence interval and duality. Inverting the pivot, \[ \P\big(-t_{\alpha/2,b-1}\le(\bar D-\mu_D)/(S_D/\sqrt b)\le t_{\alpha/2,b-1}\big)=1-\alpha \] gives \(\bar d\pm t_{\alpha/2,b-1}s_D/\sqrt b\) (Question 13.3.6); 0 lies in it exactly when \(|t|<t_{\alpha/2,b-1}\), so the interval and the two-sided test agree. ∎

Filling the gap 13.10: the paired \(t\) test is the likelihood ratio test when the pair effects are free pp. 628–629

The book introduces the paired \(t\) as "a special case of Theorem 7.3.5" and does not say in what sense it is the natural test of model (3). Take \(\sigma_X=\sigma_Y=\sigma\) and let the \(b\) pair effects \(P_i\) be unknown free parameters.

Hint 1 of 6: the key idea

Treat the pair means as free nuisance parameters and maximise the likelihood twice, with and without \(\mu_D=0\). What does the ratio of the two maximised variances reduce to?

Hint 2 of 6: tools you will need
  • The likelihood ratio method (gap 6.14 for a normal mean).
  • Profiling out \(m_i\): the best \(m_i\) is the average of \(x_i\) and \(y_i+\mu_D\).
  • \(\sum d_i^2=\sum(d_i-\bar d)^2+b\bar d^2\).
Hint 3 of 6: step 1

Re-parametrise by \(m_i=\mu_X+P_i\) and write the log-likelihood. Aim for: residuals \(\pm(d_i-\mu_D)/2\) after maximising over \(m_i\).

Hint 4 of 6: step 2

Maximise over \(\sigma^2\) for \(\mu_D=0\) and for \(\mu_D=\bar d\). Aim for: \(\hat\sigma_0^2=\sum d_i^2/(4b)\), \(\hat\sigma_1^2=\sum(d_i-\bar d)^2/(4b)\).

Hint 5 of 6: step 3

Form \(\lambda=(\hat\sigma_1^2/\hat\sigma_0^2)^b\) and express it through \(t\). Aim for: \(\lambda=(1+t^2/(b-1))^{-b}\), decreasing in \(|t|\).

Hint 6 of 6: step 4

Show \(S_i\) and \(D_i\) are independent and that \(S_i\) carries no information about \(\mu_D\). Aim for: the covariance \(\sigma_X^2-\sigma_Y^2=0\).

Proof

Put \(m_i=\mu_X+P_i\): then \(X_i\sim\N(m_i,\sigma^2)\) and \(Y_i\sim\N(m_i-\mu_D,\sigma^2)\), independent, with parameters \(m_1,\dots,m_b,\mu_D,\sigma^2\) (the individual \(\mu_X,\mu_Y,P_i\) are not identifiable, only these). The log-likelihood is \[ -b\ln(2\pi\sigma^2)-\frac1{2\sigma^2}\sum_i[(x_i-m_i)^2+(y_i-m_i+\mu_D)^2] \]. For fixed \(\mu_D\) the best \(m_i\) is \((x_i+y_i+\mu_D)/2\), which makes the two residuals \(\pm(d_i-\mu_D)/2\) with \(d_i=x_i-y_i\), so the bracketed sum is \(\sum_i(d_i-\mu_D)^2/2\) and the best \(\sigma^2\) is \(\hat\sigma^2(\mu_D)=\sum_i(d_i-\mu_D)^2/(4b)\) (there are \(2b\) observations). The maximised log-likelihood is a constant minus \(b\ln\hat\sigma^2(\mu_D)\). Under \(H_0\colon\mu_D=0\) it is \(\hat\sigma_0^2=\sum d_i^2/(4b)\); unrestricted (\(\hat\mu_D=\bar d\)) it is \(\hat\sigma_1^2=\sum(d_i-\bar d)^2/(4b)\). Therefore \[ \lambda=\Big(\frac{\hat\sigma_1^2}{\hat\sigma_0^2}\Big)^{b}=\Big(\frac{\sum(d_i-\bar d)^2}{\sum d_i^2}\Big)^{b}=\Big(1+\frac{t^2}{b-1}\Big)^{-b},\] since \(\sum d_i^2=\sum(d_i-\bar d)^2+b\bar d^2\) and \(t^2=b\bar d^2/s_D^2=b(b-1)\bar d^2/\sum(d_i-\bar d)^2\). The ratio \(\lambda\) is a decreasing function of \(|t|\), so the likelihood ratio test (reject for small \(\lambda\)) is the two-sided paired \(t\) test, and \(-2\ln\lambda=2b\ln(1+t^2/(b-1))\) (compare Filling the gap 7.11 for one sample; the pair means \(m_i\) play the role of nuisance parameters that are eliminated exactly).

Why the pair effects carry no information. The pair sums \(S_i=X_i+Y_i\) and differences \(D_i\) satisfy \(\operatorname{Cov}(S_i,D_i)=\sigma_X^2-\sigma_Y^2=0\), hence are independent (jointly normal), and \(S_i\sim\N(2m_i-\mu_D,2\sigma^2)\) has a mean that is free through \(m_i\): it says nothing about \(\mu_D\). All the information about \(\mu_D\) is in the \(D_i\). Notice that the maximum likelihood estimator \(\hat\sigma^2=\sum(d_i-\bar d)^2/(4b)\) converges to \(\sigma^2/2\) and not to \(\sigma^2\) as \(b\to\infty\) (many nuisance parameters, one pair per parameter); the unbiased version is \(\mathrm{MSE}=s_D^2/2\) with \(b-1\) degrees of freedom, as in the block analysis. The test is not affected. ∎

Case Study 13.3.1: does a brisk walk change hemoglobin? pp. 630–631

Ten athletes had their hemoglobin (g/dl) measured before and after a six-kilometre walk (Table 13.3.1 of the book: before 14.6, 17.3, 10.9, 12.8, 16.6, 12.2, 11.2, 15.4, 14.8, 16.2; after 13.8, 15.4, 11.3, 11.6, 16.4, 12.6, 11.8, 15.0, 14.4, 15.0). Each athlete is a pair. With \(d=\) before \(-\) after, \(\sum d_i=4.7\), \(\sum d_i^2=8.17\): \(\bar d=0.47\), \(s_D^2=(10\cdot8.17-4.7^2)/90=0.662\), and \[ t=\frac{0.47}{\sqrt{0.662}/\sqrt{10}}=1.827\quad(9\text{ df}),\qquad t_{.025,9}=2.2622,\] so \(H_0\colon\mu_D=0\) is not rejected at the 5% level (\(P=0.101\)). The 95% interval is \[0.47\pm2.2622\cdot0.2573=(-0.11,\ 1.05)\ \text{g/dl}.\] The exact randomization test of Filling the gap 13.12 gives \(P=0.119\).

Case Study 13.3.2: do bees sting where bees have already stung? pp. 631–632

Nine times, four muslin-wrapped cotton balls that had been stung and four fresh ones were dangled at a hive and the new stings counted (Table 13.3.2). The nine trials are the blocks (hive mood differs from day to day), the differences (stung minus fresh) are \(-6,0,12,18,-2,5,1,18,60\), \(\bar d=11.78\) (the book writes 11.8), \(s_D=20.0\), and a 95% interval for \(\mu_D\) is \[11.78\pm2.306\cdot20.03/3=(-3.6,\ 27.2),\] which contains 0: do not reject \(H_0\colon\mu_D=0\) (\(t=1.76\), 8 df, \(P=0.116\)). The single difference of 60 dominates the data (without it \(\bar d=5.75\) with \(s_D=9.2\)), a warning that normality of the \(D_i\) is doubtful here; the sign-flip test is a safer check (Filling the gap 13.12, \(P=0.086\)).

The equivalence with the block \(F\) test when \(k=2\). pp. 632–633 Analysed as a randomized block design with \(b=10\) blocks and \(k=2\), the hemoglobin data give Table 13.3.3 of the book:

SourcedfSSMSF
Activity11.10451.10453.34
Athletes (blocks)973.24058.137824.57
Error92.98050.33117
Total1977.3255

The observed \(F=3.34=1.827^2\) is the square of the observed \(t\), and the critical value \(F_{.95,1,9}=5.12=2.2622^2\) is the square of the critical \(t\) (the book prints \(2.6222\), a transposition of digits). The two tests therefore reject for the same data. The proof for any \(b\), and for the two-sample case, is Filling the gap 8.10 and is not repeated here. What that proof does not show is the meaning of the block \(F\) ratio, 24.57:

Filling the gap 13.11: for two treatments the block \(F\) ratio is the variance of the pair sums over the variance of the differences pp. 632–633

Hint 1 of 5: the key idea

With only two columns the row means are half the pair sums and the residuals are half the centred differences. What do the two mean squares then become?

Hint 2 of 5: tools you will need
  • The residuals for \(k=2\) (gap 13.5) and \(F=t^2\) (gap 8.10).
  • \(F_{a,b}\) as a ratio of independent chi-squares (Definition 7.3.2).
  • Sums and differences of equal-variance normals are independent.
Hint 3 of 5: step 1

Compute \(\mathrm{SSB}\) and \(\mathrm{SSE}\) from \(S_i=x_i+y_i\) and \(d_i=x_i-y_i\). Aim for: \(\mathrm{MSB}=s_S^2/2\), \(\mathrm{MSE}=s_D^2/2\), so \(F_{\text{blocks}}=s_S^2/s_D^2\).

Hint 4 of 5: step 2

Find \(\operatorname{Var}S_i\), \(\operatorname{Var}D_i\) when pairs have effect variance \(\sigma_P^2\). Aim for: \(4\sigma_P^2+2\sigma^2\) and \(2\sigma^2\), independent.

Hint 5 of 5: step 3

Rewrite the ratio with \(\rho=\sigma_P^2/(\sigma_P^2+\sigma^2)\) and apply to the hemoglobin data. Aim for: \(\frac{1+\rho}{1-\rho}F_{b-1,b-1}\), and \(\hat\rho\approx0.92\).

Proof

Let \(S_i=x_i+y_i\), \(d_i=x_i-y_i\), with sample variances \(s_S^2\) and \(s_D^2\). For \(k=2\) the row mean is \(\bar y_{i\cdot}=S_i/2\) and the grand mean \(\bar S/2\), so \(\mathrm{SSB}=\tfrac12\sum_i(S_i-\bar S)^2=(b-1)s_S^2/2\) and \(\mathrm{MSB}=s_S^2/2\). The residuals are \(\pm(d_i-\bar d)/2\) (Filling the gap 13.5), so \(\mathrm{SSE}=2\sum(d_i-\bar d)^2/4=(b-1)s_D^2/2\) with \(b-1\) degrees of freedom and \(\mathrm{MSE}=s_D^2/2\). Therefore \[ F_{\text{blocks}}=\frac{\mathrm{MSB}}{\mathrm{MSE}}=\frac{s_S^2}{s_D^2}.\] For the hemoglobin data \(s_S^2=16.276\), \(s_D^2=0.6623\), ratio 24.57, as in the table.

Its law. If \(\sigma_X=\sigma_Y=\sigma\) and the pair effects have variance \(\sigma_P^2\), then \(S_i\sim\N(\cdot,4\sigma_P^2+2\sigma^2)\), \(D_i\sim\N(\mu_D,2\sigma^2)\), independent (Filling the gap 13.10), so by Definition 7.3.2 \[ F_{\text{blocks}}\sim\Big(1+\frac{2\sigma_P^2}{\sigma^2}\Big)F_{b-1,b-1}=\frac{1+\rho}{1-\rho}\,F_{b-1,b-1},\qquad\rho=\frac{\sigma_P^2}{\sigma_P^2+\sigma^2}\] (the within-pair correlation). Since \(F_{b-1,b-1}\) has median 1, the median of \(F_{\text{blocks}}\) is exactly \((1+\rho)/(1-\rho)\), so the ratio estimates it: the observed 24.57 corresponds to \(\hat\rho\approx(F-1)/(F+1)=0.92\) (the sample correlation of the two columns is 0.95; the two sample variances, 5.24 and 3.23, are not equal). A value near 1 means \(\rho\approx0\): pairing has bought nothing, and the paired test loses degrees of freedom for no gain (Section 13.4). A large value, as here, means pairing was very effective: the variance of \(\bar d\) is \(2\sigma^2(1-\rho)/b\) against \(2\sigma^2/b\) for unpaired samples (Filling the gap 8.3). ∎

Filling the gap 13.12: the exact randomization test of a paired experiment pp. 628–629, 634

Theorem 13.3.1 needs normal differences. When the treatment is assigned by chance within each pair, there is a test that needs no distributional assumption at all, and the paired \(t\) is its approximation.

Hint 1 of 5: the key idea

If a fair coin decides which member of each pair gets which treatment, and the treatment does nothing, what is the distribution of the sign of each difference?

Hint 2 of 5: tools you will need
  • Random assignment and exactness of permutation tests (graduate gap 10.11).
  • Counting: \(2^b\) equally likely sign patterns.
  • \(t\) is increasing in \(|\sum d_i|\) when \(\sum d_i^2\) is fixed.
Hint 3 of 5: step 1

State the sharp null and show that the coin only flips the sign of \(d_i\). Aim for: signs uniform on \(\{\pm1\}^b\) given \(|d_i|\), whatever the pair effects.

Hint 4 of 5: step 2

Define the P-value as the fraction of sign patterns at least as extreme and show it is valid. Aim for: \(\P(p\le\alpha)\le\alpha\).

Hint 5 of 5: step 3

Show the statistic can be \(|t|\). Aim for: \(t^2\) increasing in \(|\sum d_i|\); then enumerate \(2^{10}\) patterns for the hemoglobin data, \(P=0.119\).

Proof

Setup. In pair \(i\) a fair coin decides which member gets treatment \(X\) and which \(Y\), independently across pairs. Under the sharp null that the treatment has no effect on any unit, each unit's measurement is a fixed number whatever it receives, so the coin merely decides the order in which the pair's two numbers are subtracted: \(d_i=\pm a_i\), where \(a_i\) is the absolute difference and the sign is \(+\) or \(-\) with probability \(\frac12\), independently over \(i\). Conditional on \(a_1,\dots,a_b\), the vector of signs is uniform on the \(2^b\) patterns, whatever the pair effects or the distribution of the measurements.

The test. Use \(T=|\sum_id_i|\). Its null distribution is that of \(|\sum_i\epsilon_ia_i|\) over the \(2^b\) equally likely sign patterns \(\epsilon\); the P-value is the fraction of patterns with \(|\sum\epsilon_ia_i|\ge T_{\text{obs}}\). As for any randomization test the P-value \(p\) satisfies \(\P(p\le\alpha)\le\alpha\) (the observed pattern is one of \(2^b\) equally likely ones, and at most \(\lfloor\alpha2^b\rfloor\) patterns can have P-value at most \(\alpha\)). Because \(\sum_id_i^2=\sum a_i^2\) is the same for every sign pattern, \(t^2=\dfrac{b(b-1)\bar d^2}{\sum d_i^2-b\bar d^2}\) is an increasing function of \(|\sum d_i|\), so using \(T\) is the same as using \(|t|\): the randomization version of the paired \(t\) test. For large \(b\) the null distribution of \(t\) over sign patterns is close to \(t_{b-1}\), which is why Theorem 13.3.1 works well when the \(d_i\) are not exactly normal.

Numbers. Hemoglobin (Case Study 13.3.1): of the \(2^{10}=1024\) patterns, 122 have \(|\sum\epsilon_ia_i|\ge4.7\), so \(P=0.119\) (the \(t\) test gives 0.101). Bees (Case Study 13.3.2): of \(2^9=512\) patterns, 44 have \(|\sum\epsilon_ia_i|\ge106\), \(P=0.086\) (the \(t\) test 0.116; the outlying difference 60 makes the normal approximation poor). For a randomized block design with \(k\) treatments the same idea permutes the treatment labels within each block, \((k!)^b\) equally likely arrangements, and the null distribution of the block \(F\) over them is the exact randomization distribution that the \(F_{k-1,(b-1)(k-1)}\) law approximates. This is the paired analogue of the graduate permutation test. ∎

13.4 Taking a Second Look at Statistics (Choosing between a Two-Sample \(t\) Test and a Paired \(t\) Test)

pp. 634–637 To compare two treatments \(X\) and \(Y\) one can use independent samples (Theorem 9.2.2 or 9.2.3) or paired samples (Theorem 13.3.1). Neither is always better. The book's two hypothetical studies of the same ten volunteers show why.

Example 13.4.1: two weight-loss diets pp. 634–636

Ten volunteers (gender, age, height, weight in Table 13.4.1) are to compare Diet X and Diet Y by three-month weight loss. Independent samples: a random split into two groups of five, such as Table 13.4.2, mixes slightly overweight middle-aged women with very overweight young men in each group, people whose weight losses differ greatly whatever the diet; this inflates \(s_X^2\) and \(s_Y^2\), hence \(s_p\), and the ratio \(t=(\bar x-\bar y)/(s_p\sqrt{1/5+1/5})\) may fail to detect a real difference. Paired samples: pairing volunteers who look alike in the traits that predict weight loss (Table 13.4.3: (HW, LT), (JC, WT), (SW, KS), (HM, TB), (AF, DR)) subtracts the pair effect, so \(s_D/\sqrt5\) is likely to be much smaller than \(s_p\sqrt{1/5+1/5}\). Pairing is clearly preferable here.

Example 13.4.2: two eye-surgery techniques pp. 636–637

The same ten volunteers compare two laser surgeries by a satisfaction score. Now none of the recorded traits predicts satisfaction, so there is no principled way to pair, and pairs would have to be formed at random. Then the within-pair differences still carry the subject-to-subject variation (the pair effect does not cancel, because the two members have unrelated "personal contributions"), so \(s_D\) is no smaller than \(s_p\) allows for, while the test has only \(b-1=4\) degrees of freedom instead of \(5+5-2=8\). The critical values of Table 13.4.4 of the book show the cost:

\(\alpha\)\(t_{\alpha/2,4}\)\(t_{\alpha/2,8}\)
0.102.13181.8595
0.052.77642.3060
0.014.60413.3554

A difference that is significant with 8 degrees of freedom may not be with 4.

The book's reasoning is qualitative. The two quantities that decide the choice are the correlation \(\rho\) between the two members of a pair and the loss of degrees of freedom. Filling the gap 8.3 compares the expected lengths of the two intervals; the next box compares the power exactly and says what random pairing does.

Filling the gap 13.13: power of the paired and the two-sample \(t\) tests, the break-even correlation and what random pairing costs pp. 634–637

Hint 1 of 6: the key idea

Both tests are \(t\) tests of the same difference \(\delta\) with different non-centralities and degrees of freedom. Which quantity does the correlation \(\rho\) change?

Hint 2 of 6: tools you will need
  • The non-central \(t\) law and the power of a \(t\) test (gap 7.17).
  • \(\operatorname{Var}(X-Y)=2\sigma^2(1-\rho)\) and the expected-length comparison (gap 8.3).
  • A numerical root finder.
Hint 3 of 6: step 1

Find the non-centrality of each test for the same \(2b\) subjects. Aim for: \(\frac\delta\sigma\sqrt{b/(2(1-\rho))}\) with \(b-1\) df, against \(\frac\delta\sigma\sqrt{b/2}\) with \(2b-2\) df.

Hint 4 of 6: step 2

Compare the signal-to-noise ratios and the degrees of freedom. Aim for: ratio \(1/\sqrt{1-\rho}\), and what the smaller df costs.

Hint 5 of 6: step 3

Solve for the break-even \(\rho^*\) and compare it with \(1-(t_{2b-2}/t_{b-1})^2\). Aim for: \(0.27\) and \(0.31\) for \(b=5\), \(\delta/\sigma=2\).

Hint 6 of 6: step 4

Take random pairs of exchangeable subjects. Aim for: \(\rho=0\), a valid test that loses power only through df (0.553 against 0.650 for \(b=6\), \(\delta/\sigma=1.5\)).

Proof

Non-centralities. Suppose \(\sigma_X=\sigma_Y=\sigma\), the two members of a pair have correlation \(\rho\) and the true mean difference is \(\delta\ne0\). Then \(\operatorname{Var}D_i=2\sigma^2(1-\rho)\), so \(\bar D\sim\N(\delta,2\sigma^2(1-\rho)/b)\) and the paired statistic \(t=\bar D/(S_D/\sqrt b)\) has the non-central \(t\) law with \(b-1\) degrees of freedom and non-centrality \[ \Delta_{\text{paired}}=\frac{\delta}{\sigma}\sqrt{\frac{b}{2(1-\rho)}}\] (the non-central \(t\) law is described in Filling the gap 7.17). With \(b\) subjects in each of two independent groups (the same \(2b\) subjects), the pooled \(t\) has \(2b-2\) degrees of freedom and non-centrality \(\Delta_{\text{two}}=(\delta/\sigma)\sqrt{b/2}\). The ratio is \(\Delta_{\text{paired}}/\Delta_{\text{two}}=1/\sqrt{1-\rho}\): positive correlation raises the signal-to-noise ratio, \(\rho=0\) leaves it unchanged and negative correlation lowers it. The cost of pairing is the smaller degrees of freedom, \(b-1\) against \(2b-2\) (larger critical value, heavier tails).

Break-even. The two powers are equal at a unique \(\rho^*\), found numerically. A cruder rule compares the critical values: the expected interval half-lengths are equal when \((t_{b-1}/t_{2b-2})^2=1/(1-\rho)\), that is \(\rho_{\text{len}}=1-(t_{2b-2}/t_{b-1})^2\) (Filling the gap 8.3). With the critical values of Table 13.4.4 (\(b=5\), \(\alpha=0.05\)), \(\rho_{\text{len}}=1-(2.3060/2.7764)^2=0.31\), the power break-even for \(\delta/\sigma=2\) is \(\rho^*=0.27\); for \(b=10\) the values are \(0.14\) and \(0.11\) (for \(\delta/\sigma=1.2\)); for \(b=6\) and \(\delta/\sigma=1.5\) they are \(0.25\) and \(0.21\). Pairing pays only when the members of a pair are at least moderately correlated, and the required correlation falls as \(b\) grows.

Random pairing (Option B of Example 13.4.2). If subjects are exchangeable and pairs are formed at random, the two members of a pair are independent, \(\rho=0\), and the paired test is still exactly valid (the \(D_i\) are iid normal) but loses only through degrees of freedom: for \(b=6\) and \(\delta/\sigma=1.5\), power \(0.553\) against \(0.650\) for the two-sample test. With genuine matching, \(\rho=0.5\) gives power \(0.833\) and \(\rho=0.8\) gives \(0.995\). Figure x13.3 shows the whole curve. ∎

Power against the within-pair correlation from minus 0.3 to 0.95 for two settings. Two increasing solid curves (5 pairs with effect 2 sigma, blue; 10 pairs with effect 1.2 sigma, green) run from about 0.56 at correlation minus 0.3 to about 1 at correlation 0.8 and nearly coincide. Two dashed horizontal lines give the two-sample power, 0.79 for 5 plus 5 subjects and 0.72 for 10 plus 10; dots mark the break-even correlations 0.27 and 0.11.
Figure x13.3. Power of the paired \(t\) test (solid) against the correlation inside a pair, and the power of the two-sample \(t\) test with the same subjects (dashed); the dots are the break-even correlations. Pairing wins when subjects in a pair resemble each other and loses a little when they do not. Own figure. Code: ch13_randomized_block_designs.py, fig_x13_3.
▶ DemoPooled or Welch, paired or notFirst-year demo: with a within-pair correlation of 0.85 and eight pairs the paired test has power about 96% and ignoring the pairing about 28% (preset 5); with no correlation pairing gains nothing (preset 6).

A rule for practice. Pair or block when a measured characteristic predicts the response, and pair on that characteristic (diet study); do not pair at random just to have a paired design (eye surgery). With three or more treatments blocking costs even less (Filling the gap 13.6). The decision must be made before the data are collected, because the randomization is within pairs or blocks and a paired data set cannot be re-analysed as two independent samples. After the experiment, the block \(F\) ratio (equal to \(s_S^2/s_D^2\) for pairs, Filling the gap 13.11) says how effective the blocking was and guides the next study.

Notes on the book

Slips and rounding in the printed text pp. 614–637

Recomputing every case study from the printed data gives the book's values apart from the items below; none changes a conclusion.

Quantitybookcorrect
p. 633: critical \(t\)2.62222.2622
p. 625: means in "Table"13.2.813.2.9
CS 13.2.3: \(\hat C\)2.142.146
CS 13.2.3: \(\mathrm{SS}_C\)36.6736.84
CS 13.2.3: contrast \(F\)6.116.14
CS 13.2.3: \(\mathrm{SSTR}\)38.5938.60
CS 13.2.3: \(\mathrm{SSE}\)132.08132.07
CS 13.2.3: \(F\)3.223.215
CS 13.2.1: \(F\)0.920.915
CS 13.3.2: \(\bar d\)11.811.78
Question 13.2.8: \(Q_{.05,4,27}\)4.343.87
Question 13.2.12: parameters\(bk\)\(b+k\)

Selected questions

Seven of the book's questions, restated in my own words, and one problem of my own for Section 13.4 (the book has no questions there), covering every section of the chapter, with complete solutions (hidden). Numbers were cross-checked with the book's answers to the odd-numbered questions, which they match except where noted in Notes on the book.

  1. Question 13.2.2 (evening-news audiences). The audience shares (percent) of the evening news of the three major networks in four cities are, for (ABC, CBS, NBC): city A (19.7, 16.1, 18.2), B (18.6, 15.8, 17.9), C (19.1, 14.6, 15.3), D (17.9, 17.1, 18.0). (a) Test at \(\alpha=0.10\) that the three networks have the same mean share. (b) (Question 13.2.7) Use 95% Tukey intervals to compare the three networks in pairs. (Data: Question 13.2.2 of Larsen and Marx 2018.)

    Hint 1 of 5: the key idea

    Cities are blocks and networks are treatments. Compute the three sums of squares from the totals and form the treatment \(F\) with the block error.

    Hint 2 of 5: tools you will need
    Hint 3 of 5: part (a), step 1

    Get \(C\), \(\mathrm{SSTR}\), \(\mathrm{SSB}\), \(\mathrm{SSTOT}\) and \(\mathrm{SSE}\). Aim for: \(\mathrm{SSTR}=17.11\), \(\mathrm{SSE}=5.89\) on 6 df.

    Hint 4 of 5: part (a), step 2

    Form \(F\) and compare with \(F_{.90,2,6}\). Aim for: \(F\approx8.7\) against 3.46.

    Hint 5 of 5: part (b)

    Compute \(D=Q/\sqrt b\) and the radius \(D\sqrt{\mathrm{MSE}}\), then the three intervals. Aim for: radius \(\approx2.15\), and which interval excludes 0.

    Solution

    (a) Cities are blocks (\(b=4\)), networks are treatments (\(k=3\)). Network totals: ABC 75.3, CBS 63.6, NBC 69.4; city totals: 54.0, 52.3, 49.0, 53.0; \(T_{\cdot\cdot}=208.3\), \(C=208.3^2/12=3615.741\). Then \[ \mathrm{SSTR}=(75.3^2+63.6^2+69.4^2)/4-C=17.112 \], \[ \mathrm{SSB}=(54.0^2+52.3^2+49.0^2+53.0^2)/3-C=4.689 \], \(\mathrm{SSTOT}=\sum y^2-C=27.689\), so \(\mathrm{SSE}=5.888\) on \((3)(2)=6\) degrees of freedom, \(\mathrm{MSE}=0.981\). \(F=(17.112/2)/0.981=8.72\) with 2 and 6 degrees of freedom; \(F_{.90,2,6}=3.46\), so \(H_0\) is rejected at 0.10 (\(P=0.017\)); the audience shares differ. (The block \(F=1.59\), \(P=0.29\): the cities hardly differ, so blocking by city did not matter here.)

    (b) The network means are \(18.825,\ 15.9,\ 17.35\). With \(Q_{.05,3,6}=4.339\), \(D=4.339/\sqrt4=2.170\) and the radius is \(2.170\sqrt{0.981}=2.15\). The intervals are ABC minus CBS \(2.93\pm2.15=(0.78,5.07)\), ABC minus NBC \(1.48\pm2.15=(-0.67,3.62)\), NBC minus CBS \(1.45\pm2.15=(-0.70,3.60)\). Only ABC against CBS excludes 0: ABC draws a larger audience than CBS; NBC cannot be separated from either. (The overall test rejects while two of three pairwise intervals contain 0: the evidence is concentrated in the largest gap.)

  2. Question 13.2.8 (injection systems). Ten pharmacists and nurses (the blocks) each assembled and simulated an injection with four unit-dose systems (Standard, Vari-Ject, Unimatic, Tubex); the table of average times in seconds is in the book (treatment totals 351.8, 168.8, 237.6, 256.0; grand total 1014.2). You are told \(\mathrm{SSTOT}=2056.10\), \(\mathrm{SSTR}=1709.60\) and \(\mathrm{SSB}=193.53\); take the studentized-range point from Table A.5 of the book (the value \(4.34\) printed with the question is a slip, see Notes on the book). (a) Test the equality of the four mean times at 0.05. (b) Use Tukey's method for all six pairwise differences. (Data: Question 13.2.8 of Larsen and Marx 2018.)

    Hint 1 of 5: the key idea

    You are given the sums of squares. Get \(\mathrm{SSE}\) by subtraction and use the block degrees of freedom \((b-1)(k-1)\), not \(k(b-1)\).

    Hint 2 of 5: tools you will need
    • The decomposition (gap 13.2) and Table 13.2.2.
    • The Tukey radius \(D\sqrt{\mathrm{MSE}}\) (gap 13.7).
    • Treatment means from the totals.
    Hint 3 of 5: part (a)

    Compute \(\mathrm{SSE}\), the mean squares and \(F\). Aim for: \(\mathrm{MSE}=5.67\), \(F\approx100.6\) on 3 and 27 df.

    Hint 4 of 5: part (b), step 1

    Compute the four means and the radius. Aim for: radius \(\approx2.91\) (check the value of \(Q_{.05,4,27}\): the book's 4.34 is a slip, use Table A.5).

    Hint 5 of 5: part (b), step 2

    List the six differences against the radius. Aim for: exactly one pair not separated (Unimatic and Tubex).

    Solution

    (a) \(b=10\), \(k=4\), \(\nu=9\cdot3=27\). \[ \mathrm{SSE}=2056.10-1709.60-193.53=152.97 \], \(\mathrm{MSE}=152.97/27=5.665\), \(\mathrm{MSTR}=1709.60/3=569.87\), \(F=569.87/5.665=100.6\) on 3 and 27 degrees of freedom, far above \(F_{.95,3,27}=2.96\): the mean times differ (\(P\approx10^{-14}\)).

    (b) The means are Standard 35.18, Vari-Ject 16.88, Unimatic 23.76, Tubex 25.60. \(Q_{.05,4,27}=3.87\) (Table A.5 gives 3.90 at 24 degrees of freedom and 3.84 at 30; the book's 4.34 is the value for \(k=3\) and 6 degrees of freedom), \(D=3.87/\sqrt{10}=1.224\), radius \(1.224\sqrt{5.665}=2.91\). Differences: Standard minus Vari-Ject 18.30, Standard minus Unimatic 11.42, Standard minus Tubex 9.58, Unimatic minus Vari-Ject 6.88, Tubex minus Vari-Ject 8.72, Tubex minus Unimatic 1.84. All exceed 2.91 except Tubex against Unimatic (1.84, interval \((-1.07,4.75)\) for Tubex minus Unimatic). So Vari-Ject is fastest, Standard slowest, and Unimatic and Tubex are indistinguishable. (Subject 10 is slow with three of the systems; the block \(F=3.80\), \(P=0.003\): blocking by person was worthwhile.)

  3. Question 13.2.9 (heart rates of tree shrews). Six tree shrews had heart rates (beats per 5 seconds) recorded in three sleep stages, LSWS, DSWS and REM; rows (LSWS, DSWS, REM): (14.1, 11.7, 15.7), (26.0, 21.1, 21.5), (20.9, 19.7, 18.3), (19.0, 18.2, 17.0), (26.1, 23.2, 22.5), (20.5, 20.7, 18.9). (a) Test equality of the three mean rates at 0.05. (b) It was decided beforehand to compare REM with the average of the other two: test that contrast, and find a second contrast orthogonal to it, checking that the two sums of squares add to \(\mathrm{SSTR}\). (Data: Question 13.2.9 of Larsen and Marx 2018.)

    Hint 1 of 5: the key idea

    The overall test uses two degrees of freedom; a planned contrast uses one. Build the contrast \(F\) from \(\hat C\), \(\sum c_j^2\) and \(\mathrm{MSE}\), then choose a second contrast with \(\sum c_jc_j'=0\).

    Hint 2 of 5: tools you will need
    • The contrast \(F\) test (2) and orthogonal contrasts (gap 13.8).
    • The block ANOVA (gap 13.2).
    • \(F_{.95,1,10}\) and \(F_{.95,2,10}\).
    Hint 3 of 5: part (a)

    Compute the table. Aim for: \(\mathrm{SSTR}=16.99\), \(\mathrm{MSE}=2.057\), \(F\approx4.13\) against 4.10.

    Hint 4 of 5: part (b), step 1

    Take \(c=(-\frac12,-\frac12,1)\) and compute \(\hat C\) and \(\mathrm{SS}_C=\hat C^2/(\sum c_j^2/b)\). Aim for: \(\mathrm{SS}_C=4.99\), \(F=2.42\).

    Hint 5 of 5: part (b), step 2

    Find \(c'\) orthogonal to \(c\) and verify the sum. Aim for: \(c'=(1,-1,0)\), \(\mathrm{SS}_{C'}=12.00\), total \(16.99\).

    Solution

    (a) \(b=6\), \(k=3\), \(\nu=10\). Column means: LSWS 21.10, DSWS 19.10, REM 18.98; \(\mathrm{SSTR}=6\sum(\bar y_{\cdot j}-\bar y_{\cdot\cdot})^2=16.99\), \(\mathrm{SSB}=195.44\), \(\mathrm{SSTOT}=232.996\), \(\mathrm{SSE}=20.57\), \(\mathrm{MSE}=2.057\). \(F=(16.99/2)/2.057=4.13\) on 2 and 10 degrees of freedom; \(F_{.95,2,10}=4.10\), so \(H_0\) is (just) rejected (\(P=0.049\)).

    (b) \(c=(-\tfrac12,-\tfrac12,1)\) in the order (LSWS, DSWS, REM): \(\hat C=18.983-20.10=-1.117\), \(\sum c_j^2=1.5\), \(\mathrm{SS}_C=1.117^2/(1.5/6)=4.99\), \(F=4.99/2.057=2.42\) on 1 and 10 degrees of freedom, below \(F_{.95,1,10}=4.96\) (\(P=0.15\)): REM is not significantly different from the other two stages. A second contrast orthogonal to it, \(c'=(1,-1,0)\) (LSWS against DSWS), since \(\sum c_jc_j'=-\frac12+\frac12=0\): \(\hat C'=2.00\), \(\mathrm{SS}_{C'}=4/(2/6)=12.00\), \(F=5.83\), \(P=0.036\). The sums of squares add: \(4.99+12.00=16.99=\mathrm{SSTR}\) (Filling the gap 13.8). So it is the light against deep slow-wave contrast, not REM, that carries the overall rejection.

  4. Question 13.2.10 (expected sums of squares). For a randomized block experiment comparing \(k\) treatments in \(b\) blocks under model (1) with \(\sum_i\beta_i=0\), find (a) \(\E\,\mathrm{SSB}\) and (b) \(\E\,\mathrm{SSE}\).

    Hint 1 of 5: the key idea

    Write each deviation of a mean from the grand mean as a constant (the effect) plus a mean-zero error part, and use \(\E X^2=(\E X)^2+\operatorname{Var}X\).

    Hint 2 of 5: tools you will need
    • \(\E X^2=(\E X)^2+\operatorname{Var}X\).
    • Variance of a difference of correlated means: the overlap of row \(i\) with all the data.
    • The decomposition (gap 13.2) to get \(\mathrm{SSE}\) by subtraction.
    Hint 3 of 5: part (a), step 1

    Show \(\bar y_{i\cdot}-\bar y_{\cdot\cdot}=\beta_i+\bar\varepsilon_{i\cdot}-\bar\varepsilon_{\cdot\cdot}\). Aim for: its variance \(\sigma^2(b-1)/(bk)\).

    Hint 4 of 5: part (a), step 2

    Sum over \(i\) and multiply by \(k\). Aim for: \(\E\,\mathrm{SSB}=k\sum\beta_i^2+(b-1)\sigma^2\).

    Hint 5 of 5: part (b)

    Do the same for \(\mathrm{SSTR}\) and \(\mathrm{SSTOT}\) and subtract. Aim for: \(\E\,\mathrm{SSE}=(b-1)(k-1)\sigma^2\).

    Solution

    (a) With \(\sum_j\tau_j=\sum_i\beta_i=0\), \(\bar y_{i\cdot}-\bar y_{\cdot\cdot}=\beta_i+\bar\varepsilon_{i\cdot}-\bar\varepsilon_{\cdot\cdot}\), a constant plus a mean-zero part, so \(\E(\bar y_{i\cdot}-\bar y_{\cdot\cdot})^2=\beta_i^2+\operatorname{Var}(\bar\varepsilon_{i\cdot}-\bar\varepsilon_{\cdot\cdot})\). Now \(\operatorname{Var}\bar\varepsilon_{i\cdot}=\sigma^2/k\), \(\operatorname{Var}\bar\varepsilon_{\cdot\cdot}=\sigma^2/(bk)\) and \(\operatorname{Cov}(\bar\varepsilon_{i\cdot},\bar\varepsilon_{\cdot\cdot})=\sigma^2/(bk)\) (only the \(k\) errors of row \(i\) overlap), so the variance is \(\sigma^2/k-\sigma^2/(bk)=\sigma^2(b-1)/(bk)\). Summing over \(i\) and multiplying by \(k\): \[ \E\,\mathrm{SSB}=k\sum_i\beta_i^2+\sigma^2(b-1).\] (b) The same argument for columns gives \(\E\,\mathrm{SSTR}=b\sum_j\tau_j^2+(k-1)\sigma^2\), and for the total \[ \E\,\mathrm{SSTOT}=\sum_{i,j}(m_{ij}-\bar m)^2+(bk-1)\sigma^2=k\sum\beta_i^2+b\sum\tau_j^2+(bk-1)\sigma^2 \] (the expected value of a sum of squared deviations from the sample mean is the squared deviations of the means plus \((n-1)\sigma^2\)). Subtracting, \[ \E\,\mathrm{SSE}=\big[(bk-1)-(k-1)-(b-1)\big]\sigma^2=(b-1)(k-1)\sigma^2 \], so \(\mathrm{MSE}\) is unbiased for \(\sigma^2\) whatever the block and treatment effects, and \(\E\,\mathrm{MSB}=\sigma^2+\frac{k}{b-1}\sum\beta_i^2\) exceeds \(\sigma^2\) exactly when the blocks differ. (The projection argument of Filling the gap 13.4 gives all three at once.)

  5. Question 13.3.1 (Global Rock Fund against its benchmark). The annual returns (percent) of the Global Rock Fund \(x\) and the Lipper average \(y\) for the 19 years 1989 to 2007 give differences \(d_i=x_i-y_i\) with \(\sum d_i=28.17\) and \(\sum d_i^2=370.8197\). Test \(H_0\colon\mu_D=0\) against \(H_1\colon\mu_D>0\) at \(\alpha=0.05\). (Data: Question 13.3.1 of Larsen and Marx 2018.)

    Hint 1 of 4: the key idea

    Years are natural pairs, so work with the differences. Get \(\bar d\) and \(s_D\) from the two given sums and run a one-sided \(t\) test.

    Hint 2 of 4: tools you will need
    • The paired \(t\) test (Theorem 13.3.1, gap 13.9).
    • \(s_D^2=(b\sum d_i^2-(\sum d_i)^2)/(b(b-1))\).
    • \(t_{.05,18}\).
    Hint 3 of 4: step 1

    Compute \(\bar d\) and \(s_D\). Aim for: \(\bar d=1.483\), \(s_D=4.276\).

    Hint 4 of 4: step 2

    Form \(t\) and compare with the one-sided critical value. Aim for: \(t\approx1.51\) against 1.734: what do you conclude, and what would an interval show?

    Solution

    Each calendar year is a pair (the market's behaviour that year affects both funds), so a paired test is right. \(b=19\), \(\bar d=28.17/19=1.4826\), \[s_D^2=\frac{19(370.8197)-28.17^2}{19\cdot18}=\frac{7045.574-793.549}{342}=18.28,\] \(s_D=4.2756\), standard error \(4.2756/\sqrt{19}=0.981\). \(t=1.4826/0.981=1.511\) with 18 degrees of freedom; the one-sided critical value is \(t_{.05,18}=1.7341\). Since \(1.511<1.7341\) we fail to reject (\(P=0.074\)): the data do not establish, at the 5% level, that the fund beat the benchmark on average. The two-sided 95% interval for \(\mu_D\) is \(1.48\pm2.101\cdot0.981=(-0.58,3.54)\), which contains 0 and positive values up to 3.5 points a year. Treating the years as independent samples would ignore the strong year-to-year common movement of the two funds, and would give a much larger error.

  6. Question 13.3.6 (a confidence interval for \(\mu_D\)). Let \(D_1,\dots,D_b\) be the within-pair differences, assumed \(\N(\mu_D,\sigma_D^2)\). Derive a \(100(1-\alpha)\%\) confidence interval for \(\mu_D\), and apply it to Case Study 13.3.1 (\(b=10\), \(\bar d=0.47\), \(s_D^2=0.662\)) to get a 95% interval for the true mean change in hemoglobin (before minus after).

    Hint 1 of 4: the key idea

    Start from a pivot with a known law and solve its two inequalities for \(\mu_D\).

    Hint 2 of 4: tools you will need
    • \((\bar D-\mu_D)/(S_D/\sqrt b)\sim t_{b-1}\) (Theorem 7.3.5, gap 13.9).
    • The \(t\) quantile \(t_{.025,9}=2.2622\).
    Hint 3 of 4: step 1

    Write the probability statement for the pivot and rearrange. Aim for: \(\bar d\pm t_{\alpha/2,b-1}s_D/\sqrt b\).

    Hint 4 of 4: step 2

    Insert the hemoglobin numbers. Aim for: standard error \(0.257\), interval \((-0.11,1.05)\), and its message about \(\mu_D=0\).

    Solution

    By Theorem 7.3.5 of the book, \(T=(\bar D-\mu_D)/(S_D/\sqrt b)\sim t_{b-1}\), so \(\P(-t_{\alpha/2,b-1}\le T\le t_{\alpha/2,b-1})=1-\alpha\). Solving the two inequalities for \(\mu_D\) gives \[\bar D-t_{\alpha/2,b-1}\frac{S_D}{\sqrt b}\le\mu_D\le\bar D+t_{\alpha/2,b-1}\frac{S_D}{\sqrt b},\] the interval \(\bar d\pm t_{\alpha/2,b-1}s_D/\sqrt b\) (the endpoints are random before the data are seen and the probability that they bracket \(\mu_D\) is exactly \(1-\alpha\)).

    For the hemoglobin data \(t_{.025,9}=2.2622\), \(s_D=\sqrt{0.662}=0.8137\), \(s_D/\sqrt{10}=0.2573\), so the interval is \[0.47\pm2.2622(0.2573)=0.47\pm0.582=(-0.11,\ 1.05)\ \text{g/dl}.\] It contains 0, so the two-sided test of \(\mu_D=0\) at 0.05 does not reject (consistent with \(t=1.827<2.2622\)); the walk may have lowered the mean hemoglobin by up to about 1 g/dl or raised it by 0.1.

  7. Question 13.3.9 (twins in the country and in the city). Seven pairs of identical twins, one living in a rural area and one in a city, inhaled radioactive particles; the percentage retained in the lungs after one hour (a high value means slow clearance) was, for (rural, urban): (10.1, 28.1), (51.8, 36.2), (33.5, 40.7), (32.8, 38.8), (69.0, 71.0), (38.9, 47.0), (54.6, 57.0). Do the data support the claim that rural living is better for lung clearance? Use \(\alpha=0.05\). (Data: Question 13.3.9 of Larsen and Marx 2018.)

    Hint 1 of 4: the key idea

    Twin pairs are blocks. Decide the sign of the alternative from what "better clearance" means for the measured retention, then run a paired \(t\) test.

    Hint 2 of 4: tools you will need
    • The paired \(t\) test (Theorem 13.3.1).
    • One-sided critical value \(t_{.05,6}\).
    • Why the pairing is natural (gap 13.13).
    Hint 3 of 4: step 1

    Form \(d_i=\) rural minus urban and state \(H_1\) in terms of \(\mu_D\). Aim for: \(H_1\colon\mu_D<0\).

    Hint 4 of 4: step 2

    Compute \(\bar d\), \(s_D\), \(t\). Aim for: \(t\approx-1.05\) on 6 df against \(-1.943\); explain the one positive difference.

    Solution

    Twin pairs are natural blocks (same genes, same age), so use the paired \(t\) test. Let \(d_i=\) rural minus urban: \(-18.0\), \(15.6\), \(-7.2\), \(-6.0\), \(-2.0\), \(-8.1\), \(-2.4\); \(\bar d=-4.014\), \(s_D=10.147\). Better clearance means less retention, so \(H_0\colon\mu_D=0\) against \(H_1\colon\mu_D<0\). \(t=-4.014/(10.147/\sqrt7)=-1.047\) with 6 degrees of freedom; reject if \(t\le-t_{.05,6}=-1.943\). It does not: fail to reject (\(P=0.168\)). Six of the seven differences are negative, but the one positive difference (pair 2, \(+15.6\)) and the large negative one in pair 1 give a large \(s_D\). The data are consistent with a rural advantage but do not establish it; a two-sided 95% interval for \(\mu_D\) is \((-13.4,5.4)\). With seven pairs the test has little power unless the effect is large: for a true mean difference equal to one standard deviation of the differences the one-sided power is about 0.75, and it is much lower for smaller effects.

  8. Problem 13.4.1 (pair or not?). A trial can enrol 12 volunteers and the true difference between the two treatments is expected to be \(\delta=1.5\sigma\), where \(\sigma\) is the standard deviation of one measurement (same for both treatments). Take level 0.05, two-sided. Compute the power (a) of a two-sample \(t\) test with 6 volunteers per group assigned at random; (b) of a paired \(t\) test on 6 pairs matched on a variable that makes the two members of a pair correlated with \(\rho=0.5\), and with \(\rho=0.8\); (c) of a paired \(t\) test on 6 pairs formed at random. (d) For which \(\rho\) are the paired and two-sample tests equally powerful? (e) What value would the block \(F\) ratio of the paired data be expected to take in (b)?

    Hint 1 of 6: the key idea

    Both tests are non-central \(t\) tests. What changes the non-centrality when you pair on a good predictor, and what does pairing always cost?

    Hint 2 of 6: tools you will need
    • Non-centralities and break-even (gap 13.13).
    • The block \(F\) for two treatments (gap 13.11).
    • The non-central \(t\) power (gap 7.17).
    Hint 3 of 6: part (a)

    Compute \(\Delta=1.5\sqrt{6/2}\) and the power on 10 df. Aim for: \(0.65\).

    Hint 4 of 6: part (b)

    Use \(\Delta=1.5\sqrt{6/(2(1-\rho))}\) on 5 df for \(\rho=0.5\) and \(0.8\). Aim for: \(0.83\) and \(0.995\).

    Hint 5 of 6: parts (c), (d)

    Set \(\rho=0\) for random pairs, then find the \(\rho\) at which the paired power equals 0.65. Aim for: \(0.553\) and \(\rho^*\approx0.21\).

    Hint 6 of 6: part (e)

    Use \(F_{\text{blocks}}\sim\frac{1+\rho}{1-\rho}F_{b-1,b-1}\). Aim for: about 3 and 9.

    Solution

    The two-sided power of a \(t\) test with \(\nu\) degrees of freedom and non-centrality \(\Delta\) is \(\P(|T_\nu(\Delta)|\ge t_{.025,\nu})\) (Filling the gap 7.17).

    (a) \(\nu=10\), \(\Delta=1.5\sqrt{6/2}=2.598\), critical value 2.228: power \(0.650\).

    (b) Paired: \(\nu=5\), critical value \(t_{.025,5}=2.571\), \(\Delta=1.5\sqrt{6/(2(1-\rho))}\): for \(\rho=0.5\), \(\Delta=1.5\sqrt6=3.674\) and power \(0.833\); for \(\rho=0.8\), \(\Delta=1.5\sqrt{15}=5.809\) and power \(0.995\). Matching on a good predictor raises the power from 0.65 to 0.83 or better with the same 12 volunteers.

    (c) Random pairs have \(\rho=0\) (the two members are unrelated), so \(\Delta=2.598\) as in (a) but with only 5 degrees of freedom: power \(0.553\). The pairing is wasted and costs 10 points of power, the Table 13.4.4 effect.

    (d) Solving power\(_{\text{paired}}(\rho)=0.650\) gives \(\rho^*=0.21\) (the cruder critical-value rule gives \(1-(2.228/2.571)^2=0.25\)). Pair only if the pairing variable correlates the two members by more than about 0.2 to 0.25.

    (e) For \(k=2\) the block \(F\) ratio has median \((1+\rho)/(1-\rho)\) (Filling the gap 13.11): about 3 for \(\rho=0.5\) and 9 for \(\rho=0.8\), with 5 and 5 degrees of freedom (single studies scatter widely around these); a ratio near 1 would warn that the pairing was no better than random.

Demonstrations for this chapter

Each demonstration runs in the browser and links back to these notes. The ▶ Demo boxes above open them already set to the case under discussion.

DemonstrationWhat you can seeSections and results
Blocking in a one-way versus a block analysisSeeded simulated experiments with a chosen number of treatments and blocks, error spread, block spread and treatment effect: for each study both the one-way \(F\) (blocks ignored) and the randomized block \(F\) are computed; the histograms of the two \(F\) ratios with their \(F\) densities on top, the rejection rate of each design against the exact power, and the average block mean-square ratio. Presets: 1 no block variation, no effect (both tests have size 5%); 2 block spread large, treatment effect present (blocking wins); 3 no block variation, effect present (the one-way test is slightly stronger); 4 small blocks effect, near break-even; 5 two treatments (paired against two-sample).Section 13.2 and 13.4; 13.4, 13.6; Case Study 13.2.2

Related first-year demonstration: Pooled or Welch, paired or not (Sections 13.3 and 13.4; Filling the gap 13.13), and the graduate The permutation test is exact (Filling the gap 13.12).

References

  1. Fisher, R. A. (1935). The Design of Experiments. Oliver and Boyd, Edinburgh.
  2. Larsen, R. J. and Marx, M. L. (2018). An Introduction to Mathematical Statistics and Its Applications, 6th edition. Pearson, Boston. Chapter 13, pp. 613–637.
  3. Scheffe, H. (1953). A method for judging all contrasts in the analysis of variance. Biometrika, 40(1/2), 87–104.
  4. Student (Gosset, W. S.) (1908). The probable error of a mean. Biometrika, 6(1), 1–25.
  5. Tukey, J. W. (1953). The problem of multiple comparisons. Unpublished manuscript, Princeton University (reprinted in The Collected Works of John W. Tukey, vol. 8, 1994).