◀ CONTENTSSTA503 · VOL.2EP.1 · Sign testMISSIONS 0/3LV 10 XP
VOL.2 · EP.1 · §2.1

Sign test

/StatsMadeFun/sta503/vol-2/sign
SENSEI RANK
It tells us nothing about direction. Throw it out and reduce n. That is the sign test.
Sign test
Seksyen 7, Shah Alam. Farah has timed 12 nasi lemak deliveries from the stall opposite the LRT station.
FARAH
FARAH
Kedai tu cakap delivery 30 minit je, typically. But my times look slower. One of them took 58 minutes, weh!
ドン
DON!
NORMY
NORMY
Senang je. Take the mean, run a t-test, siap!
SENSEI RANK
SENSEI RANK
Sabar, anak muda. With 12 points and one monster outlier? The t-test assumes normality. That 58 drags the mean and inflates the variance.
キィン
KIIN
MIKEY
MIKEY
So we ignore how far each time is from 30, and just ask: above 30 or below 30?
スッ
SU
SENSEI RANK
SENSEI RANK
Exactly. Write + for above, − for below. If the median really is 30, a + and a − are equally likely, like a fair coin. Count the plus signs and ask the binomial distribution how surprising that count is.
FARAH
FARAH
Habis tu, kalau delivery tepat 30 minit?
ゴゴゴ
GOGOGO
SENSEI RANK
SENSEI RANK
It tells us nothing about direction. Throw it out and reduce n. That is the sign test.
READ THE NOTES

Use it when

You want to test a hypothesised population median M₀ using one sample, and you cannot trust (or do not need) normality. It needs only ordinal data.

Assumptions

  • A random sample X₁, …, Xₙ from a population with unknown median M.
  • The variable is continuous (so ties with M₀ should be rare).
  • Measurement is at least ordinal.

Hypotheses

A. H₀: M = M₀ vs H₁: M ≠ M₀ (two-sided) B. H₀: M ≤ M₀ vs H₁: M > M₀ C. H₀: M ≥ M₀ vs H₁: M < M₀

Test statistic

Record the sign of each difference Xᵢ − M₀. Drop zeros, so n becomes the number of non-zero differences. Under H₀ the number of plus signs K ~ Binomial(n, 0.5).

K⁺ = number of + signs K⁻ = number of − signs

Decision rule

  • H₁: M ≠ M₀: p = 2·P(K ≤ k | n, 0.5) with k = smaller of K⁺, K⁻.
  • H₁: M > M₀: few minus signs is evidence; p = P(K ≤ K⁻ | n, 0.5).
  • H₁: M < M₀: few plus signs is evidence; p = P(K ≤ K⁺ | n, 0.5).

Reject H₀ if p ≤ α. Table A.1 (binomial) gives the cumulative probabilities.

Large-sample approximation

For n > 12 or so, use the normal approximation with continuity correction:

z = (k + 0.5 − 0.5n) / (0.5√n)

The sign test throws away magnitudes. That is why it is so robust, and also why it has lower power than the Wilcoxon test when the population is symmetric.

START THE MISSIONS
MISSION 1 OF 3

Delivery-time sign test

+30 XP
HOW TO PLAY

Work the procedure by hand on the data shown. Fill every box, then press CHECK. NEW DATA deals a fresh problem; SHOW SOLUTION gives the full working.

CLEARS WHENEvery box correct on one set of data.
Loading mission engine...

ALL MISSIONS IN THIS EPISODE