关键词 > MAST20005/MAST90058

MAST20005/MAST90058: Assignment 3

发布时间:2022-10-12

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

MAST20005/MAST90058: Assignment 3

2022

Instructions:   See the LMS for the full instructions, including the submission policy and how to submit your assignment.  Remember to submit early and often:  multiple submission are allowed, we will only mark your nal one. Late submissions will receive zero marks.

Problems:

1.  (R) An experiment was done to examine the effects of storage temperature on the rot that occurs in stored potatoes.   Potatoes were injected with bacteria known to cause potato rot, and three different bacteria amounts (low, medium, and high) were used. For each bacteria amount, two potatoes were stored at 10O C and two at 16O C. The response variable was the diameter  (mm) of the rot in a potato after being stored.   The data obtained were:

 

Temperature

Bacteria

Low

Medium

High

10O C

3.0

4.0

4.5 5.0

6.5 9.5

16O C

6.0

8.5

10.5 17.0

15.5 24.5

(a) Perform a two-way analysis of variance to examine whether these data suggest that

the rot is affected by the storage temperature. State and test appropriate hypotheses at a 5% significance level. You should report the value of the appropriate statistic, the p-value, the assumptions you have made and your conclusions.

(b) Is it possible to test for interaction?   If yes, then perform the test and draw an

interaction plot. Otherwise, explain why it is not possible.

2.  (R) The le paired .csv contains 20 observations of paired variables (x. y).  You may assume these are from a random sample. We wish to compare x and y .

(a) Use a sign test with significance level 1% to test whether the medians of the two

variables differ.

(b) Use an appropriate Wilcoxon test with significance level  1% to test whether the

medians of the two variables differ.

(c) Use a t-test with significance level 1% to test whether the means of the two variables differ.

(d) Based on the above results, what is your overall conclusion? If your overall conclusion differs to any of the above results, please explain why.

(e) Estimate (via simulation) the power of the above tests if the true distributions are

defined by x ~ N(2. 32 ) and y - x ~ N(3. 42 ).

3.  Consider the one-way analysis of variance model,

xij  = 9 + ai + ∈ij .    i = 1. 7 7 7 . m.   j = 1. 7 7 7 . ni .

where      ai  = 0 and ∈ij  ~ N(0. u2 ) are independent. Let

·  =  1        xij .    and    ··  =  1               xij .

ni  j=1                                                       n i=1  j=1

where n =      ni . Suppose we want to test H0 : a1  = a2  = . . . = am  = 0 vs H1 : H0 .

(a)  Compute _(·· ). When is ··  an unbiased estimator of 9?

(b)  Give the distribution (with parameters) of      ni (· - ·· )2 /u2  under H0 .

(c)  Suppose u2   is known.   Give a test statistic that is different to the usual F-test statistic, and determine the rejection region at significance level a.

(d)  Show that

m     ni

(xij  - · )2

is an unbiased estimator of u2 .

4. Let x1 . 7 7 7 . xn  be a random sample from an exponential distribution with mean i .  We are interested in testing H0 : i = i0  versus H1 : i  i0 .

(a)  Show that the likelihood ratio test is based on the statistic y =      xi .

(b) What is the distribution of y when H0  is true?

(c) For n = 100 and i0  = 1 find a test based on y with significance level 0.05 (you can use R to nd the quantiles).

5.  Stop 1 is monitoring their workload.  They record the number of emails received during a 1-minute interval (across several such intervals), giving the following data:

2   4   4    1   4    3    3    1    3    5    11    2    7   4    3    5    1   4    5    7

They ask you to analyse these data. You decide to model it as a random sample from a Poisson distribution with mean i .

(a)  Show that conjugate prior for i is a gamma distribution.

(b) Let the prior for i be a gamma distribution that has both mean and variance equal

to 1. For the sample given above, determine the posterior distribution and calculate the posterior mean.

(c)  (R) Calculate the posterior probability that i exceeds 4.