Uploaded by Adam Lahmadi

Assignment3 STA305

advertisement
University of Toronto Mississauga
STA305 H5S: Experimental Design - Winter 2022
Assignment # 3
Instructions
ˆ Due Date: March 29, 2022 at 11:59 pm EST (end of the day). Be sure to submit your work before
it is due. Late submissions will not be accepted.
ˆ This assignment covers Unit 6 - Unit 8 of the lecture notes. Students are advised to consult Practice
Problems #5 and #6.
ˆ Carry out all your computations up to FOUR decimals.
ˆ The solution will be submitted through crowdmark, meaning you will need to upload PDF, PNG or
JPEG versions of your assignment answers. Upload your solution to crowdmark, one question at
a time.
ˆ Attempt all questions. However, NOT all questions will be marked. The questions to be marked
are not announced ahead of time.
ˆ Solutions must be presented neatly, completely, and with logical flow. Do not skip steps in your
solutions or fail to describe what you are doing.
ˆ Start each question on a new page. Sub-questions should be answered in order: (a), (b), (c), ...
The presentation of the solution will be marked in addition to the statistical aspects.
ˆ Computational Questions Using R/RStudio:
– Start all your codes with the following information: Question Number, Assignment Number,
Your Last Name, First Name, Student Number. For Example,
# Question 2, Assignment 3
# Last Name: Your Last Name, First Name: Your First Name
# St. Number: Your Student Number
Note: Do not repeat this information in each part of the same question.
– Only include the relevant output that are asked in each question. Do not include unnecessary
code or output in the body of the assignment. At the end, include an appendix with
ALL your R/RStudio code and output (without plots). The appendix will be checked
to make sure the work was completed individually by the student and that the instructions
were followed.
– You may use R/RStudio in all computation/plot questions.
– The presentation of the solution will be marked in addition to the statistical aspects.
ˆ Theoretical Questions can be hand-written or typed.
Assignments are individual work. Do not let others see your solutions. Only general discussion is
permitted between students. It is plagiarism (a serious academic offence) to submit solutions in other
people’s words (including but not limited to other students, the instructor’s, solutions from previous
years or courses, websites, etc). You are responsible for knowing and adhering to the University of
Toronto’s Code of Behaviour on Academic Matters (see course outline).
STA305- Instructor: Dr. Luai Al Labadi & Dr. Omid Jazi
Page 1 of 3
Answer all the following questions.
Question 1 Four treatments (1, 2, 3, 4) were randomly assigned to 24 experimental units, with 6
subjects receiving each treatment. The table below gives standard deviation for a response in each of
four treatments is:
s1
20
s2
15
s3
14
s4
12
Consider the following Dummy/Reference Coding Model: E(Yij ) = β0 + β1 I2,i + β2 I3,i + β3 I4,i , where
(
1 if ith subject received treatment j, for i = 1, . . . , 6, j = 2, 3, 4
Ij,i =
0 otherwise
c0 = 242, β
c1 = 29, β
c2 = 3, β
c3 = −16.
We are given that the estimated coefficients are: β
Note: You need to report the numerical value in all of the following parts. Show all the steps.
1. Find the value of the estimated group means y j , j = 1, 2, 3, 4.
2. Consider the following Effects Coding model: E[Yij ] = α0 + α1 X1,i + α2 X2,i + α3 X3,i , where


if ith subject received treatment j, for i = 1, . . . , 6, j = 1, 2, 3
1
Xj,i = −1 if ith subject received treatment 4


0
otherwise
(a) Find the points estimates of the regression coefficient α0 , α1 , α2 , and α3 .
(b) We wish to test the null hypothesis that the mean is the same for all treatments. Write the
appropriate null hypothesis H0 in terms of the regression parameters of the Effect Coding
Model.
3. Write out the linear model by using the Cell Means coding. Define all terms. (Denote the response
by Y and the regression parameters by γ’s with appropriate subscripts (i.e., γ1 , γ2 , ...). Be sure to
clearly label your indicator variables and any other terms you introduce.)
4. Complete the following ANOVA table:
Source
df
SS
MS
F
Treatment
Error
Total
STA305- Instructor: Dr. Luai Al Labadi & Dr. Omid Jazi
Page 2 of 3
5. Test the hypotheses H0 : µ1 = µ2 = µ3 = µ4 vs H1 : at least one µj , j = 1, 2, 3, 4, is different.
Include the p−value and state whether you reject or fail to reject H0 . Use α = 0.05. Hint:
p − value = P (F > Fobs ). You may use 1-pf(Fobs , df1, df2).
6. Consider the contrast: ψ = µ1 − µ2 − µ3 + µ4 .
(a) Find SSψ .
(b) Find 95% CI for ψ.
Question 2 Consider the following two-factor experiments. Factor A has three levels: a1 , a2 and a3 .
Factor B has two levels: b1 and b2 . The data are given in the following table. See also attached file
“Problem2.csv”.
B
A
b1
b2
a1
31, 29
26, 27
a2
26, 30
24, 23
a3
31, 30
27, 28
1. Interaction Plot:
(a) In the boxes above, report the cell means.
(b) Draw the interaction plot by hand. Put the levels of Factor A on the x-axis. Label the axes.
(c) From the plot can you conclude that there is an interaction between the two factors. Answer
Yes (if there is interaction) and No (if there is no interaction). Justify your answer based
on the plot.
(d) Interpret what interaction means without using the word ‘interaction’. Your definition should
use the words given in the problem.
2. Find the point estimate (numerical value) of (αβ)21 , the interaction effect of the 2nd level of Factor
A and the 1st level of Factor B.
3. Consider Model 1 - the model with main effects and interaction. Write out the model. Define all
terms.
4. Use R/RStudio to fit Model 1. Test for the interaction between the two factors. Include all the
steps necessary for the hypothesis. Use α = 0.05.
5. Consider Model 2 - the additive model. Write out the model. Define all terms.
6. Use R/RStudio to fit Model 2. Test for the main effects for Model 2. Include all the steps necessary
for the hypothesis. Use α = 0.05.
Good Luck
STA305- Instructor: Dr. Luai Al Labadi & Dr. Omid Jazi
Page 3 of 3
Download