Maths4UBETA

Matched pairs and ranked changes

Preserve the pairing, the units and the parameter being tested.

Try the quick check →
Lesson 3 of 4

Section 1 of 6 · Core · about 6 min

What differences do I rank?

Subtract before from after in each pair.

Worked example

Pair magnitude ranks from unsorted differences

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

ValveBefore (s)After (s)
174747474
288888282
39393102102
471716868
5104104116116
61061069191

Give the magnitude rank for valve 2.

  1. Subtract the before time from the after time for each valve. Order the nonzero magnitudes from least to greatest. Each magnitude retains the sign of its difference.

  2. ValveAfter minus before (s)Magnitude rank
    100omit\text{omit}
    2−6-622
    39933
    4−3-311
    5121244
    6−15-1555
  3. Valve 2 has difference −6-6 and magnitude rank 22.

Worked example

Two rank sums from the same sample

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

ValveBefore (s)After (s)
174748484
288886868
393939898
471719898
51041048181
61061069090
792927979

Find both signed rank sums. Give each as a non-negative number.

Try it on paper first.

  1. Subtract the before time from the after time for each valve. Order the nonzero magnitudes from least to greatest. Each magnitude retains the sign of its difference.

  2. ValveAfter minus before (s)Magnitude rank
    1101022
    2−20-2055
    35511
    4272777
    5−23-2366
    6−16-1644
    7−13-1333
  3. P=10,Q=18,P+Q=7(8)2P=10,\qquad Q=18,\qquad P+Q=\frac{7(8)}{2}.

Your turn

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

ValveBefore (s)After (s)
174748686
288888484
393937777
471719191
5104104112112
61061068282

Give the magnitude rank for valve 1.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 2 of 6 · Core · about 7 min

What do the two rank sums tell me?

The magnitude matters through the rank.

Worked example

Check the rank-sum total

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

ValveBefore (s)After (s)
174747070
288888888
393937575
471718787
5104104126126
61061068080

Find both signed rank sums. Give each as a non-negative number.

  1. Subtract the before time from the after time for each valve. Order the nonzero magnitudes from least to greatest. Each magnitude retains the sign of its difference.

  2. ValveAfter minus before (s)Magnitude rank
    1−4-411
    200omit\text{omit}
    3−18-1833
    4161622
    5222244
    6−26-2655
  3. P=6,Q=9,P+Q=5(6)2P=6,\qquad Q=9,\qquad P+Q=\frac{5(6)}{2}.

Your turn

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

ValveBefore (s)After (s)
174746868
28888100100
393938585
471718686
51041048585
6106106116116
792928989

Find both signed rank sums. Give each as a non-negative number.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 3 of 6 · Core · about 7 min

Why does the method require symmetry?

Under the null symmetry makes each sign equally likely, even at a particular magnitude.

Worked example

Turn the smaller signed sum into T

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

ValveBefore (s)After (s)
174747272
288887676
39393101101
471715050
5104104130130
6106106116116
792927272

Find the smaller of the two signed rank sums.

  1. Subtract the before time from the after time for each valve. Order the nonzero magnitudes from least to greatest. Each magnitude retains the sign of its difference.

  2. ValveAfter minus before (s)Magnitude rank
    1−2-211
    2−12-1244
    38822
    4−21-2166
    5262677
    6101033
    7−20-2055
  3. P=12,Q=16,T=min⁡(P,Q)=12P=12,\qquad Q=16,\qquad T=\min(P,Q)=12.

Your turn

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

ValveBefore (s)After (s)
174749090
288886464
393938585
471717070
5104104132132
6106106127127

Find the smaller of the two signed rank sums.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 4 of 6 · Core · about 7 min

What happens with a directional claim?

The smaller sum TT can be used with the MF19 tables.

Worked example

Identify the direction despite a small other sum

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

The technician is testing whether the population median paired difference in closing time is negative.

ValveBefore (s)After (s)
174745959
288889494
393939292
471718585
51041048585
61061069797
79292113113

Which tail of the positive rank sum gives evidence for the alternative?

  1. The claim is shorter closing times. Negative differences supply the evidence, so the positive rank sum PP tends to be small. Use its lower tail.

Your turn

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

The technician is testing whether the population median paired difference in closing time is negative.

ValveBefore (s)After (s)
174748181
28888106106
393936868
471715151
5104104107107
61061069595
79292119119

Which tail of the positive rank sum gives evidence for the alternative?

Tail

Section 5 of 6 · Core · about 7 min

How do I reach a conclusion in context?

The signed-rank test concerns a population location under the symmetry assumption.

Worked example

Use an exact two-sided signed-rank law

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

The technician is testing whether the population median paired difference in closing time is nonzero.

ValveBefore (s)After (s)
174745252
288888686
393936767
471715555
5104104110110
61061067676
792927474
8115115124124

Find the exact p-value using the equally likely rank sign patterns.

  1. Subtract the before time from the after time for each valve. Order the nonzero magnitudes from least to greatest. Each magnitude retains the sign of its difference.

  2. ValveAfter minus before (s)Magnitude rank
    1−22-2266
    2−2-211
    3−26-2677
    4−16-1644
    56622
    6−30-3088
    7−18-1855
    89933
  3. P=5,Q=31,T=5P=5,\qquad Q=31,\qquad T=5.

  4. Count both tails, including the observed boundary. The smaller observed sum is 55.

  5. p=20256=564p=\frac{20}{256}=\frac{5}{64}.

