Professional Documents
Culture Documents
Non Parametric Test
Non Parametric Test
Objective:
To perform “Wilcoxon Signed Rank Test for Single Sample” using R Programming
Null Hypothesis[H0]:
The Median of the Sample is equal to 5
Alternative Hypothesis[H1]:
The Median of the sample is not equal to 5
Level of Significance = 5%
Code:
x = c(7,4,6,5,8,7,6,5,3,5,6,4,5,7,6,7,5,6,4,5,6,7,8,4,6,5)
med = 5
wilcox.test(x,mu=med)
Output:
Wilcoxon signed rank test with continuity correction
data: x
V = 151.5, p-value = 0.02065
alternative hypothesis: true location is not equal to 5
Conclusion:
Since calculated p-value < 0.05, Do not Reject Null Hypothesis (H0). Therefore, the Median of the given
sample is equal to 5.
SAMRIDH VIKHAS S | 20MIY0001 | MAT3011[ELA] | DA – 3
Objective:
To perform “Paired Wilcoxon Signed Rank Test” using R Programming
Null Hypothesis[H0]:
There is no significant difference between the 2 samples
Alternative Hypothesis[H1]:
There is significant difference between the 2 samples
Level of Significance = 5%
Code:
a = c(80,85,90,75,88,92,79,83,87,81,86,84,78,82,89)
b = c(75,78,80,72,76,79,74,77,81,73,70,75,79,82,76)
wilcox.test(a,b,paired=TRUE)
Output:
Wilcoxon signed rank test with continuity correction
data: a and b
V = 104, p-value = 0.001355
alternative hypothesis: true location shift is not equal to 0
Conclusion:
Since calculated p-value < 0.05, Do not Reject Null Hypothesis (H0). Therefore, There is no significant
difference between the 2 samples.