10
Non-Parametric Tests PROS: Distribution free methods Appealing and intuitive Can be used for non-quantitative data CONS: Less efficient and powerful than parametric techniques (if both are applicable)

Non-Parametric Tests.ppt

Embed Size (px)

Citation preview

Page 1: Non-Parametric Tests.ppt

Non-Parametric TestsPROS:• Distribution free methods• Appealing and intuitive• Can be used for non-quantitative data

CONS:• Less efficient and powerful than parametric

techniques (if both are applicable)

Page 2: Non-Parametric Tests.ppt

What are we to take up?

• Sign Test• Signed Rank Test• Rank-Sum Test• Kruskal-Wallis Test• Runs Test

Page 3: Non-Parametric Tests.ppt

Sign Test• Used to test single population median or

difference of two population medians

H0: 0

~~

H1: (a) 0

~~ (b) 0

~~ (c) 0

~~

C.R. (a) All x values such that P(X x when p=1/2) <

(b) All x values such that P(X x when p=1/2) <

(c) if x < n/2, all x values such that 2P(X x when p=1/2) < or

if x > n/2, all x values such that 2P(X x when p=1/2) <

Page 4: Non-Parametric Tests.ppt

Sign TestComputation:

1. Replace each sample value > 0

~ with a + sign and each

sample value < 0

~ with a – sign.

2. Exclude sample values equal to 0

~ and reduce sample

size. 3. Solve for corresponding P from binomial distribution or

if n>10 and np = nq >5 use normal approximation (remember to adjust for continuity)

npqnpxz

Page 5: Non-Parametric Tests.ppt

Signed Rank Test• Utilizes direction and magnitude of

difference• Applies only for symmetric continuous

distributionT o t e s t H o H 1 C o m p u t e

0 w + 0

0 w -

0 w 21 w +

21 21 w -

21 w

Page 6: Non-Parametric Tests.ppt

Signed Rank TestC o m p u t a t i o n : 1 . S u b t r a c t 0 f r o m e a c h s a m p l e v a l u e 2 . D i s c a r d a l l d i f f e r e n c e s e q u a l t o z e r o 3 . R a n k t h e d i f f e r e n c e s r e g a r d l e s s o f s i g n . A s i g n r a n k o f 1 t o s m a l l e s t a b s o l u t e d i f f e r e n c e . W h e n t h e a b s o l u t e v a l u e o f 2 o r m o r e d i f f e r e n c e s i s t h e s a m e , a s s i g n t o e a c h t h e a v e r a g e o f t h e r a n k s t h a t w o u l d h a v e b e e n a s s i g n e d i f t h e d i f f e r e n c e s w e r e d i s t i n g u i s h a b l e .

4 . S u m u p t h e r a n k s o f a l l p o s i t i v e d i f f e r e n c e s ( w + ) a n d a l l n e g a t i v e d i f f e r e n c e s ( w - ) . L e t w = m i n { w + , w - } .

5 . F o r 5 n 3 0 , C . R . i s w v a l u e s f r o m T a b l e A . 1 6

U s e a l s o f o r p a i r e d o b s e r v a t i o n s . W h e n n > 1 5 i s , u s e n o r m a l a p p r o x i m a t i o n ( r e m e m b e r t o a d j u s t f o r c o n t i n u i t y )

4)1(

nn

w 24

)12)(1(2

nnnw

w

wwz

Page 7: Non-Parametric Tests.ppt

Rank Sum Test• For non-normal independent samples

T o te s t H o H 1 C o m p u te

21 U 1

21 21 U 2

21 u

Computation: 1. Let n1 be the smaller sample size and n2 the larger sample size 2. Arrange the n1 + n2 observations of the combined samples in ascending order 3. Substitute a rank of 1,2, ... n1+n2 fpr each observation 4. Sum up the ranks corresponding to the n1 observations (W1 ) and the ranks corresponding to the n2 observations (W2)

Page 8: Non-Parametric Tests.ppt

Rank Sum Test5. Compute

6. Let u = min {U1, U2}

7. For C.R. , u values from Table A.17 . When both n1 and n2 > 8, use normal approximation

Page 9: Non-Parametric Tests.ppt

Kruskal Wallis TestU s e t o t e s t e q u a l i t y o f k > 2 p o p u l a t i o n m e a n s G e n e r a l i z a t i o n o f t h e r a n k - s u m t e s t f o r k > 2 s a m p l e s H O : k i n d e p e n d e n t s a m p l e s a r e f r o m i d e n t i c a l p o p u l a t i o n s H 1 : T h e k m e a n s a r e n o t a l l e q u a l C . R . H > 2 w i t h v = k - 1 C o m p u t a t i o n :

1 . C o m b i n e a l l k s a m p l e s ( w i t h a t l e a s t 5 o b s e r v a t i o n s e a c h ) a n d a r r a n g e i n a s c e n d i n g o r d e r 2 . S u b s t i t u t e a p p r o p r i a t e r a n k f r o m 1 , 2 , . . . , n f o r e a c h o b s e r v a t i o n 3 . S u m u p r a n k s c o r r e s p o n d i n g t o t h e n , o b s e r v a t i o n s i n t h e i t h s a m p l e s ( R , ) 4 . C o m p u t e

)1(3)1(

121

2

n

nr

nnh

k

i i

i

Page 10: Non-Parametric Tests.ppt

Runs TestB a s e d o n t h e o r d e r i n w h i c h t h e s a m p l e o b s e r v a t i o n s a r e o b t a i n e d

R u n - a s u b s e q u e n c e o f o n e o r m o r e i d e n t i c a l s y m b o l s r e p r e s e n t i n g a c o m m o n p r o p e r t y o f t h e d a t a

H O : o b s e r v a t i o n s h a v e b e e n d r a w n a t r a n d o m C . R . A l l v s u c h t h a t P ( V v w h e n H o i s t r u e ) < / 2 o r A l l v s u c h t h a t P ( V v w h e n H o i s t r u e ) < / 2 C o m p u t a t i o n

1 . L e t n 1 b e t h e s m a l l e r s a m p l e s i z e a n d n 2 b e t h e l a r g e r s a m p l e s i z e w i t h n = n 1 + n 2 2 . F o r n 1 & n 2 1 0 , u s e T a b l e A . 1 8 . C h e c k i f v < v o r v > v t o d e t e r m i n e w h i c h C R t o u s e . C a n b e u s e d a s a n a l t e r n a t i v e t o t h e W i l c o x o n t w o - s a m p l e t e s t

1 . C o m b i n e o b s e r v a t i o n s f r o m b o t h s a m p l e s a n d a r r a n g e t h e m i n a s c e n d i n g o r d e r 2 . A s s i g n l e t t e r A t o e a c h o b s e r v a t i o n t a k e n f r o m o n e o f t h e p o p u l a t i o n s a n d l e t t e r B t o t h e o t h e r . W h e n n 1 a n d n 2 i n c r e a s e i n s i z e ( n 1 & n 2 > 1 0 ) n o r m a l a p p r o x i m a t i o n c o u l d b e u s e d

12

21

21

nn

nnv

)1()()2(2

212

21

2121212

nnnn

nnnnnnv