Solved – How to test whether the absolute change of two paired samples different from zero

paired-comparisonspaired-data

I have two paired samples.

$\text{Group 1}: X_1,X_2, …,X_n$
$\text{Group 2}: Y_1,\;Y_2,…,\;Y_n$.

$(X_1, Y_1)$, $(X_2, Y_2), …, (X_n, Y_n)$ are paired respectively.

The null hypothesis is $\mu_{|X-Y|} = 0$,
the alternative hypothesis is $\mu_{|X-Y|} > 0$

What is the appropriate test for this purpose?

Best Answer

In comments you specify an interest in the alternative $\mu_D\neq 0$, I'll discuss several possibilities:

1) paired t-test: suitable if the differences are approximately normal. Moderately tolerant of non-normality.

2) Wilcoxon signed rank test: effectively a permutation test on the mean of the signed ranked differences. Assumes symmetry of the differences (and under that assumption, works as a test for the mean difference being zero).

3) Sign test. Does not assume symmetry, but is not a test for the mean difference being zero if you don't have symmetry. Since it tends to have lower power unless the tails are very heavy, if you're going to assume symmetry you'd usually be better off with (2).

4) permutation test. This has the same assumptions as (2) - independence, symmetry of differences, but it has better power at the normal than (2) (so if you're really having trouble working out which of (1) or (2) to do, you should probably do (4) instead. If your tails are heavier than normal, say logistic-ish, you might be slightly better off with (2) from a power point of view. On the other hand, the loss of power at the normal if you do (2) is surprisingly small, so there's not all that much to worry about either way.

The permutation test works as follows:

If the null is true and the distribution of differences is symmetric, then the differences would be as likely to have one sign as the other - under the null hypothesis, the signs are arbitrary.

So you can generate pseudosamples by taking the absolute differences and giving each one a random sign.

For each pseudosample you calculate some test statistic which will tend to be unusual compared to the null case (i.e. is sensitive to the alternative). One example is the sum of the signed differences.

If $n$ is the number of differences, then there are $2^n$ such sets of signs. If $2^n$ is tractable (say $n<20$ or so), you can compute all possible arrangements of signs.

If $n$ is too big to find them all, you can randomly sample the sets of signs (making it a randomization test rather than a permutation test).

Either way, you end up with a distribution for the test statistic. You find where your sample statistic lies in the distribution. If it's in either extreme tail (say the top of bottom $n\alpha/2$ values, you would reject the null.

Related Question