Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MATH3014-6027 Coursework

This coursework accounts for 40% of the module assessment. The total number of marks available is 40. Your solutions should be submitted via Blackboard by 17.00 on Friday 28   April.

You should upload two solution files, one for each question. For question 1, upload a handwritten or typeset solution (eg scanned or using LaTeX) as a pdf file. For question 2,   upload annotated R code that produces all requested analyses and plots. Use comments in the code to explain what you are doing, and to provide insight into the analysis.

Please name your solution files math3014-6027_cwk_student_number_q1.pdf for question 1 and math3014-6027_cwk_student_number_q2.R for question 2, where student_number is replaced by your student number. Do not put your name anywhere in the files.

1. [20 marks] Assume the standard unit-block-treatment model with the -vector of responses, is the -vector with every entry equal to one, and are  and   model matrices for blocks and treatments, respectively, is a constant parameter,     holds the block effects,    holds the treatment effects and   is the -vector of errors with   (see Section 3.1 of the notes).

Consider the -vector      where is the   identity matrix and   . This vector is the right- hand-side of the reduced normal equations for (see Section 3.2).

a. Show that    where      is a diagonal matrix with entries   (number of replications

of each treatment) and is a diagonal matrix with entries   (sizes of each block).

Find the variance covariance matrix for .

b. Find the form of a   matrix required to make an unbiased estimator of the contrast for each of the below cases.

i. A randomised complete block design (RCBD).

ii. A balanced incomplete block design (BIBD).

c. Using your results from parts a. and b., find the variance of the contrast estimators for each of the RCBD and BIBD.

Note the matrix is called a generalised inverseof the matrix , and suitable matrices can be found for general unbalanced cases (i.e. not a BIBD).

2. [20 marks] An experiment was performed to investigate the effects of exercise on pulse rate using a specially constructed exercise bike. Four treatments were compared by using three subjects across four days, as shown in the below table.

Day Subject 1 Subject 2 Subject 3

1      1 (45)       2 (18)       3 (23)

2      4 (27)       1 (32)       2 (16)

3      3 (27)       4 (23)       1 (28)

4      2 (15)       3 (15)       4 (20)

After each treatment, the time taken in seconds for 50 heart beats was recorded, and this is also given in the above table (in brackets). For example, on Day 1, subject 2     received treatment 2 and a response of 18 seconds was recorded.

For the analysis of this experiment, it was thought necessary to include both Subjects and Days as blocking variables. Hence, this is a row-columndesign (see also Chapter 3, Exercise 5).

The data can be loaded into R using the below code.

exercise <- data.frame(

Subject = rep(1 :3, rep(4, 3)),

Day = rep(1 :4, 3),

Treatment = c(1, 4, 3, 2, 2, 1, 4, 3, 3, 2, 1, 4),

Y = c(45, 27, 27, 15, 18, 32, 23, 15, 23, 16, 28, 20)

)

a. Investigate the differences between the four treatments. State an appropriate unit-block-treatment linear model that includes both blocking factors and the treatment factor. Fit this model, and produce and interpret the ANOVA table. If appropriate, test pairwise treatment comparisons at a 5% experiment-wise type I error rate (all pairwise comparisons are uniquely estimable in this design). Produce and comment on residual plots.

In fact, the treatments are all combinations of the three two-level factors exercise     duration, exercise speed and pedal type (foot pedal and hand bars), as in the table below.

Treatment Duration (mins.) Speed (rpm) Pedal

1           1                40          hand

2           1                60           foot

3           3                40           foot

4           3                60           hand

b. Find estimates of the main effects for these factors. Which factorial effects are significantly different from zero at an experiment-wise 5% level? Discuss these results in the context of your analysis in part (a).

c. Find estimates of the two-factor interactions among these factors. Discuss these results with reference to the choice of design.