SIGNED RANK TEST

Name:

SIGNED RANK TEST

Type:

Analysis Command

Purpose:

Perform a one sample or a paired two sample signed rank
test.

Description:

The t-test is the standard test for testing that the
difference between population means for two paired
samples are equal. If the populations are non-normal,
particularly for small samples, then the t-test may not
be valid. The signed rank test is an alternative that can
be applied when distributional assumptions are suspect.
However, it is not as powerful as the t-test when the
distributional assumptions are in fact valid.

The signed rank test is also commonly called the Wilcoxon
signed rank test or simply the Wilcoxon test.

To form the signed rank test, compute
di = Xi - Yi where X and Y
are the two samples. Rank the di without
regard to sign. Tied values are not included in the Wilcoxon
test. After ranking, restore the sign (plus or
minus) to the ranks. Then compute W+ and W- as the
sums of the positive and negative ranks respectively.
If the two population means are in fact equal, then
the sums of the ranks should also be nearly equal. If the
difference between the sum of the ranks is too great, we
reject the null hypothesis that the population means are
equal.

Significance levels are based on the fact that if there
is no difference in the population means, then there
are 2n equally likely ways for the n ranks to
recieve signs.

More formally, the hypothesis test is defined as follows.

H0:

Ha:

Test Statistic:

W=MIN(W-,W+) where the computation of
W- and W+ is discussed above.

Alpha:

Typically set to .05. Due to the discreteness of
the ranks, the actual significance level will not
in most cases be exact.

Critical Region:

For small samples (N <= 30), the critical
regions have been tabulated. For N > 30,
the test statistic W approaches a normal
distribution with a mean of

and a standard deviation of

.

The critical regions are thus based on the normal
percent point function. That is, for a
2-sided test,

where
and
are the mean and standard deviation
of W as described above and
is the normal percent point function.

Conclusion:

Reject null hypothesis if test statistic is
in critical region

Although the above discussion was in terms of a paired two
sample test, it can easily be adapted to the following
additional cases:

For the one sample case that the population mean is
equal to a value d0, simply compute di =
xi - d0 and calculate W+ and W- based on
di.

For the paired two sample case where we want to test
that the difference between the two population means
is equal to d0, compute di =
xi - yi - d0 and
calculate W+ and W- based on di.

Syntax 1:

SIGNED RANK TEST <y1> <mu>
<SUBSET/EXCEPT/FOR qualification>
where <y1> is a response variable;
<mu> is a number or parameter that is the
hypothesized mean value;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional.

This syntax implements the one sample signed rank test.

Syntax 2:

SIGNED RANK TEST <y1> <y2>
<SUBSET/EXCEPT/FOR qualification>
where <y1> is the first response variable;
<y2> is the second response variable;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional.

This syntax implements the two sample paired signed rank test
where the hypothesized difference between the population
means for the two samples is zero.

Syntax 3:

SIGNED RANK TEST <y1> <y2> <mu>
<SUBSET/EXCEPT/FOR qualification>
where <y1> is the first response variable;
<y2> is the second response variable;
<mu> is a number or parameter that is the
hypothesized difference between the means of
the two samples;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional.

This syntax implements the two sample paired signed rank test
where the hypothesized difference between the population
means for the two samples is equal to a non-zero value.

Note that the above critical values are the lower and upper
tails for two sided tests (i.e., each tail is alpha/2. For
example, CUTLOW90 is the lower 5% of the normal percent
point function (adjusted for the mean and standard
deviation). This is the critical regions for alpha = 0.10,
so there is 0.05 in
each tail.

Note:

The sign test is also an alternative to the t test for
paired samples when the normality assumption is in doubt.
The signed rank test is generally preferred over the sign
test because it takes into account both the sign of the
difference and the magnitude of the difference for paired
samples while the sign test only takes the difference of
the sign into account.