Vous êtes sur la page 1sur 22

Non Parametric Methods

Definition :
A statistical method is nonparametric (or distribution free
methods) if it satisfies at least one of the following criteria:
1. The method may be used on data with a nominal scale
of measurement.
2. The method may be used on data with an ordinal scale
of measurement.
3. The method my be used on data with an interval or
ratio scale of measurement, where the distribution
function of the random variable producing the data is
either unspecified or specified except for an infinite
number of unknown parameters.
I. Unpaired observations
1. Chi square test
a. Table 2 x 2 (fourfold table)

Cured Not cured Total


-------------------------------------------------------------
Treat I a b a+b
Treat II c d c+d
-------------------------------------------------------------
Total a+c b+d N = a+b+c+d

N (|ad-bc| - 0.5 N)2


2 = df = 1
(a+b) (c+d) (a+c) (b+d) 2 0.95 (1) = 3.84
Correlation test :
 (phi) =  2 / N
C (contingency) =  2 / N+ 2
b. Table r x c

Cured Not cured Total


-------------------------------------------------------------
Treat I a b a+b
Treat II c d c+d
Treat III e f e+f
Treat IV g h g+h
-------------------------------------------------------------
Total T1 T2 N

2 =  ( O - E)2  E df = (r-1) (c-1)

Signif :
2 (calc) > 2 (0.95) df:(r-1)(c-1)
2. Fisher’s exact test (2 x 2)
When the sample is not large and expected values are
less than 5.
Survived Died Total
-----------------------------------------------------
Treat A a b a+b
Treat B c d c+d
-----------------------------------------------------
Total a+c b+d N
-----------------------------------------------------

(a+b) (c+d) ) (a+c)  (b+d) 


Σ p = ---------------------------------------
Nabcd
Example :
a).
Survived Died Total
-----------------------------------------------------
Treat A 10 0 10
Treat B 4 5 9
-----------------------------------------------------
Total 14 5 19
-----------------------------------------------------

10  9   14  5 
p = ----------------------- = 0.0108
19  10  0  4  5 
b).
Survived Died Total
-----------------------------------------------------
Treat A 3 1 4
Treat B 2 2 4
-----------------------------------------------------
Total 5 3 8

Possible tables for the totals of table :


1. 2.
Survived Died Total Survived Died Total
----------------------------------------------- ----------------------------------
Treat A 3 1 4 4 0 4
Treat B 2 2 4 1 3 4
----------------------------------------------- ----------------------------------
Total 5 3 8 5 3 8
4453 4 4 5 3 
p1 = ---------------------- = 0.429 p2 = ---------------------- = 0.071
83122 84013
p = p + p = 0.50 (one-tailed)
3. Kolmogorov-Smirnov 2-sample test
Data : Frequencies
Scale : ordinal - rankable categories
- rankable scores
Example :
Study results
--------------------------------------------------------------------------
Treatment Excellent Good Fair No change Total
--------------------------------------------------------------------------
Freq : I 4 8 5 3 20
II 2 8 4 2 16
--------------------------------------------------------------------------
Cumulative I 4 12 17 20
frequencies: II 2 10 14 16
--------------------------------------------------------------------------
Cumulative I 4/20 12/20 17/20 20/20
Proportions : II 2/16 10/16 14/16 16/16
--------------------------------------------------------------------------
diff d : 0.075 -0.025 -0.025 0
--------------------------------------------------------------------------
D = d max  = 0.075
H0 : F1(x) = F2(x)
(The population distribution functions are identical)

Decision rule : Reject H0 at the level  if D > D table (critical table)

Critical value of D in K-S 2 sample test


------------------------------------------------------------------------
2- tailed 1-tailed Critical values of D
------------------------------------------------------------------------
10 % 5% 1.22  (n1+n2)/n1xn2

5% 2.5 % 1.36  (n1+n2)/n1xn2

