0% found this document useful (0 votes)
4 views13 pages

Solution Practice Problems 5

The document presents practice problems related to linear models in a statistics course at the University of Toronto, focusing on experimental design and analysis of variance (ANOVA) using fertilizers and treatments for fever blisters. It includes detailed solutions for identifying experimental units, populations, variables, hypotheses, and performing statistical tests using R. The document emphasizes the importance of understanding the statistical methods and their applications in experimental studies.

Uploaded by

zero
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

Solution Practice Problems 5

The document presents practice problems related to linear models in a statistics course at the University of Toronto, focusing on experimental design and analysis of variance (ANOVA) using fertilizers and treatments for fever blisters. It includes detailed solutions for identifying experimental units, populations, variables, hypotheses, and performing statistical tests using R. The document emphasizes the importance of understanding the statistical methods and their applications in experimental studies.

Uploaded by

zero
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

University of Toronto

STA305
Practice Problems # 5: Linear Models

SOLUTION

These practice problems are not to be handed in. Questions will be taken up in tutorial.

Problem 1. Consider the Farming Example from lectures: There are four different fertilizers (brands A,
B, C, D). We wish to determine if there a difference in the crop yield due to the fertilizer. There are 16
plots of lands available to be tested. Each fertilizer is randomly assigned to four plots. The crop yield (in
kg) of each plot is then measured after the fertilizer is used. Note that Fertilizer C is Nitrogen-based and
the other brands are Phosphorus-based. The data is attached in the file “[Link]”.

1. Identify the following for this study:


(a) Experimental Unit: One plot of land
(b) The population: All plots of lands
(c) Sample: 16 plots of lands
(d) Variables - identify which are response(s), and which are explanatory and classify
each as quantitative or categorical.
Response Variable: The crop yield (in kg) of each plot; (quantitative)
Explanatory Variable: Type of fertilizers (categorical);
(e) Treatments: Fertilizers (4 levels)
(f) Is this study experimental or observational? Justify
Experimental Study as “Each fertilizer is randomly assigned to four plots”.
(g) Is the design balanced or unbalanced?
Balance Design

2. Write the ANOVA model that is being fit to test the question of interest. Define all terms.

Yij = µ + αj + εij , i = 1, . . . , n = 4; j = 1, . . . , 4, where yij is crop yiled (in kg), µ is the overall
iid
(grand) mean, αj is the effect of fertilizer j, and εij is the error such that εij ∼ N (0, σ 2 ).

3. Write down the null and alternative hypotheses.


H0 : µ1 = µ2 = µ3 = µ4 vs Ha : at least two means are not equal. Here µ1 , µ2 , µ3 , µ4 are the average
yields for four different fertilizer brands (A, B, C, D).

4. Test the question of interest with a pooled t-test (i.e., pairwise comparisons).

# data
y = c (65 , 54 , 56 , 60 , 55 , 58 , 62 , 65 , 64 , 67 , 70 , 74 , 60 , 64 , 68 , 70)
a = f a c t o r ( r e p ( c ( a1 , a2 , a3 , a4 ) , each =4))
dat = data . frame ( x=a , y=y )

STA305 - Instructors: Dr. Luai Al Labadi Page 1 of 13


dat = data . frame ( x=a , y=y )

## P a i r w i s e c o m p a r i s o n s t p o o l e d t e s t ##
with ( dat , p a i r w i s e . t . t e s t ( y , a , p . a d j = none ) )

P a i r w i s e c o m p a r i s o n s u s i n g t t e s t s with p o o l e d SD

data y and a

a1 a2 a3
a2 0 . 7 0 1 0 = =
a3 0 . 0 0 8 4 0.0175 =
a4 0 . 0 5 5 2 0.1092 0.3267

P v a l u e adjustment method none

H0 : µ1 = µ2 vs H1 : µ1 ̸= µ2 . p-value=0.7010. Thus, FTR H0 .


