Solution
Seven Differences and Their Ranks
Show the problem again
Seven paired differences (after minus before) are: $-0.3,\ 0.8,\ -1.1,\ 1.4,\ 2.0,\ 2.6,\ 3.5$. Apply the exact Wilcoxon signed-rank test of $H_0$: the differences are symmetric about 0, against the one-sided alternative that they tend to be positive. The statistic is $T^+$, the sum of the ranks (by absolute value, smallest rank 1) of the positive differences. Under $H_0$ each of the $2^7$ sign patterns is equally likely. Give the exact one-sided p-value as a reduced fraction.
Worked solution
Absolute values already in increasing order give ranks 1 to 7; the negative differences have ranks 1 and 3. So $T^-=4$ and $T^+=28-4=24$. By symmetry, $P(T^+\ge24)=P(T^-\le4)$, i.e. the number of subsets of $\{1,\dots,7\}$ with sum at most 4: $\emptyset,\{1\},\{2\},\{3\},\{4\},\{1,2\},\{1,3\}$, which is 7 subsets. The p-value is $7/128\approx0.055$.
Source: Wilcoxon signed-rank test (F. Wilcoxon, 1945). Data written for AxiomIQ. Statement written for AxiomIQ.