Robert_V._Hogg,_Joseph_W._McKean,_Allen_T._Craig

(Jacob Rumans) #1
10.4. Mann–Whitney–Wilcoxon Procedure 605

whereD 1 <D 2 <···<Dn 1 n 2 denote the order differencesYj−Xi. Therefore,
the interval [Dc+1,Dn 1 n 2 −c)isa(1−α)100% confidence interval for Δ. Using the
null asymptotic distribution of the MWW test statisticU, we have the following
approximation forc:


c≈

n 1 n 2
2

−zα/ 2


n 1 n 2 (n+1)
12


1
2

, (10.4.32)

where Φ(−zα/ 2 )=α/2; see Exercise 10.4.7. In practice, we use the closest integer
toc.


Example 10.4.3(Example 10.4.1, Continued).Returning to Example 10.4.1, the
computation in R (groups are in the vectorsgrp1andgrp2) yields:
wilcox.test(grp2,grp1,conf.int=T)
95 percent confidence interval: -0.8000273 2.8999445
sample estimate: 0.5000127
Hence, the Hodges–Lehmann estimate of the shift in locations is 0.50 and the con-
fidence interval for the shift is (− 0. 800 , 2 .890). Hence, in agreement with the test
statistic, the confidence interval covers the null hypothesis of Δ = 0.


10.4.4 Monte Carlo Investigation of Power

In Section 10.3.4, we discussed a Monte Carlo investigation of the finite sample size
relative efficiency between two location estimators. In this section, we consider finite
sample studies of the power of two tests. As in Section 10.3.4, a Monte Carlo study
comparing the power of two tests would be over specified families of distributions
and sample sizes, each combination of which is a situation of the study. For our
brief presentation, we consider one such situation.
The model is the two-sample location model described by (10.4.2)–(10.4.3) where
Δ is the shift in location between the models. We consider the two-sided hypotheses

H 0 :Δ=0versusH 1 :Δ =0. (10.4.33)

Our study compares the power of the MWW and two-samplet-test, as defined in
Example 8.3.1, for these hypotheses. For our specific situation we consider equal
sample sizesn 1 =n 2 = 30 and the contaminated normal distribution with con-
tamination rate =0.20 and standard deviation ratioσc= 10. As the level of
significance, we selectα=0.05. Notice that for a given data set, a levelαtest
rejectsH 0 if itsp-value is less than or equal toα.
We chose 10,000 simulations. The gist of the algorithm is straightforward. For
each simulation, generate the independent samples; compute each test statistic; and
record whether or not each test rejected. For each test, its empirical power is its
number of rejections divided by the number of simulations. The following R func-
tionwil2powsim.Rincorporates this algorithm. The first line of code contains the
settings that were used.
n1=30;n2=30;nsims=10000;eps=.20;vc=10;Delta=seq(-3,3,1) #Settings
wil2powsim <- function(n1,n2,nsims,eps,vc,Delta=0,alpha=.05){

Free download pdf