H0 : µ1 = µ3 vs H1 : µ1 ̸= µ3 . p-value=0.0084. Thus, reject H0 .
H0 : µ1 = µ4 vs H1 : µ1 ̸= µ4 . p-value=0.0552. Thus, FTR H0 .
H0 : µ2 = µ3 vs H1 : µ2 ̸= µ3 . p-value=0.0175. Thus, reject H0 .
H0 : µ2 = µ4 vs H1 : µ2 ̸= µ4 . p-value=0.1092. Thus, FTR H0 .
H0 : µ3 = µ4 vs H1 : µ3 ̸= µ4 . p-value=0.3267. Thus, FTR H0 .

5. Fit the linear regression model using R/RStudio.


> f i t . a <= lm ( y ˜ a , data=dat )
> summary ( f i t . a )

Call :
lm ( f o r m u l a = y ˜ a , data = dat )

Residuals :
Min 1Q Median 3Q Max
= 5.500 = 3.250 = 0.125 3.000 6.250

Coefficients :
Estimat e Std . E r r o r t v a l u e Pr ( >| t | )
( Intercept ) 58.750 2 . 2 4 8 2 6 . 1 3 8 6 . 0 1 e =12 ***
aa2 1.250 3.179 0.393 0.70104
aa3 10.000 3.179 3 . 1 4 6 0 . 0 0 8 4 4 **
aa4 6.750 3.179 2.124 0.05519 .

R e s i d u a l s t a n d a r d e r r o r : 4 . 4 9 5 on 12 d e g r e e s o f freedom
M u l t i p l e R=s q u a r e d : 0 . 5 2 1 7 , Adjusted R=s q u a r e d : 0 . 4 0 2 1
F= s t a t i s t i c : 4 . 3 6 3 on 3 and 12 DF, p=v a l u e : 0 . 0 2 6 9 4

6. What is the estimate of the intercept? What practical quantity (if any) does it estimate?
> with ( dat , t a p p l y ( y , a , mean ) )
a1 a2 a3 a4
58.75 60.00 68.75 65.50

β̂0 = 58.750 = Y1 =the average of the crop yield for Fertilizer A.

STA305 - Instructors: Dr. Luai Al Labadi Page 2 of 13


7. Use R/RStudio to make the ANOVA table.
> f i t . a <= lm ( y ˜ a , data=dat )
> # ANOVA t a b l e
> anova ( f i t . a )
A n a l y s i s o f V a r i a n c e Table

Response : y
Df Sum Sq Mean Sq F v a l u e Pr(>F)
a 3 264.5 88.167 4.3629 0.02694 *
R e s i d u a l s 12 2 4 2 . 5 2 0 . 2 0 8
===

8. Write out the contrast coefficients needed to make the following comparisons:

(a) Is Fertilizer A different from Fertilizer C?


ψ1 : {1, 0, −1, 0}
(b) Is Fertilizer B different from Fertilizer C? ψ2 : {0, 1, 0, −1}
(b) Is Fertilizer C different from Fertilizer D? ψ3 : {0, 1, 0, −1}
(c) Is the average of Fertilizers A and B different from Fertilizer C?
ψ4 : {1, 1, −2, 0}
(d) Is the average yield of the phosphorus-based fertilizers different from the mean yield of the
nitrogen-based fertilizer?
ψ5 : {1, 1, −3, 1}

9. For each of the comparisons above, find the estimate of the contrast.
> f i t <= lm ( y ˜ x = 1 , data=dat )
> L <= matrix ( c (
+ 1 , 0 , = 1, 0 ,
+ 0 , 1 , = 1, 0 ,
+ 0 , 0 , 1 , = 1,
+ 1 , 1 , = 2, 0 ,
+ 1 , 1 , = 3, 1 ) , byrow=T, nrow=5)
> r e q u i r e ( multcomp )
> l i b r a r y ( multcomp )
> summary ( g l h t ( f i t , L ) , t e s t=a d j u s t e d ( ” b o n f e r r o n i ” ) )

S i m u l t a n e o u s T e s t s f o r G e n e r a l L i n e a r Hypotheses

