4.4 - Non-parametric tests for paired data
When two measurements belong to the same person or matched unit, their pairing contains useful information. Learn how to test for a systematic population difference using signs or signed ranks, and how the assumptions determine which method is suitable.
The paired sign test
If six of eight people improve after training, is that convincing evidence of a population improvement? First keep each person's two measurements together.
For paired data, calculate one difference per pair. Measurements within a pair may be dependent; the differences from distinct randomly selected pairs must be independent. Eight people measured twice give eight differences, not sixteen independent observations.
Paired sign comparison
Choose a direction, such as . The paired sign test uses only whether each nonzero difference is positive or negative.
The no-systematic-difference null is a population median difference of zero, giving for continuous differences. A directional alternative changes this probability above or below .
For a comparison of populations, state the null in context: the two conditions have the same population performance, with no systematic paired difference. The sign test investigates directional differences through the signs; it cannot establish that every aspect of two population distributions is identical. Use the distribution of paired differences, rather than subtracting two unrelated sample medians.
Under the sign-test null, , where counts positive differences and counts pairs. No symmetry assumption is needed. The examples have no zero differences; a zero has no sign and must not be counted as positive.
Worked example 1: improvement as a positive difference
Question. Eight randomly selected people take a scored task before and after training. Higher scores are better. Use a sign test at to investigate whether after-training performance tends to be better.
| Person | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| Before | ||||||||
| After |
Assume the sampled pairs are independent and the population differences are continuous.
Plan. Define after minus before, then use the upper binomial tail for improvements.
The differences are , so . State : no systematic population difference, with median ; : after-training scores tend to be higher, with median .
Under , , giving
Answer. Since , do not reject . There is insufficient evidence that after-training performance tends to be better.
Check. Directly comparing the two score rows shows improvements for A, C, D, F, G and H: six distinct people, matching the sign count.
Reverse only the subtraction convention. The scientific claim stays the same, so the probability and conclusion must stay the same too.
Worked example 2: reversing the difference direction
Question. Repeat Worked example 1 using .
Plan. Rewrite the alternative before selecting the probability tail.
Now improvements have negative . The differences are , so the positive count is .
The null is median , and the same improvement claim becomes median . Under , , so
Answer. The same probability exceeds : there is insufficient evidence of improved population performance.
Check. Every pair has exactly one sign, so . The events and describe exactly the same sign arrangements.
For large numbers of pairs, the sign count can instead be approximated by , with the same continuity corrections as a one-sample sign test. Pairing changes how observations become differences, not the binomial calculation.
Watch out
A paired sign test counts signs. Ranking differences changes the test to a Wilcoxon matched-pairs test. Do not replace a requested sign test with it.
Follow the defined subtraction in this new task.
Wilcoxon matched pairs
When the population distribution of paired differences is symmetric, their absolute ranks can add information about the size of the changes.
Apply the one-sample signed-rank method to the differences , testing their population median against zero. This is the Wilcoxon matched-pairs signed-rank test. Require independent randomly sampled pairs and an underlying continuous distribution of differences symmetric about its median. Symmetry of the two separate measurement distributions does not by itself establish symmetry of their differences.
There are no zero differences or tied absolute differences here. Rank all , restore the signs, then form . For a positive-shift alternative, a small is evidence in the required direction.
Worked example 3: a matched-pairs rank test
Question. For eight independent random pairs, after-minus-before differences are . Assume a continuous difference distribution symmetric about its median. Test at whether after-values tend to be higher.
Plan. Rank absolute paired differences and compare the negative rank sum with the one-tailed critical value.
State , no systematic population difference, and . The signed ranks are
Hence and . For , the one-tailed critical value is . Since , reject .
Answer. There is sufficient evidence at the level that after-values tend to be higher in the population comparison.
Check. A negative rank sum at most comes from only five rank subsets: empty, . Its probability is , agreeing with the table decision.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account