Maths4UBETA

Sign tests for a population median

Use directions of deviations when a normal or symmetric model is not justified.

Try the quick check →
Lesson 1 of 4

Section 1 of 6 · Core · about 6 min

How do observations become signs?

Compare each reading with the median specified by the null hypothesis.

Worked example

Classify measurements around the null median

An independent sample records daily call lengths in minutes.

Test whether the population median call length is greater than 40 minutes.

ObservationLength (minutes)
14949
23737
34747
42525
55151
64545
72727

Count the positive and negative signs.

  1. Compare each observation with 4040.

    There are 44 positive and 33 negative signs.

    B∼Bin(7,12)B\sim\mathrm{Bin}\left(7,\tfrac{1}{2}\right) under the null hypothesis.

  2. Use the upper including the observed test value. Under the null, the tail contains 6464 of 128128 equally likely patterns. The resulting probability is 12\frac{1}{2}.

  3. There is insufficient evidence that the population median call length is greater than 40 minutes.

Worked example

Check the signs after shifting the null value

An independent sample records daily call lengths in minutes.

Test whether the population median call length is greater than 45 minutes.

ObservationLength (minutes)
13636
24040
35656
44242
55252
65858
76060
82828

Count the positive and negative signs.

Try it on paper first.

  1. Compare each observation with 4545.

    There are 44 positive and 44 negative signs.

    B∼Bin(8,12)B\sim\mathrm{Bin}\left(8,\tfrac{1}{2}\right) under the null hypothesis.

  2. Use the upper including the observed test value. Under the null, the tail contains 163163 of 256256 equally likely patterns. The resulting probability is 163256\frac{163}{256}.

  3. There is insufficient evidence that the population median call length is greater than 45 minutes.

Your turn

An independent sample records daily call lengths in minutes.

Test whether the population median call length is greater than 40 minutes.

ObservationLength (minutes)
14747
22727
34343
43131
53535
65757
72525

Count the positive and negative signs.

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 2 of 6 · Core · about 7 min

Which null model describes the count?

Let BB count the plus signs over independent observations.

Worked example

Choose the fair null model

An independent sample records daily call lengths in minutes.

Test whether the population median call length is greater than 40 minutes.

ObservationLength (minutes)
14747
24545
32929
43131
54343
65353
75555
82323

Give the number of binomial trials and the probability of a positive sign under the null hypothesis.

  1. Compare each observation with 4040.

    There are 55 positive and 33 negative signs.

    B∼Bin(8,12)B\sim\mathrm{Bin}\left(8,\tfrac{1}{2}\right) under the null hypothesis.

  2. Use the upper including the observed test value. Under the null, the tail contains 9393 of 256256 equally likely patterns. The resulting probability is 93256\frac{93}{256}.

  3. There is insufficient evidence that the population median call length is greater than 40 minutes.

Your turn

An independent sample records daily call lengths in minutes.

Test whether the population median call length is greater than 40 minutes.

ObservationLength (minutes)
14747
22929
35555
43535
54343
63131
72727
85757

Give the number of binomial trials and the probability of a positive sign 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).

Section 3 of 6 · Core · about 7 min

How does the alternative select the tail?

Decide which way the count would move if the claim were true.

Worked example

Choose the tail for a surviving claim

An independent sample records daily call lengths in minutes.

Test whether the population median call length is less than 40 minutes.

ObservationLength (minutes)
13131
24545
34343
45151
55353
63333
75555
85757

Which tail would provide evidence in the stated direction?

  1. Compare each observation with 4040.

    There are 66 positive and 22 negative signs.

    B∼Bin(8,12)B\sim\mathrm{Bin}\left(8,\tfrac{1}{2}\right) under the null hypothesis.

  2. Use the lower including the observed test value. Under the null, the tail contains 247247 of 256256 equally likely patterns. The resulting probability is 247256\frac{247}{256}.

  3. There is insufficient evidence that the population median call length is less than 40 minutes.

Your turn

An independent sample records daily call lengths in minutes.

Test whether the population median call length is greater than 40 minutes.

ObservationLength (minutes)
15555
23333
35151
43737
54545
65353
73131
82323

Which tail would provide evidence in the stated direction?

Tail

Section 4 of 6 · Core · about 7 min

What goes into a two-sided p-value?

Difference in either direction is relevant when the alternative says “different”.

A binomial law for eight fair signs with both extreme tails highlighted.

At B=1B=1 the two-sided p-value includes counts at most 1 and at least 7.

Worked example

Put the exact probability in both tails

An independent sample records daily call lengths in minutes.

Test whether the population median call length is different from 40 minutes.

ObservationLength (minutes)
14343
24545
34747
44949
52929
65353
75555
85757

Find the exact p-value.

  1. Compare each observation with 4040.

    There are 77 positive and 11 negative signs.

    B∼Bin(8,12)B\sim\mathrm{Bin}\left(8,\tfrac{1}{2}\right) under the null hypothesis.

  2. Use the two equal extreme tails including the observed test value. Under the null, the tail contains 1818 of 256256 equally likely patterns. The resulting probability is 9128\frac{9}{128}.

  3. There is insufficient evidence that the population median call length is different from 40 minutes.

