I found this post saying that one should test for the median difference instead of the difference in medians, in particular if the data is skewed: http://onbiostatistics.blogspot.com/2015/12/median-of-differences-versus-difference.html The authors says "median of differences is the correct number to be used and is the number that corresponding to the signed rank test".
I did not find good explanations for this. My question: are there any reasons from a statistical perspective why the median difference should be preferred over the difference in medians?
To give some more background: The differences are paired. Moreover, the paired differences are highly skewed to the right (in my real data set), which is why I want to use a bootstrap hypothesis test.
Example
Suppose I have a two samples x1 and x2 as below. The samples are paired, for instance the id
could specify the person and x1
could be a measurement before intervention and x2
after the intervention (for the same person).
id x1 x2 difference
1 1.37 1.68 -0.31
2 2.18 2.99 -0.80
3 1.16 3.24 -2.07
4 3.60 3.08 0.52
5 2.33 2.19 0.13
The median difference would be: median(x1 - x2) = median(difference) = -0.31
The difference in medians would be: median(x1) - median(x2) = -0.80.
difference
column in the example) are right skewed. I have approx. 3500 such difference values. I want to test the H0: median(difference) = 0 against H1: median(difference) > 0 (or alternatively H0: median(x1) - median(x2) > 0 against H1: median(x1) - median(x2) > 0). $\endgroup$