◀ CONTENTSSTA503 · VOL.4EP.4 · McNemar testMISSIONS 0/3LV 10 XP
VOL.4 · EP.4 · §4.3

McNemar test

/StatsMadeFun/sta503/vol-4/mcnemar
SENSEI RANK
If the talk had no effect, switching in either direction is equally likely. That gives z = (B − C)/√(B + C).
McNemar test
Before a road-safety talk, 60 students were asked: do you always wear a helmet? After the talk, the same 60 were asked again.
FARAH
FARAH
Jawapan ya/tak, orang yang sama dua kali. Related samples with nominal data.
SENSEI RANK
SENSEI RANK
Make a 2×2 table of before versus after. The students who answered the same both times tell you nothing about change.
キィン
KIIN
MIKEY
MIKEY
So yang tukar jawapan je yang penting. B people went yes → no, C went no → yes.
ゴゴゴ
GOGOGO
SENSEI RANK
SENSEI RANK
If the talk had no effect, switching in either direction is equally likely. That gives z = (B − C)/√(B + C).
READ THE NOTES

Use it when

Paired yes/no (nominal) data: did the proportion with a characteristic change between two conditions on the same subjects?

Assumptions

  • N subjects (or matched pairs), each classified Yes/No under two conditions.
  • Subjects independent of each other.

Hypotheses

A. H₀: p₁ = p₂ vs H₁: p₁ ≠ p₂ B. H₀: p₁ ≤ p₂ vs H₁: p₁ > p₂ C. H₀: p₁ ≥ p₂ vs H₁: p₁ < p₂

Test statistic

Condition 2: YesCondition 2: No
Condition 1: YesAB
Condition 1: NoCD
p̂₁ = (A + B)/N, p̂₂ = (A + C)/N, p̂₁ − p̂₂ = (B − C)/N z = (B − C) / √(B + C) (McNemar; z² is χ² with 1 df)

Decision rule

Compare z with the standard normal: two-sided reject if |z| ≥ z₁₋α/2 (1.96 at α = 0.05).

A and D (the people who did not change) never appear in the statistic.

START THE MISSIONS
MISSION 1 OF 3

Helmet survey

+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