next up previous contents index
Next: Difference Between Proportions : Up: Design of Experiments Previous: Randomized Paired Design

Signed-Rank Wilcoxon

Another analysis though is based on the one-sample Wilcoxon . Recall the hypotheses we want to test are: where $\Delta$ is the true location of the paired differences.

Consider our simple example:

  Y    X    D
  6    10   -4
  13   15   -2
  30   25    5
  40   31    9

Thus the 4 differences are: -4, -2, 5, 9. Notice that the positive numbers are slightly larger. So the edge is to the positive side; although the test should be far from significant.

Our analysis is based on the one sample Wilcoxon test statistic. This is often referred to as the Signed-Rank Wilcoxon . So, let us label it the SRW  procedure.

The SRW statistic is

\begin{displaymath}W = \char93  \Big\{ \frac{D_i + D_j}{2} > 0 \Big\}
\end{displaymath}

We will often refer to these paired-averages, $\frac{D_i + D_j}{2}$, by the name Walsh averages . For each pair (Di, Dj) of differences we only count the corresponding Walsh average once. An easy way to calculate these averages is by the table given below. Sort the D's. The columns are the D's and the rows are the D'd too. The entries are the Walsh averages. Since we only need one, just the top half of the table is formed as shown.
  
  ave. with   -4    -2    5   9
           ************************
       -4  *  -4     -3   .5   2.5
       -2  *         -2  1.5   3.5
        5  *               5    7
        9  *                    9

Our SRW statistic is the number of positive averages in the table. Hence the test statistic is W = 7.

How many positive averages would you expect if H0 is true. Well half should be positive and half should be negative. Since there are in general $\frac{n(n+1)}{2}$, where n is the number of differences, in this case we expect W to be .5*(4(5)/2) or 5. At 7, W is not far from what you expect it to if the null hypothesis is true. Again we need a p-value which we can get by resampling. (How would you do this resampling? It must be under H0. We come back to this in a moment. Just assume we can do it). This can be obtained using the class paired sample analysis code. Drop the differences -4, -2, 5, 9 into the data box. The test statistic and p-value are returned to you. If you do this, you will get a p-value of about .37. You certainly cannot reject.

The point estimate of the effect, $\Delta$, is the median of (Di+Dj)/2. Looking back up at the table, you see the median is .5(1.5+2.5) = 2. A confidence interval is based on resampling the paired differences -4,-2, 5, 9. The class paired sample analysis code will also return the point estimate and the confidence interval. Try it. You should get 2 as the point estimate. My confidence interval (based on 1000 resamples is (-4, 9), which contains 0 (hardly a surprise here, right?).

How do we do the resampling for the p-value? H0 must be true; i.e., the true $\Delta$ must be 0. Just take the differences (in this case -4, -2, 5, 9) and subtract off the point-estimate (in this case 2). This will center the differences for the Wilcoxon around 0. Our table for these "centered'' differences is:

  
  ave. with   -6    -4    3   7
           ************************
       -6  *  -6     -5  -1.5  .5
       -4  *         -4   -.5   1.5
        3  *               3    5
        7  *                    7
The Wilcoxon test statistic here is 5, just what you expect under H0. The class code does this type of resampling for its p-value.
next up previous contents index
Next: Difference Between Proportions : Up: Design of Experiments Previous: Randomized Paired Design

2001-01-01