











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The goal is to control the effects of a variable not of interest by bringing experimental units that are similar into a group called a “block”. The treatments ...
Typology: Exams
1 / 19
This page cannot be seen from the preview
Don't miss anything!












However, variability from another factor that is not of interest is expected.
similar into a group called a “block”. The treatments are then randomly applied to the experimental
units within each block. The experimental units are assumed to be homogeneous within each block.
smaller MSE makes it easier to detect significant results for the factor of interest.
block, and if treatments are randomized to the experimental units within each block, then we have a
randomized complete block design (RCBD). Because randomization only occurs within blocks,
this is an example of restricted randomization.
th treatment effect, βj is the j
th block effect, and
ij is the random error of the observation. The statistical model for a RCBD is
yij = μ + τi + βj + ij and ij ∼ IIDN (0, σ
2 ). (6)
imposed. To be able to calculate estimates μ̂ , ̂τi, and β̂j , we need to impose two constraints.
∑^ a
i=
τi = 0 and
∑^ b
j=
βj = 0.
μ̂ = ̂τi = and β̂j =
where ¯yi· is the mean for treatment i, and ¯y·j is the mean for block j.
yij = μ̂ + ̂τi + β̂j + eij
= y¯·· + (¯yi· − ¯y··) + (¯y·j − ¯y··) + eij
where eij = ̂ij is the residual of an observation yij from a RCBD. The value of eij is
eij = yij − (¯yi· − y¯··) − (¯y·j − y¯··) − y¯·· =
∑^ a
i=
∑^ b
j=
(yij − y¯··)
∑^ a
i=
∑^ b
j=
(¯yi· − y¯··)
2
∑^ b
j=
∑^ a
i=
(¯y·j − y¯··)
2
∑^ a
i=
∑^ b
j=
(yij − y¯i· − ¯y·j + ¯y··)
2
= b
∑^ a
i=
(¯yi· − y¯··)
2
∑^ b
j=
(¯y·b − ¯y··)
2
∑^ a
i=
∑^ b
j=
(yij − y¯i· − y¯·j + ¯y··)
2
= b
∑^ a
i=
∑^ b
j=
∑^ a
i=
∑^ b
j=
OR SST otal = SST rt + SSBlock + SSE
SST otal =
∑^ a
i=
∑^ b
j=
y
2 ij −^
y
2 ··
ab
SST rt =
∑^ a
i=
y
2 i·
b
y
2 ··
ab
SSBlock =
∑^ b
j=
y
2 ·j
a
y
2 ··
ab
SSE = SST otal − SST rt − SSBlock where
y
2 ··
ab
is the correction factor.
An agricultural experiment considered the effects of K 2 O (potash) on the breaking strength of cotton
fibers. Five K 2 O levels were used (36, 54, 72, 108, 144 lbs/acre). A sample of cotton was taken from each
plot, and a strength measurement was taken. The experiment was arranged in 3 blocks of 5 plots each.
K 2 O lbs/acre (treatment)
Block 36 54 72 108 144 Totals
1 7.62 8.14 7.76 7.17 7.46 y· 1 =38.
2 8.00 8.15 7.73 7.57 7.68 y· 2 =39.
3 7.93 7.87 7.74 7.80 7.21 y· 3 =38.
y 1 · y 2 · y 3 · y 4 · y 5 ·
Totals 23.55 24.16 23.23 22.54 22.35 y··=115.
Treatment Means y¯ 1 · = 7. 850 ¯y 2 · = 8. 053 y¯ 3 · = 7. 743 y¯ 4 · = 7. 513 y¯ 5 · = 7. 450
Block Means y¯· 1 = 7. 630 ¯y· 2 = 7. 826 y¯· 3 = 7. 710
Grand Mean y¯ = 7. 723
Uncorrected Sum of Squares =
∑a
i=
∑b
j=1 y
2 ij =
Correction factor = y
2 ··/ab^ = 115.^83
2 /15 =
a ∑
i=
y
2 i·
b
2
2
2
2
2
∑^ b
j=
y
2 ·j
a
2
2
2
SST otal = 895. 6183 − 894 .4393 =
SST rt = 895. 1717 − 894 .4393 =
SSBlock = 894. 5364 − 894 .4393 =
Analysis of Variance (ANOVA) Table
Source of Sum of Mean F
Variation Squares d.f. Square Ratio p-value
K 2 O lbs/acre .18311.
Blocks .04856 —–
Error .043685 ——
Total 14 —— ——
Adj R-Square 0.
R-Square 0.
MSE 0.
Error DF 8
Parameters 7
Observations 15
Proportion Less
0.0 0.4 0.
Residual
0.0 0.4 0.
Fit–Mean
-0.
-0.
-0.48 -0.24 0 0.24 0.
Residual
0
10
20
30
Percent
0 5 10 15
Observation
Cook's D
7.2 7.4 7.6 7.8 8.0 8.
Predicted Value
strength
-2 -1 0 1 2
Quantile
-0.
Residual
0.5 0.6 0.7 0.8 0.
Leverage
0
1
2
RStudent
7.4 7.6 7.8 8.0 8.
Predicted Value
0
1
2
RStudent
7.4 7.6 7.8 8.0 8.
Predicted Value
-0.
-0.
Residual
ANOVA RESULTS FOR STRENGTH BY TREATMENT
The GLM Procedure
36 54 72 108 144
k2O
strength
block^123
Interaction Plot for strength
ANOVA RESULTS FOR STRENGTH BY TREATMENT
The GLM Procedure
ANOVA RESULTS FOR STRENGTH BY TREATMENT
The GLM Procedure
7.2^15
strength
1 2 3
block
Distribution of strength
strength
Level of block N Mean Std Dev
1 5 7.63000000 0.
2 5 7.82600000 0.
3 5 7.71000000 0.
ANOVA RESULTS FOR STRENGTH BY TREATMENT
The GLM Procedure
Dependent Variable: strength
ANOVA RESULTS FOR STRENGTH BY TREATMENT
The GLM Procedure
Dependent Variable: strength
Parameter Estimate
Standard Error t Value Pr > |t|
K2O=36 0.12800000 0.10793208 1.19 0.
K2O=54 0.33133333 0.10793208 3.07 0.
K2O=72 0.02133333 0.10793208 0.20 0.
K2O=108 -0.20866667 0.10793208 -1.93 0.
K2O=144 -0.27200000 0.10793208 -2.52 0.
ANOVA RESULTS FOR STRENGTH BY TREATMENT
The GLM Procedure
Tukey's Studentized Range (HSD) Test for strength
ANOVA RESULTS FOR STRENGTH BY TREATMENT
The GLM Procedure
Tukey's Studentized Range (HSD) Test for strength
Note: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than REGWQ.
Alpha 0.
Error Degrees of Freedom 8
Error Mean Square 0.
Critical Value of Studentized Range 4.
Minimum Significant Difference 0.
Means with the same letter are not significantly different.
Tukey Grouping Mean N k2O
A 8.0533 3 54
A
B A 7.8500 3 36
B A
B A 7.7433 3 72
B A
B A 7.5133 3 108
B
B 7.4500 3 144
Critical Value of Studentized Range 4.
Minimum Significant Difference 0.
**Comparisons significant at the 0.05 level are indicated by *.
k2O Comparison
Difference Between Means
Simultaneous 95% Confidence Limits
54 - 36 0.2033 -0.3862 0.
54 - 72 0.3100 -0.2796 0.
54 - 108 0.5400 -0.0496 1.
54 - 144 0.6033 0.0138 1.1929 ***
36 - 54 -0.2033 -0.7929 0.
36 - 72 0.1067 -0.4829 0.
36 - 108 0.3367 -0.2529 0.
36 - 144 0.4000 -0.1896 0.
72 - 54 -0.3100 -0.8996 0.
72 - 36 -0.1067 -0.6962 0.
72 - 108 0.2300 -0.3596 0.
72 - 144 0.2933 -0.2962 0.
108 - 54 -0.5400 -1.1296 0.
108 - 36 -0.3367 -0.9262 0.
108 - 72 -0.2300 -0.8196 0.
108 - 144 0.0633 -0.5262 0.
144 - 54 -0.6033 -1.1929 -0.0138 ***
144 - 36 -0.4000 -0.9896 0.
144 - 72 -0.2933 -0.8829 0.
144 - 108 -0.0633 -0.6529 0.
ODS PRINTER PDF file=’C:\COURSES\ST541\RCBD.PDF’;
DATA in; INPUT k2O block strength @@; CARDS;
36 1 7.62 36 2 8.00 36 3 7.
54 1 8.14 54 2 8.15 54 3 7. 72 1 7.76 72 2 7.73 72 3 7.
108 1 7.17 108 2 7.57 108 3 7.
144 1 7.46 144 2 7.68 144 3 7.
PROC GLM DATA=in PLOTS = (ALL);
CLASS k2O block; MODEL strength = k2O block / SS3 SOLUTION;
MEANS block;
MEANS k2O / TUKEY CLDIFF LINES;
ESTIMATE ’K2O=36’ K2O 4 -1 -1 -1 -1 / DIVISOR=5;
ESTIMATE ’K2O=54’ K2O -1 4 -1 -1 -1 / DIVISOR=5;
ESTIMATE ’K2O=72’ K2O -1 -1 4 -1 -1 / DIVISOR=5;
ESTIMATE ’K2O=108’ K2O -1 -1 -1 4 -1 / DIVISOR=5; ESTIMATE ’K2O=144’ K2O -1 -1 -1 -1 4 / DIVISOR=5;
TITLE ’ANOVA RESULTS FOR STRENGTH BY TREATMENT’;
RUN;
identical. You use F 0 = M Strt/M SE to test
H 0 : τ 1 = · · · = τa = 0 against H 1 : not all of the τis are equal (9)
block effect (either fixed or random) is the EMS for the restriction error. The problem is that this is
not estimable from the data.
and the restriction error in (10) would be appropriate to test for a ‘general’ blocking effect.
H 0 : σ
2 δ +^ φ(β) = 0^ against^ H^1 :^ σ
2 δ +^ φ(β)^6 = 0^ (10)
Note that even if β 1 = β 2 = · · · = βb = 0 (fixed) or σ
2 β = 0 (random)^ is true, we still have the
restriction error in the EMS which prevents it from matching the error EMS = σ
2 .
is, there is no test for H 0 : σ
2 β
= 0 if blocks are random and no test for H 0 : β 1 = β 2 = · · · = βb if
blocks are fixed.
whether or not blocking had been effective in reducing the M SE for improved testing of the effects
of the treatment of interest.
Three different disinfecting solutions are being compared to study their effectiveness in stopping the growth
of bacteria in milk containers. The analysis is done in a laboratory, and only three trials can be run on
any day. Because days could represent a potential source of variability, the experimenter decides to use
a randomized block design with days as blocks. Observations are taken for four days. The inside of the
milk containers are covered with a certain amount of bacteria. The response is the percentage of bacteria
remaining after rinsing the container with a disinfecting solution.
Day
Solution 1 2 3 4
The second model includes blocks. The SAS analysis for both models is on the next page. Here are
important results:
across blocks (M Sday = 368.97).
with days (blocks), then it forms the SSE = 1158.75 and dfE = 9 for the model without days (blocks).
SAS Code for RCBD Analyses With and Without Blocks
OPTIONS NODATE NONUMBER LS=76 PS=54;
DO solution = 1 TO 3;
DO day = 1 TO 4;
INPUT growth @@; OUTPUT;
END; END;
LINES;
13 22 18 39 16 24 17 44 5 4 1 22
;
*******************************************************;
*** RUN AN ANOVA WITH SOLUTION ONLY, NO DAY BLOCKS ***;
*******************************************************;
PROC GLM DATA=IN;
CLASS solution;
MODEL growth = solution / ss3;
TITLE ’RCBD WITHOUT DAYS (BLOCKS) IN THE MODEL’;
CLASS day solution;
MODEL growth = solution day / ss3;
TITLE ’RCBD WITH DAYS (BLOCKS) IN THE MODEL’;
RUN;
for Type I sum of squares and ANOVA for Type III sum of squares.
differ we will first look at the Type I analysis.
3.6.1 Type I Analysis
often referred to as the sequential sum of squares method.
th step.
′
. Fit yij = μ + βj + ij and obtain RSS
∗ 2 =^ SSE^ for the model with blocks only.
Step V1 Source Fit df Type I SS for V
1 Total μ N − 1 RSS 1
2 Treatment τi a − 1 R(τ |μ) = RSS 1 − RSS 2
3 Blocks βj b − 1 R(β|τ, μ) = RSS 2 − RSS 3
3 Error ij N − a − b + 1 RSS 3
Step V2 Source Fit df Type I SS for V
1 Total μ N − 1 RSS 1
′ Blocks βj b − 1 R(β|μ) = RSS 1 − RSS
∗ 2
3 Treatment τi a − 1 R(τ |β, μ) = RSS
∗ 2 −^ RSS
∗ 3
3 Error ij N − a − b + 1 RSS 3
is called the reduction in SS for β adjusted for τ and μ.
is called the reduction in SS for τ adjusted for β and μ.
3.6.2 Type III Analysis
means analysis.
∗ 2 =^ SSE^ for this model.
with both treatments and blocks.
Step Source Fit df Type III SS
1 Total μ N − 1 RSS 1
2 Treatment τi a − 1 R(τ |β, μ) = RSS
∗ 2 −^ RSS^3
3 Blocks βj b − 1 R(β|τ, μ) = RSS 2 − RSS 3
1 Error ij N − a − b + 1 RSS 3
3.6.3 RCBD Analysis with a Missing Observation
See the example in Section 3.5 for the description of the experiment. Suppose y 23 was missing from the
RCBD. The RCBD data table is:
Day
Solution 1 2 3 4
the Type I (V2) sum of squares. Note the difference in sums of squares, mean squares, F-statistics,
and p-values for the Type I analyses.
is sequential so the order in which terms enter the model is important.
sequentially. That is, the order in which terms enter the model is not important.
analyses so you can see how RSS 2 and RSS
∗ 2 are calculated.
RSS 2 is the SSE for the model with only treatments and no blocks.
The GLM Procedure
Variable: growth
The GLM Procedure
Variable: growth
Source DF
Sum of
Squares Mean Square F Value Pr > F
Model 2 790.909091 395.454545 2.96 0.
Error 8 1068.000000 133.
Corrected Total 10 1858.
R-Square Coeff Var Root MSE growth Mean
0.425469 61.10405 11.55422 18.
Source DF Type I SS Mean Square F Value Pr > F
solution 2 790.9090909 395.4545455 2.96 0.
Source DF Type III SS Mean Square F Value Pr > F
solution 2 790.9090909 395.4545455 2.96 0.
0
10
20
30
40
growth
1 2 3
solution
Prob > F 0.
F 2.
Distribution of growth
0
10
20
30
40
growth
1 2 3
solution
Prob > F 0.
F 2.
Distribution of growth
RSS
∗ 2 is the^ SSE^ for the model with only blocks and no treatments.
The GLM Procedure
Variable: growth
The GLM Procedure
Variable: growth
Source DF
Sum of
Squares Mean Square F Value Pr > F
Model 3 1141.075758 380.358586 3.71 0.
Error 7 717.833333 102.
Corrected Total 10 1858.
R-Square Coeff Var Root MSE growth Mean
0.613842 53.55403 10.12658 18.
Source DF Type I SS Mean Square F Value Pr > F
day 3 1141.075758 380.358586 3.71 0.
Source DF Type III SS Mean Square F Value Pr > F
day 3 1141.075758 380.358586 3.71 0.
40
Prob > F 0.
F 3.
Distribution of growth
40
Prob > F 0.
F 3.
All of these calculations are done automatically in the RCBD analyses for the two models Distribution of growth
on the previous page.
∗
∗
∗
∗
∗
DM ’LOG; CLEAR; OUT; CLEAR;’;
ODS GRAPHICS ON;
ODS PRINTER PDF file=’C:\COURSES\ST541\RCBDMISS.PDF’;
OPTIONS NODATE NONUMBER;
***************************************;
*** RCBD WITH A MISSING OBSERVATION ***;
***************************************;
DATA IN;
DO solution = 1 TO 3; DO day = 1 TO 4; INPUT growth @@; OUTPUT; END; END;
CARDS;
13 22 18 39 16 24. 44 5 4 1 22
;
***************************************************;
*** RUN AN ANOVA WITH SOLUTION APPEARING FIRST ***;
***************************************************;
PROC GLM DATA=IN;
CLASS solution day; MODEL growth = solution day;
TITLE ’ANOVA RESULTS (SOLUTION THEN DAY)’;
**********************************************;
*** RUN AN ANOVA WITH DAY APPEARING FIRST ***;
**********************************************;
PROC GLM DATA=IN;
CLASS day solution; MODEL growth = day solution;
TITLE ’ANOVA RESULTS (DAY THEN SOLUTION)’;
****************************************;
*** RUN AN ANOVA WITH SOLUTION ONLY ***;
****************************************;
PROC GLM DATA=IN;
CLASS solution; MODEL growth = solution;
TITLE ’ANOVA RESULTS (SOLUTION ONLY)’;
***********************************;
*** RUN AN ANOVA WITH DAY ONLY ***;
***********************************;
PROC GLM DATA=IN;
CLASS day; MODEL growth = day;
TITLE ’ANOVA RESULTS (DAY ONLY)’;
RUN;
3.6.4 Type I vs Type III Hypotheses
associated with the F -tests (assuming the restriction on randomization is ignored).
th treatment, j
th block mean.
Hypotheses for Type III and Type I (V2) Sum of Squares
H 0 : μ 1 · = μ 2 · = · · · = μa·
H 1 : μi· 6 = μi∗· for some i 6 = i
∗ and μi· =
∑^ b
j=
μij
(^) /b.
Hypotheses for Type I (V1) Sum of Squares
n 1 ·
∑^ b
j=
n 1 j μ 1 j =
n 2 ·
∑^ b
j=
n 2 j μ 2 j = · · · =
na·
∑^ b
j=
naj μaj
ni·
∑^ b
j=
nij μij 6 =
ni∗·
∑^ b
j=
ni∗j μi∗j for some i 6 = i∗.
where ni· = the number of nonmissing yij values for the i
th treatment, and nij = 1 if yij is not missing
and nij = 0 if yij is missing.
the ones I want to test.) Therefore I recommend using the p-values from a Type III analysis.
a ∑
i=
b ∑
j=
2 ij =
a ∑
i=
b ∑
j=
(yij − μ̂ − ̂τi − β̂j )
2
∂ μ̂
∑^ a
i=
∑^ b
j=
(yij − μ̂ − ̂τi − β̂j ) = 0
∂ ̂τi
∑^ b
j=
(yij − ̂μ − τ̂i − β̂j ) = 0 for i = 1, 2 ,... , a
∂ β̂j
∑^ a
i=
(yij − ̂μ − τ̂i − β̂j ) = 0 for j = 1, 2 ,... , b
(i) y·· = ab μ̂ + b
a ∑
i=
̂ τi + a
b ∑
j=
β̂ j
(ii) yi· = bμ̂ + b ̂τi +
b ∑
j=
β̂ j for^ i^ = 1,^2 ,... , a
(iii) y·j = a μ̂ +
a ∑
i=
̂ τi + aβ̂j for j = 1, 2 ,... , b
get (i). If you sum the b equations in (iii), you also get (i). Thus, the rank is a + b − 1 which implies
that μ and each τi and βj are not uniquely estimable. To get estimates of μ and each τi and βj , we
must impose 2 constraints. We will use
∑^ a
i=
τi = 0 and
∑^ b
j=
βj = 0.
(1) abμ̂ = y·· (2) bμ̂ + b̂τi = yi· (3) a μ̂ + aβ̂j = y·j
μ̂ =
y··
ab
by·· + b̂τi = yi· −→ y·· + ̂τi = yi· −→ ̂τi =
ay·· + a β̂j = y·j −→ y·· + β̂j = y·j −→ β̂j =
Example: The goal is to determine whether or not four different tips produce different readings on a
hardness testing machine. The machine operates by pressing the tip into a metal test coupon, and from
the depth of the resulting depression, the hardness of the coupon can be determined. The experimenter
decides to obtain four observations for each tip. Four randomly selected coupons (blocks) were used and
each tip (treatment) was tested on each coupon. The data represent deviations from a desired depth in
0.1 mm units:
Type of Tip
Type of Coupon 1 2 3 4
Alternate Approach: Keeping a + b + 1 Columns
μ τ 1 τ 2 τ 3 τ 4 β 1 β 2 β 3 β 4
y =
′ X =
′ X)
′ y =
′ X)
− 1 X
′ y =
μ
̂ τ 1
̂ τ 2
̂ τ 3
̂ τ 4
β̂ 1
β̂ 2
β̂ 3
β̂ 4