F i t : lm ( f o r m u l a = y ˜ x = 1 , data = dat )

L i n e a r Hypotheses :
Estimat e Std . E r r o r t v a l u e Pr ( >| t | )
1 == 0 = 10.000 3 . 1 7 9 = 3.146 0.0422 *
2 == 0 = 8.750 3 . 1 7 9 = 2.753 0.0876 .
3 == 0 3.250 3.179 1.022 1.0000
4 == 0 = 18.750 5 . 5 0 6 = 3.406 0.0261 *
5 == 0 = 22.000 7 . 7 8 6 = 2.826 0.0765 .

10. Pick one of the contrasts above. Find 95% t-CI for this contrast. Do not use any correction
procedure.
Use the following formula and part (10) to find the CI:
q Pa 
(1 − α)100% CI for ψ is: ψ̂ ± tN −a,α/2 Sψ̂ , where Sψ̂ = M SE j=1 c2j /nj .

STA305 - Instructors: Dr. Luai Al Labadi Page 3 of 13


11. Use R/RStudio to test all four contrasts simultaneously. Use Bonferroni correction.
> f i t <= lm ( y ˜ x = 1 , data=dat )
> L <= matrix ( c (
+ 1 , 0 , = 1, 0 ,
+ 0 , 1 , = 1, 0 ,
+ 0 , 0 , 1 , = 1,
+ 1 , 1 , = 2, 0 ,
+ 1 , 1 , = 3, 1 ) , byrow=T, nrow=5)
> r e q u i r e ( multcomp )
> l i b r a r y ( multcomp )
> summary ( g l h t ( f i t , L ) , t e s t=a d j u s t e d ( ” b o n f e r r o n i ” ) )

S i m u l t a n e o u s T e s t s f o r G e n e r a l L i n e a r Hypotheses

F i t : lm ( f o r m u l a = y ˜ x = 1 , data = dat )

L i n e a r Hypotheses :
Estima te Std . E r r o r t v a l u e Pr ( >| t | )
1 == 0 = 10.000 3 . 1 7 9 = 3.146 0.0422 *
2 == 0 = 8.750 3 . 1 7 9 = 2.753 0.0876 .
3 == 0 3.250 3.179 1.022 1.0000
4 == 0 = 18.750 5 . 5 0 6 = 3.406 0.0261 *
5 == 0 = 22.000 7 . 7 8 6 = 2.826 0.0765 .

Only H0 : ψ1 = 0 and H0 : ψ4 = 0 are significant.

Problem 2. Five treatments for fever blisters (Treatment 1, 2, 3, 4, and 5) were randomly assigned to
30 patients, with 6 patients receiving each treatment. The number of days from initial appearance of the
blisters until healing is complete is measured for each patient.
We are interested in testing if the treatments differ in treating blisters.
We are given that the estimated coefficients from the dummy/reference coding model are:

β c1 = −2.5000, β
c0 = 7.5000, β c2 = −3.1667, β
c3 = −2.3333, β
c4 = −1.3333.

1. Consider the dummy/reference coding model for these data. Write the linear model that is being
fit. Define all terms.

Dummy Coding:

Yij = β0 + β1 Igroup2,i + β2 Igroup3,i + β3 Igroup4,i + β4 Igroup5,i + ϵij