1% 0. 5 % 1.63  (n1+n2)/n1xn2
-------------------------------------------------------------------------

Untuk  = 5 % ==> D = 1.36  (20+16)/20x16 = 0.456


D maks = 0.075 < D table ==> H0 is accepted
4. Mann-Whitney U test
- Wilcoxon 2-sample test
- Wilcoxon rank-sum test
Data : rankable scores
unrelated (independent samples)
Suppose a sample of n1 observations is to be compared
with n2 observations. Let n1 be the smaller sample size.
Method :
1. Rank all the (n1+ n2 ) observations in a single array in such
a way as the two samples can still be identified.
2. Add the ranks of the observations in the first sample and
add the ranks in the second sample.
3. Set T1 equal to the sum of the n1 ranks of the smaller
sample, and T1’ = n1 (n1+ n2+1) - T1. Finally T is equal to
the smaller of T1 and T1’.
4. Compare T with critical value of T.
5. Decision rule : if T < T table (Mann-Whitney U test) ==>
H0 is rejected.
Example :

Treatment I Treatment II H0 : 1 = 2
10 (3) 11 (4.5)
9 (2) 15 (8.5)
15 (8.5) 13 (7)
11 (4.5) 12 (6)
8 (1)
----------------------------------------
n1 = 4 n2 = 5
T1 = 18 T2 = 27
T1’ = n1(n1+n2+1) - T1 = 4(4+5+1) - 18 = 22.

and T = 18 (the smaller of T1 and T1’).


From Table T : n1=4; n2 = 5; and  = 5% ==> T = 11.
Conclusion : T (calc) = 18 > T (table) = 11  H0 is accepted.
5. Kruskal - Wallis Test (Rank analysis of variance)

Data : Rankable scores


Unrelated (Independent groups)
> 2 groups

Example :
Group (Treatment)
Group 1 Group 2 Group 3 Group 4
---------------------------------------------------------------
14.10 11.00 9.65 10.53
10.75 9.73 10.05 10.71
9.41 11.31 11.75 11.43
10.65 13.89 11.06 8.99
11.49 12.10 10.51 9.02
13.55 10.31 10.22
11.11 11.86 13.03
13.49 10.49
11.34
Computations : The ranks of the data are as follows :

Group 1 Group 2 Group 3 Group 4


-----------------------------------------------------------------
29 15 4 11
14 5 6 13
3 18 22 20
12 28 16 1
21 24 10 2
27 8 7
17 23 25
26 9
19
---- ---- ---- ----
Total 149 121 58 107
Rank
Null hypothesis : H0 : 1 = 2 = 3 = 4
Alternative hypothesis : H1 : Not all equal
Test statistic :

