You are on page 1of 3

Name : SURIYA G

Reg No : 20MIY0002

Course Code : MAT3011

Faculty : MOKESH RAYALU

Assignment : DA3
Objective:
To perform Wilcoxon Signed Rank Test for the following data

Null Hypothesis: The median of sample is equal to 5


Alternate Hypothesis: The median of 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:
Do not Reject H0. The median is equal to 5
Objective:

To perform Wilcoxon Signed Rank Test for the following data

Null Hypothesis: There is no significance difference between 2


samples
Alternate Hypothesis: There is significance difference between
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:
Do not reject H0. There is no significance difference
between 2 samples.

You might also like