Your turn

An independent sample records daily call lengths in minutes.

Test whether the population median call length is different from 40 minutes.

ObservationLength (minutes)
15555
23333
35151
44343
54545
65353
74949
85757
95959

Find the exact p-value.

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

Section 5 of 6 · Core · about 7 min

What changes for paired observations?

Each person or item provides one difference. Treat the differences, across pairs, as an independent sample.

Worked example

Decide from a lower sign count in paired data

A random sample completed the same setup procedure before and after a change. The table shows setup times in seconds.

Test whether the population median of after minus before is less than zero.

PairBefore (s)After (s)
152524949
254545959
356564949
458584949
560604949
662624949
764644949
866664949
968684949

Choose the conclusion at 5%. Use the exact binomial model.

  1. Subtract before from after for every matched pair.

    There are 11 positive and 88 negative signs.

    B∼Bin(9,12)B\sim\mathrm{Bin}\left(9,\tfrac{1}{2}\right) under the null hypothesis.

  2. Use the lower including the observed test value. Under the null, the tail contains 1010 of 512512 equally likely patterns. The resulting probability is 5256\frac{5}{256}.

  3. There is sufficient evidence that the population median of after minus before is less than zero.

Your turn

A random sample completed the same setup procedure before and after a change. The table shows setup times in seconds.

Test whether the population median of after minus before is greater than zero.

PairBefore (s)After (s)
152525757
254544545
356566767
458584545
560606363
662626969
764647979

Count the positive and negative signs.

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 6 of 6 · Extension · about 6 min

When can a normal approximation help?

For a large sign count and a fair null probability, a normal approximation can estimate the tail.

Worked example

Move the normal lower boundary by a half

Independent sign comparisons have been made for the sample of call lengths. A plus means the value exceeds the null median.

Test whether the population median call length is less than 40 minutes.

There are 4040 usable observations and 1212 positive signs.

Give the continuity-corrected boundary for the observed tail.

  1. The signs are independent.

    There are 1212 positive and 2828 negative signs.

    B∼Bin(40,12)B\sim\mathrm{Bin}\left(40,\tfrac{1}{2}\right) under the null hypothesis.

  2. The null distribution has mean 2020 and variance 1010.

    Use the continuity boundary 252\frac{25}{2}.

    The relevant normal tail P(Z≤252−2010)\mathrm P(Z\le \frac{\frac{25}{2}-20}{\sqrt{10}}) gives 0.00890.0089.

  3. There is sufficient evidence that the population median call length is less than 40 minutes.

Your turn

Independent sign comparisons have been made for the sample of call lengths. A plus means the value exceeds the null median.

Test whether the population median call length is greater than 40 minutes.

There are 4040 usable observations and 2828 positive signs.

Find the p-value to 4 decimal places using the 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

All signs and the exact two-sided probability

4 marks

Independent observations from a continuous population are (46,52,41,49,47,43,48,42,45,44)(46,52,41,49,47,43,48,42,45,44). For H0:m=50H_0:m=50 against H1:m≠50H_1:m\ne50, give n, the number above 50, the number below 50 and the exact two-sided p-value.

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

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 the value on its own or write p = … . Fractions and exact square roots are accepted.

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

Account for the p-value in the claim’s direction

An independent sample records daily call lengths in minutes.

Test whether the population median call length is greater than 40 minutes.

ObservationLength (minutes)
14545
24949
32929
45353
54343
64747
75555
85757
95959
106161

Find the exact p-value.

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

Choose a conclusion at a tighter cut-off

An independent sample records daily call lengths in minutes.

Test whether the population median call length is greater than 40 minutes.

ObservationLength (minutes)
14747
25151
34949
43737
52727
64545
75555
85757
95959
106161

Choose the conclusion at 1%. Use the exact binomial model.

Conclusion

Assess two-sided evidence from a paired sample

A random sample completed the same setup procedure before and after a change. The table shows setup times in seconds.

Test whether the population median of after minus before is different from zero.

PairBefore (s)After (s)
152525757
254544747
356565353
458584545
560604949
662625353
764644949
866664949
968684949
1070704949

Find the exact p-value.

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

Find the two null moments at once

Independent sign comparisons have been made for the sample of call lengths. A plus means the value exceeds the null median.

Test whether the population median call length is greater than 40 minutes.

There are 6060 usable observations and 3737 positive signs.

Find the exact mean and variance of the null model.

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

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

Use the upper-tail continuity boundary

Independent sign comparisons have been made for the sample of call lengths. A plus means the value exceeds the null median.

Test whether the population median call length is greater than 40 minutes.

There are 4848 usable observations and 3232 positive signs.

Give the continuity-corrected boundary for the observed tail.

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

Find a two-sided normal p-value

Independent sign comparisons have been made for the sample of call lengths. A plus means the value exceeds the null median.

Test whether the population median call length is different from 40 minutes.

There are 4040 usable observations and 1010 positive signs.

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

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

Give your answer to 4 decimal places.

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.