K = 2 K-W = { 12/N (N+1)  Ri2 / ni  - 3 (N+1)

= 12/29 (30) {1492/8 + 1212/7 + 582/5 + 1072/9  - 3 (30)


= 3.953

Decision rule for  = 5 % level test :


Reject H0 if K > 2 0.95 (3)
From 2 table  2 0.95 (3) = 7.81; and K = 3.953 , there is
not sufficient evidence to reject H0 at the 5 % level.
Lesson 8b : Non Parametric Methods (Paired
observations)

1. Wilcoxon signed rank test


2. Friedman test
3. Spearman’s rank correlation coefficient
1. Wilcoxon signed rank test

Data : rankable scores


related (matched samples)
H0 : there is no difference ....
H1 : there is a difference .....
Example :
-------------------------------------------------------------------------
Pairs 1 2 3 4 5 6 7 8 9 10
-------------------------------------------------------------------------
Before 9 10 4 19 13 12 8 13 6 12
After 6 7 3 20 4 10 7 11 5 9
-------------------------------------------------------------------------
diff 3 3 1 -1 9 2 1 2 1 3
rank|d| 8 8 2,5 2.5 10 5.5 2.5 5.5 2.5 8
-------------------------------------------------------------------------
Note : ignoring zero difference)
Compute the sum T of the rank numbers of the signed
differences.

T- = 2.5 and T+ = 52.5.

T = 2.5 (the smaller of T- and T+ ) and compare with the


critical values of T (table Wilcoxon signed rank test).
For n = 10 and  = 5 % T table = 8
 = 1 % T table = 3
Decision : since T calc = 2.5 < T table ( = 1 % ) ---> H0 is
rejected (highly significant).
Table : Wilcoxon signed rank test. Critical value of T at
difference levels of significance (two tailed test)
------------------------------------------------------------------------
n 2 = 5 % 2 = 1 % n 2 = 5 % 2 = 1 %
------------------------------------------------------------------------
6 0 - 16 30 20
7 2 - 17 35 23
8 4 0 18 40 28
9 6 2 19 46 32
10 8 3 20 52 38
11 11 5 21 59 43
12 14 7 22 66 49
13 17 10 23 73 55
14 21 13 24 81 61
15 25 16 25 89 68
-------------------------------------------------------------------------
2. Friedman Test (Anova : 2 way related)
Data : Rankable scores
Related (matched groups) > 2 group

Example :
Treatment
------------------------------------------------------------
Block 1 2 3 4
--------------------------------------------------------------------------
1 41 (1) 61 (3) 62 (4) 43 (2)
2 48 (1.5) 68 (4) 62 (3) 48 (1.5)
3 53 (1.5) 70 (4) 66 (3) 53 (1.5)
4 56 (2) 72 (4) 70 (3) 52 (1)
--------------------------------------------------------------------------
Total rank 6 15 13 6
Mean rank 1.5 3.75 3.25 1.5
The Friedman test statistic is :
12
Q = ----------- (  Ri+2 ) - 3 n (g +1)
ng (g+1)

Decision : Reject H0 if Q is greater than 21- (df = g-1).


From the data :
12
Q = ----------- (62 + 152 + 132 + 62 ) - 3 (4) (5) = 9.9
(4)(4) (5)
For  = 5 %; df = 3 ----> 2 (table) = 7.81
 = 1 %; df = 3 ----> 2 (table) = 11.34
Conclusion : Q = 9.9 > 7.81 and < 11.34 ---> the null
hypothesis is rejected (Highly significant).
3. Spearman’s rank Correlation coefficient

The procedure is used in one or more of the following


cases :
(i) the n pairs of sample observations (x1,y1), (x2,y2), (x3,y3),
... (xn,yn).do not come from a bivariate normal
distribution
(ii) at least one of the variables x and y is measured on an
ordinal (rabked) scale
(iii) a measure is required which does not rely on the concept
of closeness to linear regression.
Definition :
Spearman’s rank correlation coefficient, S, is estimated in a
random sample of n pairs of observations (x1,y1), (x2,y2), ...
(xn,yn) by :
r S = 1 - 6  di2 / n(n2 - 1)
Example :
Behavior ratings for 10 Hyperactive Children
------------------------------------------------------------------------
Child In school At home Rank Rank di di2
(X) (Y) (X) (Y)
------------------------------------------------------------------------
1 89 88 10 9 1 1
2 64 71 6 6 0 0
3 46 54 2 5 -3 9
4 59 45 4 2 2 4
5 72 76 7 7 0 0
6 30 40 1 1 0 0
7 79 83 8 8 0 0
8 60 53 5 4 1 1
9 56 46 3 3 0 0
10 88 92 9 10 -1 1
-------------------------------------------------------------------------
di 2 = 16

rS = 1 - {6 (16)/(10) (99)} = 0.903.


This strongly suggests a positive rank order relationship
between X and Y. In order to determine if the correlation
differs significantly from zero, the formula for this test
statistic is :
rs  n -2
t = ----------
 1-rs2
Which has an approximate t distribution with n - 2 degress of
freedom when the null hypothesis of no association is true.

Vous aimerez peut-être aussi