MAST20005/MAST90058: Assignment 3
Due date: 10am, Friday 12 October 2018
Instructions: Questions labelled with ‘(R)’ require use of R. Please provide appropriate R
commands and their output, along with su cient explanation and interpretation of the output
to demonstrate your understanding. Such R output should be presented in an integrated
form. together with your explanations; do not attach them as separate sheets. All
other questions should be completed without reference to any R commands or output, except for
looking up quantiles of distributions where necessary. Make sure you give enough explanation
so your tutor can follow your reasoning if you happen to make a mistake. Please also try to
be as succinct as possible. Each assignment will include marks for good presentation and for
attempting all problems.
Problems:
1. (R) We wish to test whether the medians of X and Y di er, using the following random
sample of 17 paired observations:
x 26.1 26.6 27.4 27.5 27.8 28.1 28.4 29.5 29.8 30.4
y 27.4 28.1 22.9 31.3 16.3 50.1 20.0 24.6 23.3 19.3
x 30.4 31.2 31.5 32.9 33.6 34.1 35.9
y 24.4 24.4 29.5 27.6 21.7 25.4 39.4
(a) State the null and alternative hypothesis.
(b) Using a signi cance level of 5%, perform. an appropriate:
i. sign test
ii. Wilcoxon test
iii. t-test
(c) How do the conclusions of these tests compare with each other? Explain your answer
and what conclusion you would form. overall.
(d) Estimate, via simulation, the power of each of these three tests if the true distribu-
tions are de ned by X N(30;32) and Y X N(3;52).
2. (R) A class of 80 biology students is carrying out a project. Each student is required to
run 30 experiments to see how often the seed of a certain plant will germinate. The follow-
ing table summarises the results from all of the students, with each student contributing
a single observation (a number between 0 and 30):
Observation 3 4 5 6 7 8 9 10 11 12 13 17
Count 1 2 2 4 10 16 9 11 13 4 7 1 (P= 80)
(a) Assuming that these follow a Bi(30;p) distribution, estimate p.
(b) Design a set of classes suitable for carrying out a goodness-of- t test for a binomial
distribution. You will need to merge some of the classes in each tail until you have
expected counts of at least 5 in each one.
(c) Using your new version of the table, carry out the test using a 5% signi cance level
and state your conclusion.
1
3. Let X have a Pareto distribution with pdf,
f(x) = x ( +1); x> 1; > 0:
Suppose we have a random sample of n observations on X.
(a) Find the cdf of the sample minimum, X(1).
(b) Find the p quantile, p.
(c) Find the asymptotic variance of the sample median, ^M.
4. (MAST20005 students only) Let X1;:::;Xn Exp( ) be a random sample from an
exponential distribution with mean 1= . We are interested in testing H0 : = 0 versus
H1 : 6= 0.
(a) Derive the likelihood ratio test and show it is based on the statistic Y =Pni=1Xi.
(b) What is the distribution of Y when H0 is true?
(c) For n = 80 and 0 = 1, nd a test based on Y with signi cance level 0.05.
5. (MAST90058 students only) (R) An experiment was carried out to measure the
power output of solar panels mounted at di erent angles. Four di erent angles were used
for each of 5 di erent types of panels, with two replicate panels for each combination.
The data obtained were:
Panel
Angle 1 2 3 4 5
0 42.3 42.2 37.6 36.8 45.8
41.4 40.3 35.7 34.9 43.7
10 42.1 42.1 38.4 38.0 45.2
40.2 40.3 36.5 37.1 43.1
20 42.6 42.7 38.6 40.2 46.9
40.8 40.8 36.7 38.3 44.8
30 43.6 43.8 41.9 42.9 45.4
41.5 41.9 39.8 40.8 43.5
Perform. a two-way analysis of variance to examine whether these data suggest that the
output is a ected by the angle of elevation. State and test appropriate hypotheses at
a 5% signi cance level. You should report the value of the appropriate statistic, the
p-value, the assumptions you have made and your conclusions. 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.