0

I want to test whether I could reject a null hypothesis that the data has a median of 600. I need to use the wilcox test or maybe construct it in R, but I am not sure if the builded in test supports for parameter - median? Because I think it may consider the mu as a mean. Anyway it gives a very high p-value so I cannot reject the null hypothesis, but I have doubts that this test doesn't give the right results considering hat I need to check the median not mean.

data <- c(612, 583, 629, 595, 653, 596, 624, 564, 576, 593)
wilcox.test(data, mu = 600)
user
  • 1,412
  • 1
    This question would probably be better on the CrossValidated site. Did you read the help? "If only x is given, a Wilcoxon signed rank test of the null that the distribution of x is symmetric about mu is performed." So the null hypothesis is that mu is the median AND that the distribution is symmetric. – Joe Jun 05 '20 at 16:35
  • 1
    Informally, given that 4 data points are below 600 and 6 are above, you would not be able to reject the null that 600 is the median. That would be like rejecting the null that a coin is fair when 10 flips gives 4 heads and 6 tails (again, just an informal argument). – Joe Jun 05 '20 at 16:41
  • Formally, if you want to test the null hypothesis that the median is 600 (and nothing else), then you can use that the number of data points in the sample that are below 600 should follow the binomial distribution with p=0.5 https://stats.stackexchange.com/questions/131471/how-to-test-the-median-of-a-population – Joe Jun 05 '20 at 16:47

0 Answers0