2sign test & mcnemar test
TRANSCRIPT
-
7/28/2019 2Sign Test & McNemar Test
1/31
Sign Test & McNemar TestKAREN FATIMA R. MACALIMBON
-
7/28/2019 2Sign Test & McNemar Test
2/31
Sign Test
Frequently used nonparametric test thatdoes not depend on the assumptions ofthe t test, or measurement beyond theordinal scale.
FOCUSES on the MEDIAN rather than themean as a measure of central tendency orlocation.
Only assumption underlying the test: thedistribution of the variable of interest iscontinuous.
-
7/28/2019 2Sign Test & McNemar Test
3/31
The sign test gets its
name from the fact thatpluses and minusesrather than numericalvalues, provide the raw
data used in thecalculations.
-
7/28/2019 2Sign Test & McNemar Test
4/31
Sign test for two Independentsamples (Median two sample case)
Median test. Used to compare themedian of two independent samples.
Counterpart of the t-test underparametric
The data consist of two independentsamples of n1 and n2 observations.The medians of the samples aretaken jointly.
-
7/28/2019 2Sign Test & McNemar Test
5/31
In each sample observation,
the values above (>) the medians= plus (+) sign
those at or below (
-
7/28/2019 2Sign Test & McNemar Test
6/31
Formula
2 =
= Chi square test
a and c = observed (+) frequencies
b and d = observed (-) frequencies
k and l = the row total
m and n = the column total
N = the grand total
-
7/28/2019 2Sign Test & McNemar Test
7/31
example
Consider the test scores of 12 female and 9 male students ina spelling test.
I. Problem: Is there a significant difference in the performanceof two groups?
II. Hypothesis:Ho: There is no significant difference in the
performance of the two groups.
Ha: There is a significant difference in theperformance of the two groups.
Female 12 26 25 10 10 10 22 20 19 17 17 15
Male 6 22 19 7 8 12 16 8 19
-
7/28/2019 2Sign Test & McNemar Test
8/31
III. Level of Significance:
= .05
df = (c-1)(v-1).05 = 3.841
IV. Statistics: Median test fortwo independent samples.
-
7/28/2019 2Sign Test & McNemar Test
9/31
Computations: Median = 16.
- + + - - - + + + + + -
Female 12 26 25 10 10 10 22 20 19 17 17 15
Male 6 22 19 7 8 12 16 8 19
- + + - - - - - +
+ - Total
F a 7 b 5 k 12
M c 3 d 6 l 9
Total m 10 n 11 N 21
=
-
7/28/2019 2Sign Test & McNemar Test
10/31
V. Decision Rule: If
computed> tabular, Reject Ho.
VI. Conclusion:
computed = 1.288 < tabular3.841 at .05 level of significance,with 1 df, the Ho is confirmed.
-
7/28/2019 2Sign Test & McNemar Test
11/31
Sign test for two-correlated
samples (Fisher Sign Test)
Counterpart of t-test forcorrelated sample
Compares two correlated
samples and is applicable todata composed of N pairedobservations.
-
7/28/2019 2Sign Test & McNemar Test
12/31
Difference between each pair ofobservation is obtained.
This test is based on the idea that half thedifference between the paired observationswill be positive abd the other half will benegative.
Formula:
z =
z = the Fisher Sign Test
D = the difference between the number of+ & - signs
-
7/28/2019 2Sign Test & McNemar Test
13/31
Example
Consider the pretest and posttest results before and
after the implementation of the program
Pretest Posttest
x y
15 19
19 30
31 26
36 8
10 10
11 619 17
15 13
10 22
16 8
-
7/28/2019 2Sign Test & McNemar Test
14/31
I. Problem: Is there a significant difference
between the pretest and posttestresults of the 10 students?
II. Hypothesis:
Ho: There is no significant differencebetween the pretest and posttestresults of the 10 students.
Ha: There is a significant differencebetween the pretest and posttestresults of the 10 students.
III. Level of Significance:
= .05 .0 = 1.96
IV. Statistics: z test (the Fisher Sign Test)
-
7/28/2019 2Sign Test & McNemar Test
15/31
Computation:
Pretest Posttest Sign of x-y
x y D
15 19 -
19 30 -
31 26 +
36 8 +
10 10 0
11 6 +
19 17 +15 13 +
10 22 -
16 8 +
z =
-
7/28/2019 2Sign Test & McNemar Test
16/31
V. Decision Rule:
if z computed > z tabular= Reject Ho
VI. Conclusion:
z computed= .67 < ztabular 1.96 at .05 level ofsignificance, Accept Ho.
-
7/28/2019 2Sign Test & McNemar Test
17/31
Sign test for K independentsamples (The Median test: Multi-
Sample test) A straightforward extension of the median
test for two independent samples.
The test is used for k independentsamples.
= ( )
Where: = chi square test
O = observed frequencies
E = expected frequencies
-
7/28/2019 2Sign Test & McNemar Test
18/31
example
A sampling of the acidity of rain for tenrandomly selected rainfalls was recordedat three different locations in the provinceof Northern Samar, Biri Island, Catarmanand Silvino Lubos. The pH readings forthese 30 rainfalls are shown in the table.
(Note that the pH readings range from 0to 14; 0 is acid, 14 is alkaline. Pure waterfalling through clean air has a pH readingof 5.7)
-
7/28/2019 2Sign Test & McNemar Test
19/31
Use the median test at .05 level of significance to testHo that there is no significant difference among the pHreading of the three different municipalities of NorthernSamar.
Biri Catarman Silvino Lobos
4.4 4.6 4.7
4.0 4.5 4.8
4.1 4.3 5.0
3.5 3.8 4.9
2.4 4.2 3.9
3.8 4.5 4.5
4.2 4.7 4.6
3.9 4.3 4.3
4.1 4.5 4.0
4.2 4.8 4.7
-
7/28/2019 2Sign Test & McNemar Test
20/31
I. Problem: Is there a significant differencein the pH readings among thethree different municipalities ofNorthern Samar?
II.Hypothesis:III.Level of Significance: = .05
df = (c-1)(r-1) = 2
.05 = 5.991
IV. Statistics: Median test for k independentsamples
-
7/28/2019 2Sign Test & McNemar Test
21/31
Computation
Biri CatarmanSilvinoLobos
4.4 + 4.6 + 4.7 +
4.0 - 4.5 + 4.8 +
4.1 - 4.3 - 5.0 +
3.5 - 3.8 - 4.9 +
2.4 - 4.2 - 3.9 -
3.8 - 4.5 + 4.5 +
4.2 - 4.7 + 4.6 +
3.9 - 4.3 - 4.3 -
4.1 - 4.5 + 4.0 -
4.2 - 4.8 + 4.7 +
-
7/28/2019 2Sign Test & McNemar Test
22/31
MunicipalitiesAbove
4.3At or
below 4.3Total
O E O E
Biri 1 (4.7) 9 (5.3) 10
Catarman 6 (4.7) 4 (5.3) 10
Silvino Lubos 7 (4.7) 3 (5.3) 10
Total 14 16 30
Solve for expected frequencies:
1 10
0
= 4.716 10
0
= 5.3
= ( )
=8.296
-
7/28/2019 2Sign Test & McNemar Test
23/31
V. Decision Rule:
if computed > tabular,Reject Ho.
VI. Conclusion:
The computed of 8.296 >
tabular value of 5.991 at.05 level of significance with2 df, hence Reject Ho,Accept Ha
-
7/28/2019 2Sign Test & McNemar Test
24/31
Mcnemar
It is named after Quinn McNemar, whointroduced it in 1947.
Used to determine whether there isevidence of a difference between theproportions of two related samples.
Uses a test statistic that approximatelyfollows the normal distribution enablingyou to carry out either a one-tail or two-
tail test.
-
7/28/2019 2Sign Test & McNemar Test
25/31
Is a chi square test for
situations when samples arematched, that is, they are notindependent.
This is a before and afterdesign which is tested to find
out whether there is asignificant change between thebefore and after situations.
-
7/28/2019 2Sign Test & McNemar Test
26/31
2x2 contingency table forMcNemar Test
A = # of respondents that answer YES to condition 1 andYES to condition 2
B = # of respondents that answer YES to condition 1 andNO to condition 2
C = # of respondents that answer NO to condition 1 andYES to condition 2
D = # of respondents that answer NO to condition 1 andNO to condition 2
n= # of respondents in the sample
Condition (group 2)
Condition
(group 1) Yes No Row totalYes a b a + bNo c d c + d
Column
total
a + c b + d n
-
7/28/2019 2Sign Test & McNemar Test
27/31
Sample proportions of interest: P1 = A + B / n = proportion of respondents who
answer YES to condition 1
P2 = A + C /n = proportion of respondents whoanswer YES to condition 2
Population proportions of interest:
1 = proportion of population who would answer YESto condition 1
2 = proportion of population who would answer YESto condition 2
-
7/28/2019 2Sign Test & McNemar Test
28/31
Example
Actually purchased
Planned topurchase
Yes No Total
Yes 200 50 250
No 100 650 750
Total 300 700 1,000
You want to determine whether there is a difference
between the population proportion who planned topurchase a big screen tv and the population whoactually purchased.
Ho: 1 = 2Ha: 1 2
-
7/28/2019 2Sign Test & McNemar Test
29/31
Using 0.05 level ofsignificance, the criticalvalues are -1.96 and +1.96and the decision rule is:
Reject Ho if Z < -1.96 orif Z > +1.96
-
7/28/2019 2Sign Test & McNemar Test
30/31
A = 200 B = 50
C = 100 D = 650
P1 = A+B/n
P2 = A+C/n
Z = B-C/ B+C
-
7/28/2019 2Sign Test & McNemar Test
31/31
Thank You!