This homework is to practice more on permutation tests. R codes need to be attached. Total: 90
points.
1. (20 points) Equivalence between mean di erence and sum of sample 1. In Homework 4,
Problem 2, the p-values we obtained in part (a) and (b) are the same. Here, we examine
whether these two test statistics are equivalent. Let the two samples be fX1;X2;:::;Xmg
and fY1;Y2;:::;Yng. The mean di erence of the two groups is D = X Y, and the sum of
the sample 1 is S1 =Pmi=1Xi. Show that the two test statistics are equivalent in conducting
the hypothesis H0 : 1 = 2 vs. Ha : 1 < 2.
[Hint: Show that D can be expressed by a linear transformation of S1.]
2. (40 points) Critical value table for Wilcoxon Rank-Sum Statistic. We are interested in testing
the two-sided hypothesis test: H0 : 1 = 2 vs. Ha : 1 6= 2. We use the centered sum of
sample 1: S1c =Pmi=1Xi m(N +1)=2, where N = m+n is the total sample size. Construct
critical value table for S1c for the 9 combinations of f(m;n) : m = 5;6;7;n = 5;6;7g at two
signi cance levels = 0:05 and = 0:01.
3. (30 points) Data analysis. Researchers are interested in studying the e ect of two blood
pressure medicines in terms of decrease the blood pressure in people with high blood pressure.
Data \HW5Q3.txt" records the amount of blood pressure decrease of 120 people with high
blood pressure. They are randomly assigned to one of the two medicines and the medicine
assignment is listed in the 1st column and the amount of blood decrease is listed in the 2nd
column. Use the Wilcoxon Rank based test to test the following hypotheses (use 0.05 as the
signi cance level for each of them): (1) H0 : 1 = 2 vs. Ha : 1 < 2; and (2) H0 : 1 = 2
vs. Ha : 1 6= 2..
(a) What is the total number of random assignments?
(b) Given the answer in part (a), we would like to compute the approximate p-value. Use
the two approaches we discussed in class to compute the approximate p-value:
(i) through the limiting distribution,
(ii) through doing B = 100;000 random permutations.