Download - Non-parametric tests
Non-parametric testsNon-parametric tests Note: When valid use parametricNote: When valid use parametric Commonly usedCommonly used
WilcoxonWilcoxon
Chi square etc.Chi square etc. Performance comparable to Performance comparable to
parametricparametric Useful for non-normal dataUseful for non-normal data If normalization not possibleIf normalization not possible Note: CI Note: CI
derivation-difficult/impossiblederivation-difficult/impossible
Wilcoxon signed rank testWilcoxon signed rank test
To test difference between To test difference between paired datapaired data
STEP 1STEP 1 Exclude any differences which are Exclude any differences which are
zerozero
Put the rest of differences in Put the rest of differences in ascending orderascending order
Ignore their signsIgnore their signs
Assign them ranksAssign them ranks
If any differences are equal, average If any differences are equal, average their rankstheir ranks
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--
STEP 3STEP 3 If there is no difference between drug If there is no difference between drug
(T(T++) and placebo (T) and placebo (T--), then T), then T+ + & T& T- - would would be similarbe similar
If there were a difference If there were a difference one sum would be much smaller and one sum would be much smaller and
the other much larger than the other much larger than
expectedexpected
The smaller sum is denoted as TThe smaller sum is denoted as T
T = smaller of TT = smaller of T+ + and Tand T- -
STEP 4STEP 4 Compare the value obtained with Compare the value obtained with
the critical values (5%, 2% and the critical values (5%, 2% and 1% ) in table1% ) in table
N is the number of differences N is the number of differences that were ranked (that were ranked (not the total not the total number of differencesnumber of differences))
So the zero differences are So the zero differences are excludedexcluded
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= smaller of T+ (50.5) and T- (4.5)
Here T=4.5 significant at 2% level indicating the drug (hypnotic) is more effective than placebo
Wilcoxon rank sum testWilcoxon rank sum test
To compare two groupsTo compare two groups
Consists of 3 basic stepsConsists of 3 basic steps
Non-parametric equivalent of Non-parametric equivalent of t testt test
Step 1Step 1
Rank the data of both the groups Rank the data of both the groups in ascending orderin ascending order
If any values are equal average If any values are equal average their rankstheir ranks
Step 2Step 2
Add up the ranks in group with Add up the ranks in group with smaller sample sizesmaller sample size
If the two groups are of the If the two groups are of the same size either one may be same size either one may be pickedpicked
T= sum of ranks in group with T= sum of ranks in group with smaller sample sizesmaller sample size
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
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 averaged