I am trying to perform Wilcox test in R. For the simplicity I will use artificial data in example below:
# Weight before experiment
before <-c(200.1, 190.9, 192.7, 213, 241.4, 196.9, 172.2, 185.5, 205.2, 193.7)
# Weight after experiment
after <-c(392.9, 393.2, 345.1, 393, 434, 427.9, 422, 383.9, 392.3, 352.2)
# Create a data frame
my_data <- data.frame(
group = rep(c("before", "after"), each = 10),
weight = c(before, after)
)
So next step is performing Wilcox test. I want to test test Ho-hypothesis which mean data before and after experiment have same median, or alternative Ha: Sample after experiment have big value than sample before experiment.
In order to do this I perform this test below :
wilcox.test(weight ~ group, data = my_data, paired = TRUE,
alternative = "less")
#Wilcoxon signed rank test
#data: weight by group
#V = 55, p-value = 1
#alternative hypothesis: true location shift is less than 0
So can anybody help me with interpretation of this results ? First does my hypothesis is good and second what will be explanation because value of P is exactly 1 ?