non-parametric test. statistical tests fall into two categories: (i) parametric tests (ii)...

26
NON-PARAMETRIC TEST

Upload: alexandre-clayborn

Post on 30-Mar-2015

252 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

NON-PARAMETRIC TEST

Page 2: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Statistical tests fall into two categories:

(i) Parametric tests

(ii) Non-parametric tests

Page 3: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

The parametric tests make the following assumptions

• the population is normally distributed;

• homogeneity of variance

If any or all of these assumptions are untrue

• then the results of the test may be invalid.

• it is safest to use a non-parametric test.

Page 4: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

ADVANTAGES OF NON-PARAMETRIC TESTS

• If the sample size is small there is no alternative

• If the data is nominal or ordinal

• These tests are much easier to apply

Page 5: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

DISADVANTAGES OF NON-PARAMETRIC TESTS

i) Discard information by converting to ranks

ii) Parametric tests are more powerful

iii) Tables of critical values may not be easily

available.

iv) It is merely for testing of hypothesis and no

confidence limits could be calculated.

Page 6: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Non-parametric testsNon-parametric tests Note: When valid, use parametricNote: When valid, use parametric Commonly usedCommonly used

Wilcoxon signed-rank testWilcoxon signed-rank test

Wilcoxon rank-sum testWilcoxon rank-sum test

Spearman rank correlationSpearman rank correlation

Chi square etc.Chi square etc. Useful for non-normal dataUseful for non-normal data If possible use some transformation If possible use some transformation If normalization not possibleIf normalization not possible Note: CI interval -difficult/impossibleNote: CI interval -difficult/impossible

Page 7: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

?

Page 8: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Wilcoxon signed rank testWilcoxon signed rank test

To test difference between To test difference between paired datapaired data

Page 9: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

PatientPatient

Hours of sleepHours of sleep

DrugDrug PlaceboPlacebo

11 6.16.1 5.25.2

22 7.07.0 7.97.9

33 8.28.2 3.93.9

44 7.67.6 4.74.7

55 6.56.5 5.35.3

66 8.48.4 5.45.4

77 6.96.9 4.24.2

88 6.76.7 6.16.1

99 7.47.4 3.83.8

1010 5.85.8 6.36.3

EXAMPLE

Null Hypothesis: Hours of sleep are the same using placebo & the drug

Page 10: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

STEP 1STEP 1 Exclude any differences which are zeroExclude any differences which are zero

Ignore their signsIgnore their signs

Put the rest of differences in ascending orderPut the rest of differences in ascending order

Assign them ranksAssign them ranks

If any differences are equal, average their If any differences are equal, average their ranksranks

Page 11: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

STEP 2STEP 2

Count up the ranks of +ives as TCount up the ranks of +ives as T++

Count up the ranks of –ives as TCount up the ranks of –ives as T--

Page 12: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

STEP 3STEP 3 If there is no difference between drug (TIf there is no difference between drug (T++) )

and placebo (Tand placebo (T--), then T), then T+ + & T& T- - would be similarwould be similar

If there is a difference If there is a difference one sum would be much smaller and one sum would be much smaller and the other much larger than expectedthe other much larger than expected

The larger sum is denoted as TThe larger sum is denoted as T

T = larger of TT = larger of T+ + and Tand T- -

Page 13: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

STEP 4STEP 4 Compare the value obtained with the Compare the value obtained with the

critical values (5%, 2% and 1% ) in tablecritical values (5%, 2% and 1% ) in table

N is the number of differences that N is the number of differences that were ranked (were ranked (not the total number of not the total number of differencesdifferences))

So the zero differences are excludedSo the zero differences are excluded

Page 14: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

PatientPatient

Hours of sleepHours of sleep

DifferenceDifferenceRankRank

Ignoring signIgnoring signDrugDrug PlaceboPlacebo

11 6.16.1 5.25.2 0.90.9 3.5*3.5*

22 7.07.0 7.97.9 -0.9-0.9 3.5*3.5*

33 8.28.2 3.93.9 4.34.3 1010

44 7.67.6 4.74.7 2.92.9 77

55 6.56.5 5.35.3 1.21.2 55

66 8.48.4 5.45.4 3.03.0 88

77 6.96.9 4.24.2 2.72.7 66

88 6.76.7 6.16.1 0.60.6 22

99 7.47.4 3.83.8 3.63.6 99

1010 5.85.8 6.36.3 -0.5-0.5 11

3rd & 4th ranks are tied hence averaged; T= larger of T+ (50.5) and T- (4.5)

Here, calculated value of T= 50.5; tabulated value of T= 47 (at 5%)

significant at 5% level indicating that the drug (hypnotic) is more effective than placebo

Page 15: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Wilcoxon rank sum testWilcoxon rank sum test

