Вы находитесь на странице: 1из 31

NON PARAMETRIC TESTS

REVIEW

PARAMETRIC & NON PARAMETRIC

Wilcoxon Rank Sum test

Wilcoxon Matched-Pair Rank test

**Non parametric tests can be applied to Normal data but parametric tests
have greater power IF assumptions met.
3

NON PARAMETRIC TESTS


Non-parametric methods have fewer assumptions than parametric
tests. So useful when these assumptions not met.
Nonparametric procedures are sometimes less power ful than tests
designed for use with a specific distribution It is better to use a test
that is power ful when we believe that our assumptions are
approximately satisfied than a less power ful test with fewer
assumptions.
Of ten used when sample size is small and dif ficult to tell if normally
distributed.
Appropriate for dealing with data that are measured on a nominal or
ordinal scale and whose distribution is unknown.
Nonparametric tests use the order/rank of the values rather than the
actual values themselves.

A Wilcoxon Rank Sum Test is most often used for three types
of study design as an alternative for the independent t-test:
Determining if there are differences between two independent
groups
Determining if there are differences between interventions
Determining if there are differences in change scores
t-test relies on several conditions: independent samples,
normality, and equal variances. We can use the Wilcoxon
Rank Sum Test as an alternative when the distribution is not
normal.

WILCOXON RANK SUM TEST


Assumption #1: The dependent variable should be measured
at the ordinal or continuous level . The independent
variable should consist of two categorical, independent
groups.
Assumption #2: The underlying distribution is not normal.
Assumption #3: The observations are chosen randomly and
independent.
Assumption #4: The distribution of scores for both groups of
the independent variable have the same shape (identical).
6

WILCOXON RANK SUM TEST


To compare the running time of the first grade boys (B) and girls
(G), the following information is collected.
Time (in secs) 20

24

29

33

57

35

10

17

23

19

22

21

Sex

Is there a difference between the running time of boys and


girls?

Hypotheses are sometimes defines in terms of population


medians , but can also be expressed in words.
H 0 : = (The median running time is not different between
boys and girls.)
There is no difference in the running time of boys and girls
(i.e. the sum of ranks for group 1 is no different than the sum of ranks for
group 2).
H a : (The median running time is different between boys
and girls.)
There is a difference in the running time of boys and girls
(i.e. the sum of ranks for group 1 is significantly different from the sum of
ranks for group 2).

The Wilcoxon Rank Sum Test requires that the two tested
samples be similar in shape (boxplot/histogram).
8

Rank all 12 observations.


Arrange them in order from
smallest to largest.

Sex

Time

Rank
1
2
3

The rank of each observation


is its position in this ordered
list, starting with rank 1 from
the smallest observation.
Assign all tied values the
average of the ranks they
occupy (if any).

4
5
6
7

8
9
10
11
12
9

Rank all 12 observations.


Arrange them in order from
smallest to largest.
The rank of each observation
is its position in this ordered
list, starting with rank 1 from
the smallest observation.
Assign all tied values the
average of the ranks they
occupy.

Sex

Time

Rank

10

17

19

20

21

22

23

24

29

33

10

35

11

57

12
10

Sex

Calculate the sum of ranks per group

Sum of ranks

Boys
Girls

The Wilcoxon W statistic is the smaller of these two numbers:


(obtained value).
Critical value?
= 0.05, two tailed test
1 = 6 , 2 = 6 (1 is always smaller of the two groups)
From table D.8, critical value =
11

Calculate the sum of ranks per group

Sex

Sum of ranks

Boys

24

Girls

54

The Wilcoxon W statistic is the smaller of these two numbers:


(obtained value).

24

Critical value?
= 0.05, two tailed test
1 = 6 , 2 = 6 (1 is always smaller of the two groups)
From table D.8, critical value = 28
Reject or Do not reject H0 ?
(The obtained value needs to be equal to or less than the critical value in
order to be statistically significant).

12

There is enough evidence to conclude that there is a difference in the


