Non Parametric Test
1. Wilcoxon Signed Rank Test: (WSRT)
In this test the difference in positive and negative value is taken into consideration without assigning any weightage to the magnitude of the differences as a result, the sign test is often used in practice.
The Wilcoxon Sign Rank test can be used to overcome this limitation.
2. Wilcoxon Rank Sum test: (WRST)
This is also called as Mann- Whitney U test.
WRST is used to compare two independent sample while WSRT compare two related or two dependent samples.
This test is applicable if the data are at least ordinal {i.e. the observation can be ordered}
3. MANN-WHITNEY U-TEST
It is a non-parametric method used to determine whether two independent samples have been drawn from populations with same distribution. This test is also known as U-Test.
This test enables us to test the null hypothesis that both population medians are equal(or that the two samples are drawn from a single population).
4. KRUSKAL WALLIS TEST
This test is employed when more then 2 population are involved where as Man Whitney test is used when there are 2 populations. The use of this test will enable us to determine weather independent samples have been drawn from the sample population (or) different populations have the same distribution.
5. FRIEDMAN TEST
It is a non-parametric test applied to a data i.e. at least ranked and it is in the form of a 2 way ANOVA design. This test which may be applied to ranked or Interval or Ratio type of data is used when more than 2 treatment, group are included in the experiment.
1. BIOSTATISTICS AND RESEARCH METHODOLOGY
Unit-3: non - parametric tests
PRESENTED BY
Himanshu Rasyara
B. Pharmacy IV Year
UNDER THE GUIDANCE OF
Gangu Sreelatha M.Pharm., (Ph.D)
Assistant Professor
CMR College of Pharmacy, Hyderabad.
email: sreelatha1801@gmail.com
2. NON- PARAMETRIC TEST
I. Wilcoxon Signed Rank Test: (WSRT)
In this test the difference in positive and negative value is taken into consideration without assigning any
weightage to the magnitude of the differences as a result, the sign test is often used in practice.
The Wilcoxon Sign Rank test can be used to overcome this limitation.
It is used to compare 2 samples from population that are not independent and also it attacks greater
weightage to each pair of observation.
This test is used to evaluate in the underlying population of differences among pairs, come from a
population having median zero.
This test is also useful to compare 2 treatments or 2 drugs, in a paired design we have to consider the null
& alternative.
II. Wilcoxon Rank Sum test: (WRST)
This is also called as Mann- Whitney U test.
WRST is used to compare two independent sample while WSRT compare two related or two dependent
samples.
This test is applicable if the data are at least ordinal {i.e. the observation can be ordered}.
This test procedure tells about the quantity of distribution of two treatments, so this procedure tests for
both location and spread of distribution.
3. • Results of dissolution test using original dissolution apparatus & a modified apparatus [Amount
dissolved in 30 min].
Original Apparatus
Amount Dissolved Ranked
53 3
61 14
57 9
50 1
63 17
62 15.5
54 4
52 2
59 12.5
57 9
64 18.5
Total 105.5
Modified Apparatus
Amount Dissolved Ranked
58 11
55 5.5
67 21
62 15.5
55 5.5
64 18.5
66 20
59 12.5
68 22
57 9
69 23
56 7
Total 170.5
4. The objective of the experiment is to compare the performance of the two pieces of apparatus.
12 individual tablets were used for each treatment. The amount of drug dissolved in 30 min was
determined for each tablet.
The original apparatus have 4 smallest values 50,52,53,54, which are ranked 1,2,3,4 respectively.
The next two highest values are from modified apparatus. Both equal to 55. These values are both given
the average value of 5&6 equal to 5.5.
The next value is 56 from the modified apparatus is 7.
The next higher value is 57 which occurs twice in original once in modified. These are each given a rank
of 9.
Z=
[𝐓−
𝐍𝟏 𝐍𝟏+𝐍𝟐+𝟏
𝟐
]
𝐍𝟏𝐍𝟐 𝐍𝟏+𝐍𝟐+𝟏 /𝟏𝟐
Where N1= Smaller sample size
N2= Larger sample size
T= Sum of ranks for smaller sample size.
If 2 is greater then or equal to 1.96, the 2 treatments
can be said to be significantly differentiated at 5% level
[2 sided test]
Z =
[𝟏𝟎𝟓.𝟓 −
𝟏𝟏 𝟏𝟏+𝟏𝟐+𝟏
𝟐
]
𝟏𝟏∗𝟏𝟐(𝟏𝟏+𝟏𝟐+𝟏)/𝟏𝟐
=
[𝟏𝟎𝟓.𝟓−
𝟏𝟏 𝟐𝟒
𝟐
]
𝟏𝟑𝟐(𝟐𝟒)/𝟏𝟐
=
𝟏𝟎𝟓.𝟓−𝟐𝟔𝟒 /𝟐
𝟑𝟏𝟔𝟐/𝟏𝟐
=
𝟐𝟔.𝟓
𝟏𝟔.𝟐
=1.60
Conclusion: A value of Z equal to 1.63 is not large enough to show
significance in a 2 sided test at 5% level. Therefore, these data do not
provide sufficient evidence to show that the 2 different pieces of
averages give different dissolution result.
5. MANN-WHITNEY U-TEST
• It is a non-parametric method used to determine whether two independent samples have been drawn
from populations with same distribution. This test is also known as U-Test.
• This test enables us to test the null hypothesis that both population medians are equal(or that the two
samples are drawn from a single population).
• This method helps us to determine whether the two samples have come from identical populations. If it
is true that the samples have come from the same population, it is reasonable to assume that the medians
of ranks assigned to the values of two samples are more or less the same.
• The alternative hypothesis H1would be ; that the medians of the populations are not equal.
• In this case, most of the smaller ranks will go to the values of one sample,while most of the higher ranks
will go to the other sample.
• This test involves the calculation of a statistic usually called U, whose distribution under the null
hypothesis is known.
• In case of small samples (i.e., when the sample size is less than 8), the distribution is tabulated but for
samples above 8, there is good approximation using the normal distribution.
6. Working Method:
1. Set the Null hypothesis Ho& alternative hypothesis H1.
Ho is applied when both median are equal.
H1 is applied when both population medians are not equal(in case of 2 tailed test).
2. Combine all the samples values in an assay from smallest to the largest, assign ranks to all these values.
If two or more sample values are identical (i.e. Tie Scores) the sample values are each assigned a rank
equal to mean of ranks that would otherwise be assigned.
3. Find the sum of ranks for each of the samples. Let us denote these sums by R1 & R2. Also n1 & n2are the
respective sample size. For convenience choose n1 as the smaller size if they are unequal. A significant
difference between rank sums R1 & R2, implies a significant difference between samples.
4. Calculation of U statistics to test the difference between the rank sums.
U statistic: U1= n1n2+ n1(n1+1)/2-R1(Corresponding to sample 1)
U2= n1n2+ n2(n2+1)/2-R2( Corresponding to sample 2).
The sampling distribution if U is symmetrical and has a mean & variance given by formula
Mean= μu= n1n2/2
Variance=αu = 𝒏𝟏𝒏𝟐(𝒏𝟏 + 𝒏𝟐 + 𝟏)/𝟏𝟐
If n1& n2are both at least to 8, it turns out that the distribution of U is nearly normal & one could use the
statistic set where Z= U- μu/S.E (U) or αu, is normally distributed with mean 0 and variance 1.
7. 5. Level of Significance:
Take α= 0.05
6. Critical region: Accept Ho if |Z|< |Zα|, where Zα is tabulated value of Z & Z is the given level of
significance α.
EXAMPLE:
In a hospital, a group of 12 patients with medicine A weight55,60,62,50,49,44,52,56,61,60,54 & 60.
Another group of 15 patients from same hospital treated with medicine B which weighs
60,43,50,51,62,65,51,50,49,47,54,51,50,52 & 60. Do you agree with the claim that medicine B is more
effective in increasing the weight significantly.
SOLUTION:
• Setting up the hypothesis:
• Null hypothesis: H0 : Both the medicines are giving same results.
• Alternative hypothesis: H1: Medicine ‘B’ is more effective.
• Pool both the samples and rank them.
• Level of Significance α = 0.05
• Calculate sum of ranks
• R1 = Sum of ranks of medicine A
• 2+4.5+7.5+13.5+15.5+17+18+21+21+21+24+25.5 = 190.5
• R2 = Sum of ranks of medicine B
• 1+3+4.5+7.5+7.5+ 7.5+11+11+11+13.5+15.5+21+21+25.5+27 = 187.5
8. A Ranks
44 2
49 4.5
50 7.5
52 13.5
54 15.5
55 17
56 18
60 21
60 21
60 21
61 24
62 25.5
Total 190.5
B Ranks
43 1
47 3
49 4.5
50 7.5
50 7.5
50 7.5
51 11
51 11
51 11
52 13.5
54 15.5
60 21
60 21
62 25.5
65 27
Total 187.5
R1 + R2 = 378
U2 = 𝑛1𝑛2 +
𝑛2(𝑛2+1)
2
− 𝑅2 = 12 × 15 +
15(15+1)
2
- 187.5 = 180 +
240
2
- 187.5
= 180+120-187.5 = 300 – 187.5 = 112.5
Mean= μu2 = n1n2/2 =
12×15
2
=
180
2
= 9
Standard Deviatation: αu2 = 𝑛1𝑛2(𝑛1 + 𝑛2 + 1)/12
(12)(15)(28)
12
=
5040
12
= 420 = 20.49
Test statistic: 𝑧 =
𝑈2 − 𝜇𝑈2
𝜎𝑈2
=
112.5−90
20.49
=
22.5
20.49
= 1.10.
Conclusion: The absolute critical value of z at 5% level of significance
is 1.645. The absolute value of z(1.10) is less than the tabulated value
of z. Hence, the null hypothesis is accepted. There is no effect of both
the medicines on the increase in weight of patients.
9. KRUSKAL WALLIS TEST
• This test is employed when more then 2 population are involved where as Man Whitney test is used
when there are 2 populations. The use of this test will enable us to determine weather independent samples
have been drawn from the sample population (or) different populations have the same distribution.
• This test is an extension of the rank some test to more than 2 treatment and more than 2 treatments, and
is basically a test of the location of distribution.
• It is an example for One way ANOVA.
• The computation and analysis is illustrated using an experiment in which data were obtained from a
preclinical experiment in which rats injected with 2 doses of an experimental compound & a control were
observed for sedation.
• The time for animal to fall asleep after injection was recorded.
• If an animal did not fall asleep within 10 min of the drug injection, the time to sleep was arbitrarily
assigned a value of 15 min.
10. Control
Group
Rank
(R1)
Low Dose Rank
(R2)
High Dose Rank
(R3)
8 22.1 10 26 3 10
1 3.5 5 13 4 12
9 24.5 8 22 1 3.5
9 24.5 6 15 1 3.5
6 15 7 18.5 1 3.5
3 10 7 18.5 3 10
15 28 15 2.8 1 3.5
1 3.5 1 3.5 6 15
7 16.5 15 28 2 7.5
Total 149.5 186 94.5
X2
K-1= 12/N(N-1) (ΣR1
2/ni) – 3(N+1)
N= Total no. of observation in all groups
combined
Ri= Sum of Ranks in 3 groups individually
ni= No. of observations in all 3 groups
individually
K= No.of groups
N= 29, R= R1+R2+R3= 149.5+ 186+94.5=430
ni= n1+n2+n3= 9+10+10= 29, K= 3
H= 12/29(29+1) [(Σ430)2/29]-3(29+1)
= 12/29(30) [(Σ430)2/29] (30)
= 12/870 [(149.5)2/9+ (186)2/10+ (94.5)2/10]-90
=12/870 (2466+3459+893)-90
= 12/870(6818)-90
= 72.5(6818)-90
=5492.27
Here degree of freedom is equal to K-1= 3-1=2
Level of significance is 5% or σ= 0.05
The chi square value for 2 degree of freedom and
σ= 0.05 = X2
2,0.05= 5.991
Conclusion: Reject Ho if Ho> x2 tab now 6.89> 5.991
So, the null hypothesis Ho is rejected and the
alternative hypothesis H1 is accepted. We conclude
that the average time to sleep differs for at least 2 of
the 3 treatment groups(Controlled ,High Dose, Low
Dose) at the 5% level of Significance.
11. FRIEDMAN TEST
• It is a non-parametric test applied to a data i.e. at least ranked and it is in the form of a 2 way ANOVA
design. This test which may be applied to ranked or Interval or Ratio type of data is used when more
than 2 treatment, group are included in the experiment.
• In the Friedmann test, treatments are ranked within the each block, disregarding difference between
blocks.
Tablet Formulation A B C D
1 7.5 (4) 6.9 (1) 7.3 (3) 7 (2)
2 8.2 (3) 8 (2) 8.5 (4) 7.9 (1)
3 7.3 (1) 7.9 (3) 8 (4) 7.6 (2)
4 6.6 (3) 6.5 (2) 7.1 (4) 6.4 (1)
5 7.5 (3) 6.8 (2) 7.6 (4) 6.7 (1)
Total 14 10 19 7
X2
e-1= 12/ r (c+1) (ΣRir2)-3r (c+1)
Where,
r= number of rows(blocks)
e= number of column(treatment)
Ri= sum of ranks in the group individually
D.O.F= 4-1= 3
12/(5)(4)*(4+1) [ (14)2+ (10)2+ (19)2+ (7)2]-3x5 (4+1)
12/(5)(4) (5) [196+100+361+49]- 3x5(5)
12/100(706)-(15)5 = 84.24-75 = 9.24
Reject H0 if F> Χ2
tab = Χ2
3,0.05 = 7.821
We can conclude that at least 2 of the tablet press
differ with regard to tablet hardness. As null
hypothesis is rejected.