Single-sample Wilcoxon signed-rank test — 9231 FPS
Use signed ranks and recognise the symmetry and continuity assumptions.
Notes and key methods
Remove zero differences, rank their absolute values, and sum ranks separately for positive and negative differences. Ties in absolute magnitude receive average ranks. State whether the test statistic is \(\displaystyle W^{+}, W^{−}\) or the smaller of the two.
The exact no-tie distribution treats all \(\displaystyle 2^{n}\) sign allocations as equally likely under a continuous symmetric null distribution of differences. For a directional alternative, select the matching tail before interpreting the result.
Check the conditions
Independent differences come from a continuous symmetric distribution under the null.
Exact enumeration here uses no zeros and no tied absolute values.
Three worked examples
Example 1 · Wilcoxon signed-rank tests
Independent paired differences are \(-1,-2,3,4,5,6,7,8,9\). Their absolute values are distinct. Assume a continuous symmetric population of differences and test for a positive shift.
Use a 5% significance level for a written conclusion. A distribution calculator may be used for numerical p-values.
Find W+, the sum of positive ranks.
Find W−, the sum of negative ranks.
Find the exact upper-tail p-value for W+.
Find the sum of all ranks.
Show the reasoning
(a)
\(W^+=42\)
Answer: \(42\).
(b)
\(W^-=3\)
Answer: \(3\).
(c)
\(\displaystyle P(W^+\ge 42)=\frac{5}{512}\) by all 512 equally likely sign allocations.
Answer: \(\displaystyle \frac{5}{512}\).
(d)
\(\displaystyle \frac{n(n+ 1)}{2}= 45\)
Answer: \(45\).
The p-value is \(0.009765625\). Since it is at most 0.05, reject \(\displaystyle H_{0}\): there is evidence that the population has a positive location shift. This does not give the probability that \(\displaystyle H_{0}\) is true.
Example 2 · Wilcoxon signed-rank tests
Independent paired differences are \(-1,2,-3,4,5,6\). Their absolute values are distinct. Assume a continuous symmetric population of differences and test for a positive shift.
Use a 5% significance level for a written conclusion. A distribution calculator may be used for numerical p-values.
Find W+, the sum of positive ranks.
Find W−, the sum of negative ranks.
Find the exact upper-tail p-value for W+.
Find the sum of all ranks.
Show the reasoning
(a)
\(W^+=17\)
Answer: \(17\).
(b)
\(W^-=4\)
Answer: \(4\).
(c)
\(\displaystyle P(W^+\ge 17)=\frac{7}{64}\) by all 64 equally likely sign allocations.
Answer: \(\displaystyle \frac{7}{64}\).
(d)
\(\displaystyle \frac{n(n+ 1)}{2}= 21\)
Answer: \(21\).
The p-value is \(0.109375\). Since it exceeds 0.05, do not reject \(\displaystyle H_{0}\): the sample gives insufficient evidence that the population has a positive location shift. This does not give the probability that \(\displaystyle H_{0}\) is true.
Example 3 · Wilcoxon signed-rank tests
Independent paired differences are \(-1,2,3,-4,5,6,7\). Their absolute values are distinct. Assume a continuous symmetric population of differences and test for a positive shift.
Use a 5% significance level for a written conclusion. A distribution calculator may be used for numerical p-values.
Find W+, the sum of positive ranks.
Find W−, the sum of negative ranks.
Find the exact upper-tail p-value for W+.
Find the sum of all ranks.
Show the reasoning
(a)
\(W^+=23\)
Answer: \(23\).
(b)
\(W^-=5\)
Answer: \(5\).
(c)
\(\displaystyle P(W^+\ge 23)=\frac{5}{64}\) by all 128 equally likely sign allocations.
Answer: \(\displaystyle \frac{5}{64}\).
(d)
\(\displaystyle \frac{n(n+ 1)}{2}= 28\)
Answer: \(28\).
The p-value is \(0.078125\). Since it exceeds 0.05, do not reject \(\displaystyle H_{0}\): the sample gives insufficient evidence that the population has a positive location shift. This does not give the probability that \(\displaystyle H_{0}\) is true.
Common mistakes
Rank absolute differences, not the signed numbers.
Do not use the sign-test binomial distribution for a sum of ranks.