SH5 - The Wilcoxon signed rank test
SH5 tests a single population median using the signs and ranks of deviations from its hypothesised value. You will check the symmetry assumption, handle zero deviations and ties, choose the correct one- or two-tailed table column, and reach a non-assertive conclusion in context.
Use ranks without forgetting the population assumption
If the largest observation becomes ten times more extreme, must it count ten times as much in a test? A signed rank test gives the largest absolute deviation rank , however far away it is, provided its sign and rank order do not change.
The test still uses information about size: a large deviation gets a larger rank than a small one. It uses less information than a calculation based on the actual magnitudes, but more than simply counting positive and negative signs.
You already know
A population median is fixed, while a sample median varies between samples. A hypothesis test compares sample evidence with a proposed population value; a critical region contains results judged too unlikely under . Not rejecting does not prove it.
Here the evidence comes from signed ranks, and the parameter in the hypotheses is the population median.
Wilcoxon signed rank test
The Wilcoxon signed rank test is a non-parametric, or distribution-free, test for the median of a population with a symmetric distribution, using an independent random sample.
For a hypothesised median , form deviations . Rank their non-zero absolute values, then compare the rank sums for positive and negative deviations.
“Distribution-free” does not mean “assumption-free”. The underlying population must be symmetric, and the sampling design must support independence. The test is useful when a Normal model is not justified but symmetry is reasonable. A strongly skewed population is not made suitable merely by replacing observations with ranks.
State hypotheses about the population median, for example
where is the population median reading in the stated setting. A two-sided alternative would be . Do not silently replace the median by the mean.
Key idea
Under the null symmetric model, positive and negative deviations should balance in their rank weights. A small rank sum on one side signals an imbalance; the alternative determines which imbalance matters.
Check the assumptions before carrying out the arithmetic.
Rank magnitudes, then restore the signs
First subtract the hypothesised median. Omit zero deviations before ranking: they carry neither sign and do not count in the effective sample size . Rank the remaining absolute deviations from smallest to largest. If every deviation is zero, no non-zero ranks remain and this table method cannot be used.
If absolute deviations tie, assign each the mean of the ranks they occupy. A tie depends on absolute size, so deviations and tie.
Signed rank sums
is the sum of ranks belonging to positive deviations; is the sum belonging to negative deviations.
The effective sample size is the number of non-zero deviations. With mean ranks for ties,
The rank-total check is not printed in the formula booklet. It is the sum of ranks to , preserved when tied ranks are averaged. The booklet supplies critical values, rather than a full ranking algorithm.
Worked example 1: a zero deviation
Question. For readings , calculate the signed rank sums relative to hypothesised median .
Plan. Remove the zero deviation, rank absolute deviations, and add ranks by sign.
| Reading | | | Rank |
|---:|---:|---:|---:|
| | | | |
| | | | |
| | | | omitted |
| | | | |
| | | | |
| | | | |
Why this step? The zero must be removed before assigning ranks; giving it rank would shift every other rank.
Answer. , , .
Check. .
Change only the final reading from to . The zero remains, but the positive deviation now ties with the negative deviation .
Worked example 2: tied absolute deviations
Question. Calculate the rank sums for readings , again relative to .
Plan. Omit the zero and average the ranks occupied by the two absolute deviations of size .
| Deviation | ||||||
|---|---|---|---|---|---|---|
| Rank | omitted |
Why this step? Opposite signs do not prevent a tie: ranking is based on magnitude before the signs are restored.
Answer. , , .
Check. The total remains , although the individual sums are no longer integers.
For a table-based question, keep the mean ranks unrounded and use the effective sample size with the supplied table, following any stated instructions. The ordinary table is based on untied ranks, so its quoted significance level is approximate when ties occur. The complete table-based tests below use untied, non-zero absolute deviations, for which the cutoffs apply directly.
Watch out
Wrong: rank signed deviations from the most negative to the most positive.
Right: rank their absolute values, then attach each rank to its original sign.
Change only the last reading again.
Let the alternative choose the small rank sum
For , positive deviations should dominate, so reject for a sufficiently small . For , negative deviations should dominate, so reject for a sufficiently small .
The booklet's Wilcoxon table labels both 1-tail and 2-tail percentages. For , the one-tailed critical value is . Reject when the rank sum selected by the alternative is at most this cutoff.
Worked example 3: evidence of a larger median
Question. Eight independent instrument readings are . Assume their population is symmetric. Test at the level whether its median is greater than .
Plan. State the median hypotheses, calculate ranks about , and compare with the one-tailed cutoff.
Why this step? The upper-sided alternative needs unusually little negative rank weight, so is the relevant lower-tail statistic.
Answer. Reject . There is sufficient evidence at the level to suggest that the population median reading is greater than .
Check. , and the observed direction agrees with the alternative.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account