Your turn

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

The technician is testing whether the population median paired difference in closing time is negative.

ValveBefore (s)After (s)
174747070
288888585
393937676
471716363
51041048484
6106106107107
792926969

Choose the conclusion at 5%. Use the exact null distribution.

Conclusion

Section 6 of 6 · Extension · about 6 min

How can I estimate a tail in a large sample?

For larger nn the normal approximation describes a specified rank sum such as PP.

Worked example

Continuity-correct one side of a rank-sum tail

A factory compares the current drawn by each motor before and after servicing it. Take after minus before. Assume the paired differences are independent and come from a continuous symmetric distribution.

There are 2424 distinct nonzero magnitudes. The positive rank sum is 8787.

Test whether the population median paired difference in current is negative.

Give the continuity-corrected boundary of the observed tail.

  1. E(P)=24(25)4=150,Var⁡(P)=24(25)(49)24=1225E(P)=\frac{24(25)}{4}=150,\qquad \operatorname{Var}(P)=\frac{24(25)(49)}{24}=1225.

  2. For the lower tail, the continuity-corrected boundary is 1752\frac{175}{2}.

Your turn

A factory compares the current drawn by each motor before and after servicing it. Take after minus before. Assume the paired differences are independent and come from a continuous symmetric distribution.

There are 2525 distinct nonzero magnitudes. The positive rank sum is 9191.

Test whether the population median paired difference in current is negative.

Find the p-value to 4 decimal places using a normal approximation.

Keep intermediate values unrounded. Round the final answer to 4 decimal places.

Give your answer to 4 decimal places.

Worked examples

Practise the method

Core practice

Question 1 of 4

0 / 4 checked in this collection

Question list

Core practice

Fresh variants

Exam-style

Subtract the paired null before ranking

6 marks

Four independent pairs have A=(12,15,18,20)(12,15,18,20) and B=(10.4,11.8,16.9,15.5)(10.4,11.8,16.9,15.5). Define D=A−B. For null median change 2, give all four deviations Di−2D_i-2, in order, and both signed-rank sums.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Full answer-format guide

Exact numbers: 3/2, sqrt(5), 2-sqrt(3), pi/6, 3*pi/2. Sets: {1,4}. Intervals: (3,5]; a round bracket excludes the endpoint. Infinity: inf; union: U; no solutions: empty. Separate coordinate pairs or triples with semicolons. Expressions: 2x^2+3x-1; equations: x^2=3x+1 or the polynomial equal to zero. Factors: x-1 ; x+2. Parameter fraction: numerator ; denominator. List integer answers individually.

Review the method

Progress stays in this browser. Create an account to save it or sign in.

Extra practice from this lesson

Count the rank signs after comparing values

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

ValveBefore (s)After (s)
174746060
288889090
393937777
471719393
51041048484
61061069898
79292102102

Find both signed rank sums. Give each as a non-negative number.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Choose the direction if larger is the alternative

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

The technician is testing whether the population median paired difference in closing time is positive.

ValveBefore (s)After (s)
174748282
288887575
393939797
471718686
5104104123123
6106106100100
79292115115

Which tail of the positive rank sum gives evidence for the alternative?

Tail

Calculate the exact probability for an extreme outcome

A technician records the time taken by each valve to close before and after a service. Use after minus before as the paired difference. Assume the differences are independent, with a continuous symmetric population distribution.

The technician is testing whether the population median paired difference in closing time is nonzero.

ValveBefore (s)After (s)
174748686
28888105105
39393102102
471716464
5104104130130
6106106110110
79292123123
8115115148148

Find the exact p-value using the equally likely rank sign patterns.

Enter the value on its own or write p = … . Fractions and exact square roots are accepted.

Find both normal parameters

A factory compares the current drawn by each motor before and after servicing it. Take after minus before. Assume the paired differences are independent and come from a continuous symmetric distribution.

There are 2727 distinct nonzero magnitudes. The positive rank sum is 150150.

Give the exact mean and variance of the positive rank sum under the null hypothesis.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Correct the boundary of a large-sample upper tail

A factory compares the current drawn by each motor before and after servicing it. Take after minus before. Assume the paired differences are independent and come from a continuous symmetric distribution.

There are 2929 distinct nonzero magnitudes. The positive rank sum is 306306.

Test whether the population median paired difference in current is positive.

Give the continuity-corrected boundary of the observed tail.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Interpret a large-sample two-sided test

A factory compares the current drawn by each motor before and after servicing it. Take after minus before. Assume the paired differences are independent and come from a continuous symmetric distribution.

There are 3131 distinct nonzero magnitudes. The positive rank sum is 137137.

Test whether the population median paired difference in current is nonzero.

Choose the conclusion at 5%. Use a normal approximation.

Conclusion

Apply it · original exam-style problems

Show your working on paper and compare it with the worked solution and marking guidance.

Come back to what needs practice

Quick revision sheet (A4)

Your review plan starts after your first check.