To compare two groupsTo compare two groups

Consists of 3 basic stepsConsists of 3 basic steps

Page 16: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Non-smokers (n=15)Non-smokers (n=15) Heavy smokers (n=14)Heavy smokers (n=14)Birth wt (Kg)Birth wt (Kg)

3.993.99

3.793.79

3.60*3.60*

3.733.73

3.213.21

3.60*3.60*

4.084.08

3.613.61

3.833.83

3.313.31

4.134.13

3.263.26

3.543.54

3.513.51

2.712.71

Birth wt (Kg)Birth wt (Kg)

3.183.18

2.842.84

2.902.90

3.273.27

3.853.85

3.523.52

3.233.23

2.762.76

3.60*3.60*

3.753.75

3.593.59

3.633.63

2.382.38

2.342.34

Null Hypothesis: Mean birth weight is same between non-smokers & smokers

Page 17: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Step 1Step 1

Rank the data of both the groups in Rank the data of both the groups in ascending orderascending order

If any values are equal, average their If any values are equal, average their ranksranks

Page 18: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Step 2Step 2

Add up the ranks in the group with Add up the ranks in the group with smaller sample sizesmaller sample size

If the two groups are of the same size If the two groups are of the same size either one may be pickedeither one may be picked

T= sum of ranks in the group with T= sum of ranks in the group with smaller sample sizesmaller sample size

Page 19: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Step 3Step 3 Compare this sum with the critical Compare this sum with the critical

ranges given in tableranges given in table

Look up the rows corresponding to Look up the rows corresponding to the sample sizes of the two groupsthe sample sizes of the two groups

A range will be shown for the 5% A range will be shown for the 5% significance levelsignificance level

Page 20: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Non-smokers (n=15)Non-smokers (n=15) Heavy smokers (n=14)Heavy smokers (n=14)Birth wt (Kg)Birth wt (Kg) RankRank Birth wt (Kg)Birth wt (Kg) RankRank3.993.99 2727 3.183.18 773.793.79 2424 2.842.84 553.60*3.60* 1818 2.902.90 663.733.73 2222 3.273.27 11113.213.21 88 3.853.85 26263.60*3.60* 1818 3.523.52 14144.084.08 2828 3.233.23 993.613.61 2020 2.762.76 443.833.83 2525 3.60*3.60* 18183.313.31 1212 3.753.75 23234.134.13 2929 3.593.59 16163.263.26 1010 3.633.63 21213.543.54 1515 2.382.38 223.513.51 1313 2.342.34 112.712.71 33

Sum=272Sum=272 Sum=163Sum=163

* 17, 18 & 19are tied hence the ranks are averagedHence caculated value of T = 163; tabulated value of T (14,15) = 151

Mean birth weights are not same for non-smokers & smokers they are significantly different

Page 21: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Spearman’s Rank Correlation Coefficient

• based on the ranks of the items rather than actual values. • can be used even with the actual values

Examples • to know the correlation between honesty and wisdom of the boys of a class.

• It can also be used to find the degree of agreement between the judgements of two examiners or two judges.

Page 22: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

R (Rank correlation coefficient) =   

D = Difference between the ranks of two itemsN = The number of observations.Note:    -1 R 1.

i)    When R = +1 Perfect positive correlation or complete  agreement in the same direction

ii)    When R = -1 Perfect negative correlation or complete agreement in the opposite direction.

iii) When R = 0 No Correlation.

Page 23: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

Computation

   i.       Give ranks to the values of items.

Generally the item with the highest value is

ranked 1 and then the others are given ranks 2,

3, 4, .... according to their values in the

decreasing order.

   ii.     Find the difference D = R1 - R2

where R1 = Rank of x and R2 = Rank of y

Note that ΣD = 0 (always)

   iii.     Calculate D2 and then find ΣD2

   iv.     Apply the formula.

Page 24: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

If there is a tie between two or more items.

Then give the average rank. If m be the number of items of

equal rank, the factor 1(m3-m)/12 is added to ΣD2. If there

is more than one such case then this factor is added as

many times as the number of such cases, then

Page 25: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests

StudentNo.

Rank in

Maths (R1)

Rank in

Stats (R2)

R1 - R2

D

(R1 - R2 )2

D2

1 1 3 -2 4

2 3 1 2 4

3 7 4 3 9

4 5 5 0 0

5 4 6 -2 4

6 6 9 -3 9

7 2 7 -5 25

8 10 8 2 4

9 9 10 -1 1

10 8 2 6 36

N = 10     Σ D = 0 Σ D2 = 96

Page 26: NON-PARAMETRIC TEST. Statistical tests fall into two categories: (i) Parametric tests (ii) Non-parametric tests