running time of boys and girls (The ranks in the two groups differed)
where 1 = 6, 2 = 6 = 24, = .015.
13

WILCOXON RANK SUM TEST


A study of early childhood education asked nursery school
pupils to retell a fairy tale that had been read to them earlier in
the week. There were 5 high -progress readers and 5 low progress readers. An expert listened to a recording of the
children and assigned a score for certain uses of languages.

High
Low

0.55
0.40

0.57
0.72

0.72
0.00

0.70
0.36

0.84
0.55

To what extent the scores of the high progress group are


significantly higher than those of the low progress group?

14

WILCOXON MATCHED-PAIRS SIGNED RANK


TEST
Can be used as an alternative to the paired -samples t-test
(dependent t-test) when the population cannot be assumed to be
normally distributed.
Assumption #1: The dependent variable should be measured at the
ordinal or continuous level. The independent variable should consist
of two categorical, "related groups" or "matched pairs.
Assumption #2: The data are paired and the differences come from
the same population.
Assumption #3: Each pair is chosen randomly and independent .
Assumption #4: The data need not be normally distributed, but the
distribution should be symmetric around the median.
15

WILCOXON MATCHED-PAIRS SIGNED RANK


TEST
A group of 10 students with chronic
anxiety receive sessions of cognitive
therapy. Quality of Life (QoL) scores
are measured before and after therapy.
Is there a dif ference on the QoL scores
after the cognitive therapy?
H0: = 0 (The median QoL scores is not different
before and after the cognitive therapy.
Ha: 0 (The median QoL scores is different
before and after the cognitive therapy).

QoL scores

Before

After

12

12

12

10
16

WILCOXON MATCHED-PAIRS SIGNED RANKS


TEST
Before

After

12

12

12

10

Difference, d

Sign

Absolute value

Rank

The Wilcoxon W+ statistic is the sum of the ranks of the positive differences: ??
The Wilcoxon W- statistic is the sum of the ranks of the negative differences: ??
17

WILCOXON MATCHED-PAIRS SIGNED RANKS


TEST
Before

After

Difference, d

Sign

Absolute value

Rank

-3

4.5

12

-7

-6

-5

-1

1.5

1.5

12

-4

-3

4.5

12

10

The Wilcoxon W+ statistic is the sum of the ranks of the positive differences: 1.5 + 3 = 4.5 .
The Wilcoxon W- statistic is the sum of the ranks of the negative differences: 1.5 + 4.5 + 4.5 + 6 + 7
+ 8 + 9 = 40.5
Whichever of these sums is the smaller, is our value of W. So, W = 4.5 (obtained value)
18

WILCOXON MATCHED-PAIRS SIGNED


RANK TEST

Critical value?
= 0.05, two tailed test
n= 10-1 = 9 (omitting 0 dif ference)
From table D.7, critical value = 5.0195

Reject or Do not reject H 0 ?


(The obtained value needs to be equal to or less than the
critical value in order to be statistically significant).

19

WILCOXON MATCHED-PAIRS SIGNED RANK


TEST

The distribution was symmetric around the median. The Wilcoxon matched-pairs
signed rank test determined that there was a statistically significant median
different before and after the cognitive therapy (W=4.5, p=.033).
20

WILCOXON MATCHED-PAIRS SIGNED RANK


TEST
A study of early childhood education asked nursery school pupils
to retell a fairy tale that had been read to them earlier in the
week. Each child told two stories. The rest had been read to
them, and the second had been read but also illustrated with
pictures. There were 5 low -progress readers. An expert listened to
a recording of the children and assigned a score for certain uses
of languages.

Child
1
2
3
4
5
Story 2 0.77 0.49 0.66 0.28 0.38
Story 1 0.40 0.72 0.00 0.36 0.55
Are the story 2 scores significantly higher than the story 1
scores?
21

KRUSKAL-WALLIS TEST
generally considered the nonparametric alternative to the one way ANOVA, which can be used when the data fail the
assumptions of the one -way ANOVA .
Assumption #1: The dependent variable is measured at
the continuous or ordinal level and the independent
variable consists of two or more categorical , independent
groups.
Assumption #2: You should have independence of obser vations ,
which means that there is no relationship between the
observations in each group of the independent variable or
between the groups themselves .
Assumption #3: The distribution of scores for each group of the
independent variable have the same shape. (N.B., having the
same shape also means having the same variability).
22

KRUSKAL-WALLIS TEST
The Kruskal-Wallis hypothesis test:
H 0 : All k populations have the same distribution.
H a : Not all k populations have the same distribution.
The Kruskal-Wallis test statistic:

where
n=sum of sample sizes
k=number of samples
R j =sum of ranks in the j th sample
n j =size of the j th sample
If each n j > 5, then H is approximately distributed as a 2 (Chisquare distribution).
23

KRUSKAL-WALLIS TEST
Do dif ferent departments have dif ferent class sizes?
Class size (Math)

Class size (English) Class size (History)

23

55

30

41

60

40

54

72

18

78

45

34

66

70

44

HO: MedianM = MedianE = MedianH


(The three departments have the same median class size)
Ha: Not all of the three department medians are equal.
24

KRUSKAL-WALLIS TEST
Group
M
M
M
M
M
E
E
E
E
E
H
H
H
H
H

Class size
23
41
54
78
66
55
60
72
45
70
30
40
18
34
44

Rank

Sum of group rank


for M =?
Sum of group rank
for E =?
Sum of group rank
for H=?

25

KRUSKAL-WALLIS TEST
Group
M
M
M
M
M
E
E
E
E
E
H
H
H
H
H

Class size
23
41
54
78
66
55
60
72
45
70
30
40
18
34
44

Rank
2
6
9
15
12
10
11
14
8
13
3
5
1
4
7

Sum of group rank


for M =?
Sum of group rank
for E =?
Sum of group rank
for H=?

26

KRUSKAL-WALLIS TEST
Group
M
M
M
M
M
E
E
E
E
E
H
H
H
H
H

Class size
23
41
54
78
66
55
60
72
45
70
30
40
18
34
44

Rank
2
Sum of group rank
6
for M =44
9
15
12
Sum of group rank
10
for E =56
11
14
8
13
3
Sum of group rank
for H =20
5
1
4
7
=

12
442
15(15+1) 5

562
5

202
5

3 15 + 1 = 6.72
27

KRUSKAL-WALLIS TEST
H=6.72 (Obtained value)
Critical value=?
=0.05, two tailed test
df=k-1=2
From chi-square dist. Table A .4, the critical value = 5.992
Reject or Do not reject H 0 ? (H is statistically significant if it is
larger than the critical value of Chi-Square)

If the null hypothesis in the Kruskal-Wallis test is rejected, then


we may wish, in addition, compare each pair of populations to
determine which are dif ferent and which are the same.
28

KRUSKAL-WALLIS TEST
Further Analysis (Pairwise Comparisons of Average Ranks)

The pairwise comparison test statistic :


D Ri R j
where Ri and R j is the mean of the ranks of the observations from
population i and j.
The critical point for the paired comparisons :
C KW

1
n(n 1) 1
( ,k 1 )

12 ni n j
2

Reject if D > C KW
29

KRUSKAL-WALLIS TEST
Pairwise Comparisons of Average Ranks
=

2 0.05,2

15(15 + 1) 1 1
+
12
5 5
2

5.992 (20)(5)

= 47.936 = 6.925

44
= 8.8
5
56
=
= 11.2
5
20
=
=4
5
=

, = 8.8 11.20 = 2.4


, = 11.20 4 = 7.2
, = 8.8 4 = 4.8

Reject if D > CKW

30

KRUSKAL-WALLIS TEST

Distributions of class size were similar for all groups, as assessed by visual inspection of a
boxplot. The medians of class size were statistically significantly different between the Math,
History and English departments , 2 (2) = 6.72, p = .035. The post hoc analysis revealed
statistically significant differences in the class size between the History and English (p =.033)
departments but not between the other group combinations.

31

Вам также может понравиться