4.4 - Wilcoxon signed-rank tests
A sign records which side of a median an observation lies on; a signed rank also records its relative distance from that median. Learn why symmetry makes this extra information usable, how to calculate signed ranks, and how to carry out a one-sample Wilcoxon test using the supplied tables.
Why symmetry matters
Can two samples with the same number of positive signs give different evidence about a population median? Yes: the larger deviations might all lie on one side.
Suppose the deviations from a proposed median are . There are two signs of each kind, but the positive deviations are larger. Ranking absolute deviations gives the ranks . The positive ranks sum to , while the negative ranks sum to .
Signed-rank information
The Wilcoxon signed-rank test uses the signs and the ranks of absolute deviations from a proposed population median. It requires an underlying continuous population distribution symmetric about its median, with independent observations.
Symmetry is the reason for the null probability model. Under the null median, a deviation of any given absolute size is equally likely to be positive or negative. With independent observations and no tied absolute deviations, every allocation of signs to the ranks is equally likely. An asymmetric population may give large deviations mainly on one side even when its median is correct; the usual signed-rank probabilities would then be inappropriate.
Worked example 1: equal sign counts, unequal rank sums
Question. For deviations , compare the information used by a sign test and a signed-rank test.
Plan. Count signs first, then attach signs to the ranks of the absolute deviations.
The sign count is positive and negative. The signed ranks are , so
The sign counts are balanced; the rank sums show that the larger deviations are positive. A signed-rank test can use that additional pattern if population symmetry is justified.
Answer. The sign test retains only the count; the signed-rank test also distinguishes the rank sums and .
Check. The available ranks sum to , and .
Reverse the signs while preserving their counts. The extra information should reverse direction.
Worked example 2: reversing the larger deviations
Question. Compare the information for deviations .
Plan. Retain the absolute ranks and reassign their signs.
There are still two positive and two negative signs. Now
The larger deviations are negative, so the signed-rank information points in the opposite direction even though the sign counts have not changed.
Answer. A sign test treats the two patterns alike; a signed-rank test distinguishes which side has the larger ranks.
Check. Negating every deviation exchanges the positive and negative rank sums. The new pair is the old pair in reverse order.
A visibly uneven small sample does not itself disprove population symmetry; samples vary. The assumption concerns the distribution from which it was sampled.
Watch out
“The data are symmetrical” does not state the required assumption. State that the population distribution is symmetric about its median. The sign test does not require this extra symmetry assumption.
Choose the assumption needed for the underlying probability calculation.
Signed ranks
Rank the distances from the proposed median, starting with rank for the smallest distance, then restore each deviation's sign.
Use . Rank , not and not the raw observations. A large negative deviation gets a large absolute rank. Here there are no observations equal to the tested median and no tied absolute deviations, so the ranks are exactly .
Positive and negative rank sums
Let be the sum of ranks attached to positive deviations and the sum of ranks attached to negative deviations, both recorded as nonnegative sums. Then
The definitions of are in the formula booklet. The total follows from adding the ranks through .
Writing a negative signed rank is a useful intermediate step. The corresponding contribution to is its positive magnitude.
Worked example 3: ranking absolute deviations
Question. The deviations from a proposed median are . Find .
Plan. Sort their absolute values, then return the ranks to their original positions.
The increasing absolute values are . Hence
| Deviation | ||||||
|---|---|---|---|---|---|---|
| Signed rank |
Therefore and .
Answer. .
Check. . Also the three positive deviations occupy ranks , giving directly from the sorted list.
Now change only the direction in which the deviations were defined.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account