◀ CONTENTSSTA503 · VOL.2EP.5 · One-sample runs testMISSIONS 0/2LV 10 XP
VOL.2 · EP.5 · §2.3

One-sample runs test

/StatsMadeFun/sta503/vol-2/runs
SENSEI RANK
For a two-sided test, yes. Table A.5 gives the lower and upper critical values for n₁ and n₂.
One-sample runs test
Badminton hall. Farah is writing down who enters: F for female, M for male.
FARAH
FARAH
F F F M F F M M M F F F F F F M. Nampak random tak?
MIKEY
MIKEY
Run tu stretch huruf yang sama. FFF satu run, then M, then FF…
SENSEI RANK
SENSEI RANK
Count the total runs, r. Too few runs means clustering, like people arriving in groups. Too many means alternation, like couples walking in together.
ドン
DON!
NORMY
NORMY
So both tails matter. Dua-dua hujung.
ゴゴゴ
GOGOGO
SENSEI RANK
SENSEI RANK
For a two-sided test, yes. Table A.5 gives the lower and upper critical values for n₁ and n₂.
READ THE NOTES

Use it when

Testing whether a sequence of two kinds of symbol (or values above/below the median) is in random order.

Assumptions

  • A sequence of n₁ symbols of one type and n₂ of another, recorded in the order they occurred.
  • For numeric data, code each value as above (+) or below (−) the median, dropping values equal to it.

Hypotheses

H₀: the pattern of occurrence is random H₁: the pattern is not random (too few or too many runs)

Test statistic

r = total number of runs

A run is a maximal block of identical symbols. FFMMMF has 3 runs.

Decision rule

Two-sided: reject H₀ if r ≤ r_L or r ≥ r_U, the lower and upper critical values from Table A.5 for (n₁, n₂). One-sided "too few runs" (clustering) uses only the lower tail.

Large-sample approximation

E(r) = 2n₁n₂/(n₁ + n₂) + 1 Var(r) = 2n₁n₂(2n₁n₂ − n₁ − n₂) / [(n₁ + n₂)²(n₁ + n₂ − 1)] z = [r − E(r)] / √Var(r)

Use when n₁ or n₂ exceeds 20.

START THE MISSIONS
MISSION 1 OF 2

Count the runs

+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