E(Yij ) = β0 + β1 Igroup2,i + β2 Igroup3,i + β3 Igroup4,i + β4 Igroup5,i
Yij is the ith observation from group j (response)
µT is the grand mean
βj is the regression coefficient
iid
ϵij ∼ N (0, σ 2 )
(
1 if ith patient under treatment j, where i = 1, . . . , 6, j = 2, 3, 4, 5
Igroupj,i =
0 otherwise

STA305 - Instructors: Dr. Luai Al Labadi Page 4 of 13


Note: Estimates of regression coefficients:

Y 1 = β̂0
Y 2 = β̂0 + β̂1
Y 3 = β̂0 + β̂2
Y 4 = β̂0 + β̂3
Y 5 = β̂0 + β̂4

2. What practical quantity (if any) does the intercept from the above model estimate?

β0 is the mean of the reference (default/baseline) group.


β̂0 = 7.5, which represents the average number of days from initial appearance of the blisters until healing
is complete, for all patients receive treatment 1.

3. Which treatment has the lowest sample mean? Which has the highest sample mean? Justify.

Y 1 = β̂0 = 7.5
Y 2 = β̂0 + β̂1 = 7.5 − 2.5 = 5
Y 3 = β̂0 + β̂2 = 7.5 − 3.1667 = 4.3333
Y 4 = β̂0 + β̂3 = 7.5 − 2.3333 = 5.1667
Y 5 = β̂0 + β̂4 = 7.5 − 1.3333 = 6.1667
The highest sample mean is Y 1
The lowest sample mean is Y 3

4. Find y5 .

Y 5 = β̂0 + β̂4 = 7.5 − 1.3333 = 6.1667

5. Consider the Effects Coding model. Write the linear model that is being fit. Define all terms. Find
the estimates of the regression coefficients.

Effect Coding

Yij = β0 + β1 Xgroup1,i + β2 Xgroup2,i + β3 Xgroup3,i + β4 Xgroup4,i + εij

STA305 - Instructors: Dr. Luai Al Labadi Page 5 of 13



1
 if ith patient belongs to treatment j, where i = 1, . . . , 6, j = 1, 2, 3, 4
Xgroupj,i = −1 if ith patient belongs to treatment 5

0 otherwise

Note: Estimates of regression coefficients:

β̂0 = µ̂T
β̂1 = µ̂1 − µ̂T = α
b1
β̂2 = µ̂2 − µ̂T = α
b2
β̂3 = µ̂3 − µ̂T = α
b3
β̂4 = µ̂4 − µ̂T = α
b4

6. Consider the Cell Means model. Write the linear model that is being fit. Define all terms. Find the
estimates of the regression coefficients.

Cell Means Coding:

Yij = β1 Igroup1,j + β2 Igroup2,j + β3 Igroup3,i + β4 Igroup4,i + β5 Igroup5,i + εij

(
1 if ith patient under treatment j, where i = 1, . . . , 6, j = 1, 2, 3, 4, 5
Igroupj,i =
0 otherwise
Note: Estimates of the regression coefficients:

β̂1 = µ̂1
β̂2 = µ̂2
β̂3 = µ̂3
β̂4 = µ̂4
β̂5 = µ̂5

7. Write down the null and alternative hypotheses in terms of the regression parameters for each of
the 3 models above.

Dummy Coding: H0 : β1 = β2 = β3 = β4 = 0 V.S. Ha : at least one βj ̸= 0


where j=1,...,5
Effect Coding: H0 : β1 = β2 = β3 = β4 = 0 V.S. Ha : at least one βj ̸= 0
where j=1,...,5
Cell Means Coding: H0 : β1 = β2 = β3 = β4 = β5 V.S. Ha : at least one βi ̸= βj
where i,j ∈ {1, ..., 5}

STA305 - Instructors: Dr. Luai Al Labadi Page 6 of 13


8. Give a point estimate for each of the following:
(a) The overall mean number of days until healing is complete.

As the design is balanced,


µ̂1 + µ̂2 + µ̂3 + µ̂4 + µ̂5
µ̂T =
5
7.5 + 5 + 4.3333 + 5.1667 + 6.1667
=
5
= 5.63334

(b) The mean number of days until is healing is complete for patients taking Treatment 4.

µ̂4 = β̂0 + β̂3


= 5.1667, by using Dummy Coding

(c) The experimental effect of Treatment 2.

β̂2 = µ̂2 − µ̂T


= 5 − 5.63334
= −0.63334, by using Effect Coding

(d) The difference between the mean number of days until healing for Treatment 5 and Treatment
1.

µ̂5 − µ̂1 = β̂0 + β̂4 − β̂0


= β̂4
= −1.3333, by using Dummy Coding

Problem 3. The Fixed Effect Model has been covered in the class. In the question, we consider the
Random Effects Model. Let

yij = µ + αj + εij , i = 1, . . . , n; j = 1, . . . , a,

where yij is the response, µ is the overall mean, αj is the effect of treatment j and εij is the error. If
iid iid
αj ∼ N (0, σα2 ), εij ∼ N (0, σ 2 ) and Cov(αj , εij ) = 0, show that
(a) Var(yij ) = σα2 + σ 2 .

STA305 - Instructors: Dr. Luai Al Labadi Page 7 of 13


Var(yij ) = Var(µ + αj + εij ) = Var(αj ) + Var(εij ) + 2Cov(αj , εij )
= σα2 + σ 2 + 0 = σα2 + σ 2 .

(b) Cov(yij , yi′ j ) = σα2 for i ̸= i′ .

Cov(yij , yi′ j ) = Cov(µ + αj + εij , µ + αj + εi′ j )


= Cov(αj + εij , αj + εi′ j )
= Var(αj ) + Cov(αj , εi′ j ) + Cov(εij , αj ) + Cov(εij , εi′ j )
= σα2 + 0 + 0 + 0 if i ̸= i′
= σα2 .

(c) Cov(yij , yi′ j ′ ) = 0 for i ̸= i′ , j ̸= j ′ .


Hint: Var(aX + bY ) = a2 Var(X) + b2 Var(Y ) + 2abCov(X, Y ).

Cov(yij , yi′ j ′ ) = Cov(µ + αj + εij , µ + αj ′ + εi′ j ′ )


= Cov(αj + εij , αj ′ + εi′ j ′ )
= Cov(αj , αj ′ ) + Cov(αj , εi′ j ′ ) + Cov(εij , αj ′ ) + Cov(εij , εi′ j ′ )
= 0 + 0 + 0 + 0 if i ̸= i′ , j ̸= j ′
= 0.

Problem 4. For the one-way ANOVA model: yij = µ + αj + ϵij , i = 1, . . . , nj and j = 1, . . . , a, show
that Pa 2
j=1 nj αj
E [M SA] = σ 2 + .
a−1

a a  2  2
X 2 2 X
SSA = nj Y − N Y
j T =⇒ E(SSA) = nj E Y j − N E Y T .
j=1 j=1

Now,
nj nj nj
!
X X X
2
Yij ∼ N (µ + αj , σ ) =⇒ Yj = Yij ∼ N E(Yij ), Var(Yij ) .
i=1 i=1 i=1

[linear combination of independent normal variables]


It follows that,
nj
!
nj (µ + αj ) nj σ 2 σ2
 
2
 1 X
Yj ∼ N nj (µ + αj ), nj σ =⇒ Y j = Yij ∼ N , 2 =N µ + αj , .
nj i=1 nj nj nj

Thus,

2 σ2 σ2
E(Y j ) = Var(Y j ) + (E(Y j ))2 = + (µ + αj )2 = + µ2 + 2µαj + αj2 .
nj nj

STA305 - Instructors: Dr. Luai Al Labadi Page 8 of 13


We have,
a a a
σ2
 
X 2 X X
+ µ2 + 2µαj + αj2 σ 2 + nj µ2 + 2µnj αj + nj αj2

nj E(Y j ) = nj =
j=1 j=1
nj j=1
a
X a
X a
X
= aσ 2 + µ2 nj + 2µ nj aj + nj αj2
j=1 j=1 j=1
a
X a
X
= aσ 2 + N µ2 + nj αj2 [as nj aj = 0]. (1)
j=1 j=1

Similarly,
 
a
X Xa a
X a
X a
X
nj σ 2  = N N µ, N σ 2

YT = Yj ∼ N  nj (µ + αj ), [as nj = N & nj aj = 0].
j=1 j=1 j=1 j=1 j=1

N µ N σ2 σ2
   
1
YT = YT ∼ N , = N µ, .
N N N2 N

Thus,
 2 σ2  2
E Y T = Var(Y T ) + (E(Y T ))2 = + µ2 =⇒ N E Y T = σ 2 + N µ2 . (2)
N
Now, by (1) and (2), we have
a
X  2  2
E(SSA) = nj E Y j − N E Y T
j=1
a
X
= aσ 2 + N µ2 + nj αj2 − σ 2 − N µ2
j=1
a
X
= (a − 1)σ 2 + nj αj2 .
j=1

Finally,
Pa
1 j=1 nj αj2
E [M SA] = E(SSA) = σ 2 + .
a−1 a−1

Problem 5. Consider the basic one-way model:

yij = µ + αj + εij , i = 1, . . . , n; j = 1, . . . , a,

where yij is the response, µ is the overall (grand) mean, αj = µj − µ is the effect of treatment j, and εij
iid
is the error such that εij ∼ N (0, σ 2 ).
Let Y j be the sample mean of the jth group and Y be the sample grand mean.
Hint: You may use the following facts without proof:

ˆ Var(aX + bY ) = a2 Var(X) + b2 Var(Y ) + 2abCov(X, Y ).


P  P
n Pm n Pm
ˆ Cov i=1 ai Xi , j=1 bj Yj = i=1 j=1 ai bj Cov(Xi , Yj )

ˆ If X and Y are independent random variables, then Cov(X, Y ) = 0


Pa
ˆ j=1 αj = 0.

STA305 - Instructors: Dr. Luai Al Labadi Page 9 of 13


ˆ If X ∼ N (µ, σ 2 ), then aX + b ∼ N (aµ + b, a2 σ 2 ).
ˆ A linear combination of independent normal random variables is normal.

(a) Derive the distribution of µ̂j = Y j . Show all the steps.

Recall that
n
1X
Yj = Yij .
n i=1
iid
Since Yij ∼ N (µ + αj , σ 2 ) and the sum of linear independent random variables is normal, we have
n
X
Yij ∼ N (n(µ + αj ), nσ 2 ).
i=1

Thus,
σ2 σ2
   
Yj ∼N µ + αj , = N µj , ,
n n
as αj = µj − µ.

(b) Derive the distribution of µ̂ = Y . Show all the steps.

Recall that
a n
1 XX
Y = Yij .
an j=1 i=1
Pn  Pa Pn 
Since i=1 Yij ∼ N n(µ + αj ), nσ 2 , we have j=1 i=1 Yij ∼ N naµ, naσ 2 ,

σ2
 
Y ∼ N µ, ,
na
Pa
as j=1 αj = 0.

(c) Show that α̂j = Y j − Y is unbiased estimator of αj . Show all the steps.

We show that E(α̂j ) = αj .

Now,

E(α̂j ) = E(Y j − Y T ) = E(Y j ) − E(Y T ) = µj − µ = αj ,


by part (a) and part (b).

σ2

(d) Show that Cov Y j , Y = na . Show all the steps.
Pa
Note that, since the design is balance (nj = n for all j), Y T = a1 j=1 Y j .
 
a
 1 X
Cov Y j , Y T = Cov Y j , Y j
a j=1
 
n
1 X
= Cov Y j , Y j
a j=1

1    
= Cov Y j , Y 1 + Cov Y j , Y 2 + · · · + Cov Y j , Y j + Cov Y j , Y j+1
a


+ · · · + Cov Y j , Y a .

STA305 - Instructors: Dr. Luai Al Labadi Page 10 of 13


as, by independence Cov(Y j , Y i ) = 0 unless j = i. It follows that,
 1  1 2
Cov Y j , Y T = Var Y j = σ ,
a an

from Part (a).

(e) Derive the variance of α̂j . Show all the steps.

Var(α̂j ) = Var(Y j − Y T ) = Var(Y j ) + Var(Y T ) − 2Cov(Y j , Y T )


σ2 σ2 σ2 σ2 σ2 σ2
 
1
= + −2 = − = 1− ,
n na na n na n a

σ 2 a−1
or any equivalent expression such as n a .

Problem 6. Consider the basic one-way model:

yij = µ + αj + εij , i = 1, . . . , nj ; j = 1, . . . , a,

Paresponse, µ is the overall (grand) mean, and αj = µj − µ is the effect of treatment j. We


where yij is the
assume that j=1 nj αj = 0. Prove that the least squares estimates of the parameters µ and αj in the
one-way ANOVA model minimize the residual sum of squares:
nj
a X
X
RSS = (Yij − (µ + αj ))2 .
j=1 i=1

To find the least squares estimates, we need to minimize the RSS with respect to µ and αj .
Taking the partial derivatives of RSS with respect to µ and αj and setting them to zero, we get:

a X nj
∂RSS X
= −2 (Yij − µ − αj ) = 0, (1)
∂µ j=1 i=1

nj
∂RSS X
= −2 (Yij − µ − αj ) = 0 for each j. (2)
∂αj i=1

From Equation (1):


nj
a X a
X X
Yij − N µ − nj αj = 0,
j=1 i=1 j=1
Pa Pa
where N = j=1 nj . Since j=1 nj αj = 0, we have:
nj
a X
X
Yij − N µ = 0.
j=1 i=1

It follows that:
a nj
1 XX
µ̂ = Yij = Y T .
N j=1 i=1

STA305 - Instructors: Dr. Luai Al Labadi Page 11 of 13


From Equation (2) for each j:
nj nj
X 1 X
Yij − nj µ − nj αj = 0 ⇒ αj = Yij − µ = Y j − µ,
i=1
nj i=1

1
Pnj
where Y j = nj i=1 Yij is the sample mean of the j-th group.

Thus, the least square estimate of αj is:

α̂j = Y j − µ̂ = Y j − Y T .

Problem 7. A study will be conducted to compare k new treatments with a control treatment. A
completely randomized design will be used to plan the study. One of the key decisions for the researchers
is whether an equal number of experimental units should be allocated to each of the k + 1 groups.
Specifically, if nc experimental units are randomly allocated to the control group, and n experimental
units are allocated to each of the k new treatments, then how large should nc be in relation to n?
To answer this question, it has been decided to choose nc to minimize the variance of the difference
between the control effect and any treatment effect. In other words, the variance of α̂c − α̂j must be
minimized (j = 1, 2, . . . , k).
In this notation:

ˆ αc is the effect of the control treatment, and


ˆ αj is the effect of the j-th new treatment.

1. Suppose that the total number of experimental units is N , and that this number is fixed. How
should nc and n be chosen to minimize the variance of α̂c − α̂j ?
2. Write the expression for the 95% confidence interval for αc − αj .

1. The variance of α̂c − α̂j is given by:



V (α̂c − α̂j ) = V Y c − Y T − (Y j − Y T )

=V Yc−Yj
Indep.  
= V Yc −V Yj
σ2 σ2
= +
nc n
 
2 1 1
=σ + .
nc n

Since the total number of experimental units is fixed as N , we have the constraint:

nc + kn = N.

Substitute nc = N − kn into the variance expression:


 
2 1 1
V (α̂c − α̂j ) = σ +
N − kn n

To minimize V (α̂c − α̂j ), we differentiate with respect to n and set the derivative to 0:
 
k 1
σ2 − = 0.
(N − kn)2 n2

STA305 - Instructors: Dr. Luai Al Labadi Page 12 of 13


Simplify:
k 1
= 2.
(N − kn)2 n

Take the square root of both sides: √


k 1
= .
N − kn n
Substitute nc = N − kn, we have

nc = n k

2. The 95% confidence interval is given by:


q
α̂c − α̂j ± t α2 ,N −k−1 Var(α̂c − α̂j ),

which simplifies to: s  


1 1
Y c − Y j ± t0.025,N −k−1 σ2 + .
nc n
Replacing σ 2 with MSE, we have:
s  
1 1
Y c − Y j ± t0.025,N −k−1 MSE +
nc n

STA305 - Instructors: Dr. Luai Al Labadi Page 13 of 13

You might also like