# Bootstrapped BCa confidence interval of median (R package simpleboot) does not correspond with Wilcox.test p value

I am using R to compare the medians of two groups. Each individual has received a score of between 0 and 100. Both distributions are very skewed. The median of group A (n=33) is 87.8 (IQR 75.1, 100.0) and group B (n=46) is 76.0 (IQR 59.7, 89.6). A Wilcoxon test gives a p value of 0.019.

I want to use bootstrapping to conduct a 95% confidence interval of the difference between these two medians. Using function two.boot in package simpleboot with R=1000 I get a BCa confidence interval of about -1.5 to about 24. The normal, basic and percentile methods all also give a confidence interval which includes 0. I have tried with R=100,000 but with virtually the same results.

How do I interpret this? If p was closer to 0.05 I would understand that this may just be because the result is "borderline". However, given that p is much lower, I am surprised that the 95% CI includes 0. Is there anything in the distribution of the data which might assist?

• The Wilcoxon test does not have as its null hypothesis that the medians are the same. Commented Dec 20, 2014 at 20:23
• And therefore it is perfectly valid for the Wilcoxon test to lead to a different conclusion than a bootstrapped confidence interval? I'm still not sure, therefore, how I should interpret the results. Commented Dec 21, 2014 at 19:49