Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Test of Difference

(Non-Parametric)
Learning outcomes
By the end of this session you should be able to choose between,
perform and interpret the results from the following methods of
analysing categorical data:
1. Kruskal Wallis Test
2. Friedman Test
3. Mcnemars Test
1. Kruskal Wallis Test

Also known as H-Test.

It is a nonparametric test which is used to compare 3 or


more independent groups.

This is the counterpart of ANOVA (F-Test).


Steps in Testing
• 1. Define null and alternative hypotheses

• 2. State alpha (α) or level of significance

• 3. Choose test statistics

• 4. Determine the degree of freedom (df)

• 5. Critical value

• 6. Calculation

• 7. Conclusion
FORMULA:
NOTE: The critical value is determined using the level of significance and degree of
freedom provided in the table.
6. CALCULATION
BLOCK 1 BLOCK 2 BLOCK 3 BLOCK 1 BLOCK 2 BLOCK 3
34 40 25 34 – 6th 40 – 9th 25 – 1st
30 29 38 30 – 4.5th 29 – 3rd 38 – 8th
36 27 30 36 – 7th 27 – 2nd 30 – 4.5th

BLOCK 1 BLOCK 2 BLOCK 3


6 9 1
4.5 3 8
7 2 4.5
BLOCK 1 BLOCK 2 BLOCK 3
6 9 1
4.5 3 8
7 2 4.5
7. CONCLUSION
Since the computed value of H = 0.42 with 5% level of
significance is less than the CV of 5.991, thus, the null
hypothesis is accepted. Hence conclude that all blocks
are the same.
2. Friedman Test

• It is the non-parametric counterpart or analogue of


the parametric repeated measures ANOVA

• It is the ordinal counterpart of ANOVA

• It is similar to the Kruskal-Wallis test


Steps in Testing
• 1. Define null and alternative hypotheses

• 2. State alpha (α) or level of significance

• 3. Choose test statistics

• 4. Determine the degree of freedom (df)

• 5. Critical value

• 6. Calculation

• 7. Conclusion
FORMULA
NOTE: The critical value is determined using the level of significance, “k” and “m” value provided
in the table. (In this table „m‟ value = „b‟ value)
6. CALCULATION
MEDTECH < 1 yr 1 yr – 5 yrs >5 yrs
A 120 100 110
B 135 140 100
C 105 115 125
D 130 145 110

MEDTECH < 1 yr 1 yr – 5 yrs >5 yrs


A 120 – 3rd 100 – 1st 110 – 2nd
B 135 – 2nd 140 – 3rd 100 – 1st
C 105 – 1st 115 – 2nd 125 – 3rd
D 130 – 2nd 145 – 3rd 110 – 1st
MEDTECH < 1 yr 1 yr – 5 yrs >5 yrs
A 120 – 3rd 100 – 1st 110 – 2nd
B 135 – 2nd 140 – 3rd 100 – 1st
C 105 – 1st 115 – 2nd 125 – 3rd
D 130 – 2nd 145 – 3rd 110 – 1st
7. CONCLUSION
Since the computed value of Q = 0.5 with 5% level of
significance is less than the CV of 6.5, thus, the null
hypothesis is accepted.
3. MCNEMAR TEST

• The McNemar test is a test on a 2x2 classification


table when you want to test the difference between
paired proportions, e.g. in studies in which patients
serve as their own control, or in studies with "before
and after" design.
• The test is applied to a 2 × 2 contingency
table, which tabulates the outcomes of two
tests on a sample of n subjects, as follows.

The null hypothesis of marginal homogeneity


states that the two marginal probabilities for each
outcome are the same, i.e. pa + pb = pa + pc
and pc + pd = pb + pd.

Thus the null and alternative hypotheses are


FORMULA
EXAMPLE
A researcher attempts to determine if a drug has an
effect on a particular disease. Counts of individuals are
given in the table, with the diagnosis
(disease: present or absent) before treatment given in
the rows, and the diagnosis after treatment in the
columns. The test requires the same subjects to be
included in the before-and-after measurements
(matched pairs).
NOTE: The critical value is determined using the level of significance and degree of
freedom provided in the table.
6. CALCULATION

= 21.35
7. CONCLUSION
THANK YOU FOR LISTENING
for questions or clarifications: rccruz@fatima.edu.ph

You might also like