You are on page 1of 24

McNemar’s Test

Advanced Statistics

Prepared by:
Jonna Karla C. Bien
Quinn McNemar (1900–1986)
US psychologist & statistician

Born in Greenland, West


Virginia

Obtained his bachelor’s


degree in mathematics
(1925) from Juniata College
Quinn McNemar (1900–1986)
The President of the
Psychometric Society (1951) and
of the American Psychological
Association (1964)

Known for his work on IQ tests,


for his book Psychological
Statistics and for McNemar’s
Test (1947)
MCNEMAR’S TEST
 A non-parametric test that is used to compare
two population proportions that are related or
correlated to each other.

 Is used when analyzing a study where subjects


are accessed before and after the study.
REQUIREMENTS:
1. The sample data have been randomly selected.
2. The sample data consist of matched pairs of
frequency counts.
3. The data are at nominal level of measurement, and
each observation can be classified two ways:
 According to the category distinguishing values
with each matched pair, and
 According to another category with two possible
values.
DATA SHOULD BE RECORDED IN THE FOLLOWING WAY:

TEST 2
+ - ROW
TOTAL
+ A B A+B
TEST 1 - C D C+D
COLUMN A +C B +D N
TOTAL
Assumethattherowtotalisequaltothecolumntotal .

TEST 2
+ - ROW
TOTAL
(A + B) = (A + C) + A B A+B
(C + D) = (B + D) TEST 1
- C D C+D
COLUMN A +C B +D N
TOTAL

Cancel the A and D equation and this implies that


B = C, which is the basis of McNemar’s test. By using
this equation, calculate the McNemar’s test as:

x=
2 ( B – C) 2
B +C
Where:
x2 = chi- square test
B = the first cell of the 2nd column in a 2 X 2 table
C = the first cell of the 2nd row in a 2 x 2 table

x= 2 ( B – C) 2
B +C

Chi-square statistics is with one degree of freedom.


HYPOTHESES:
NULL HYPOTHESIS
McNemar’s test assumes that the total rows are
equal to the sum of the columns.
The mean of paired samples are equal.

ALTERNATIVE HYPOTHESIS
McNemar’s test assumes that the total number
of rows is NOT equal to the total number of
columns.
The mean of paired samples are NOT equal.
SIGNIFICANCE TESTING
In McNemar’s test, significance is tested
by using the chi-square table.

McNemar’s test’s calculated value is


compared with the chi-square table
value.
SIGNIFICANCE TESTING
If the calculated value for McNemar’s
test value is greater than the table
value, REJECT the null hypothesis.

If the calculated value is less than the


table value, ACCEPT the null hypothesis.
Example 1:
Data on seat belt use before and after involvement
in car accidents for a sample of 100 car accident
victims.
Wore seat belt regularly after the ROW
Wore seat accident TOTAL
belt YES NO
regularly YES 60 6 66
before the NO 19 15 34
accident

COLUMN 79 21 100
TOTAL
Problem:
Is there a significant difference in the use of seat
belt before and after involvement in a car accident?

Hypotheses:
HO : There is no significant difference in the use of
seat belt before and after involvement in a car
accident.

H1:There is a significant difference in the use of seat


belt before and after involvement in a car accident.
Level of Significance
α = .05
df = (c – 1) (r – 1)
= (2 – 1) (2 - 1)
=1
x2.05 = 3.841
Computation:
The McNemar’s Test for correlated proportion
( B – C) 2
x
2
= B +C

= ( 6 – 19)2
( 6 + 19)
= ( - 13)2
25
= 169
25
x2 = 6.76
Conclusion:
Since the computed x2 is 6.76, larger than
the tabular value of 3.841 at .05 level of
significance with 1 degree of freedom, the null
hypothesis is rejected in favour of the research
hypothesis

It implies that there is increase in seat belt


use after involvement in a car accident.
Therefore:
x2 = 6.76 > 3.841
Reject the Null Hypothesis

There is a significant difference in the


use of seat belt before and after
involvement in a car accident.
Example 2:
Comparing Treatments
Two different creams are used to tinea
pedis (athlete’s foot). Each subject with this
fungal infection on both feet is given
treatment of Pedacream on one foot while the
other foot is treated with Fungacream.
Using a 0.05 significance level, apply
McNemar’s test to test the null hypothesis
that the following two proportions are the
same:
•The proportions of the subjects with no cure
on the Pedacream-treated foot and a cure on
the Fungacream-treated foot.
•The proportions of the subjects with a cure
on the Pedacream-treated foot and no cure
on the Fungacream-treated foot.
Based on the results, does there appear to be a
difference between the two treatments? Does one of the
treatments appear to be better that the other?

CLINICAL TRIALS OF TREATMENTS FOR ATHLETE’S FOOT 80 subjects on 160 feet:

ROW 12 had both feet cured


Treatment Treatment with
TOTAL
with Pedacream 20 had neither foot cured
Fungacream CURED NOT 8 had no cures with
CURED
Fungarcream, but not
CURED 12 8 20 Pedacream
40 had cures with
NOT 40 20 60
CURED Pedacream, but not
Fungacream
COLUMN 52 28 80
TOTAL
Level of Significance
α = .05
df = (c – 1) (r – 1)
= (2 – 1) (2 - 1)
=1
x2.05 = 3.841
Computation:
The McNemar’s Test for correlated proportion

x=2 ( B – C) 2
B +C
= (8 - 40)2
(8 + 40)
= (- 32)2
48
= 1024
48
X2 = 21.333
Conclusion:
Wth a 0.05 significance level and degrees of
freedom given by df = 1. The test statistic of x2 =
21.333 exceeds the critical value of x2 = 3.841, reject
the null hypothesis.
It appears that the two creams produce different
results. Analyzing the frequencies of 8 and 40, more
feet were cured with Pedacream than Fungacream.

Pedacream treatment appears to be more effective.


Critical Values of Chi-Square
Level of Significance
Degrees of .10 .05 .02 .01
freedom (df)
1 2.706 3.841 5.412 6.635
2 4.605 5.991 7.824 9.210
3 6.251 7.815 9.837 11.341
4 7.779 9.488 11.668 13.277
5 9.236 11.070 13.388 15.086

You might also like