In: Statistics and Probability
What are the steps needed to calculate the Wilcoxon Rank Sum Test?
From the given information,
Carrying out the Wilcoxon signed rank sum test:-
Case 1: Paired data
1. State the null hypothesis - in this case it is that the median
difference, M, is equal
to zero.
2. Calculate each paired difference, di = xi − yi
, where xi
, yi are the pairs of observa-
tions.
3. Rank the dis, ignoring the signs (i.e. assign rank 1 to the
smallest |di
|, rank 2 to
the next etc.)
4. Label each rank with its sign, according to the sign of
di.
5. Calculate W+, the sum of the ranks of the positive dis, and W−,
the sum of the
ranks of the negative dis. (As a check the total, W+ + W−, should
be equal to
n(n+1)/2
, where n is the number of pairs of observations in the
sample).
Case 2: Single set of observations
1. State the null hypothesis - the median value is equal to some
value M.
2. Calculate the difference between each observation and the
hypothesised median,
di = xi − M.
3. Apply Steps 3-5 as above.
Under the null hypothesis, we would expect the distribution of the
differences to be ap-
proximately symmetric around zero and the the distribution of
positives and negatives
to be distributed at random among the ranks. Under this assumption,
it is possible to work out the exact probability of every possible
outcome for W. To carry out the test,
we therefore proceed as follows:
6. Choose W = min(W−, W+).
7. Use tables of critical values for the Wilcoxon signed rank sum
test to find the
probability of observing a value of W or more extreme. Most tables
give both one-sided
and two-sided p-values. If not, double the one-sided p-value to
obtain the two-sided
p-value. This is an exact test.
Thank you.