Skip to content
Prev 285716 / 398502 Next

CI for the median difference

It seems to me that your two approaches are calculating CIs for 
different quantities.  The bootstrap methods are calculating a CI for 
the difference in medians, while the Wilcoxon approach is calculating a 
CI for the median of the differences.  If this were the mean, those 
would be the same, but not for the median:

A =c(619, 600, 490, 1076, 654, 955, 563, 955, 827, 873, 1253)
B =c(346, 507, 598, 228, 576, 338, 1153, 354, 560, 517, 381)

 > median(A)-median(B)
[1] 320
 > median(A-B)
[1] 273