Wilcoxon signed rank test independence assumption Let us say we perform Wilcoxon signed-rank test on paired samples $x_{1,i}$ and $x_{2,i}$. I am trying to understand the independence assumption of the test. My questions are:


*

*Which quantities must be independent? Is it $x_{1,i}-x_{2,i}$ or is it the ranks, $R_i$ of $x_{1,i}-x_{2,i}$? Alternatively, is it the signed ranks, $R_i \cdot sgn(x_{1,i}-x_{2,i})$?

*Why is there a requirement for independence at all? My understanding is that Wilcoxon signed-rank test is based on a permutation test which requires exchangeability of data points. Since exchangeability does not necessarily require independence, then why does Wilcoxon signed-rank test require independence?

*Does independence need to hold only for the null hypothesis or does it have to be true for alternative hypothesis as well?

*What would happen if independence assumption was not met? I understand that if a requirement is not met, the $p$-values might be erroneous. I am looking for a more specific answer that describes how a step in conducting the test can go wrong in the absence of independence. A description with an example of a data that lacks required independence would be much appreciated. 

*How can we assess the impact of of autocorrelation in the data? For example, if there were autocorrelation of ~0.2 for lag=1 and ~0 for lag>1, how would it impact the significance level and power? 
 A: A permutation test will still be valid under exchangeability rather than independence. In this case I think it is exchangeability of $+$ and $-$ signs across the observations (the set of ranks if your test statistic is the usual signed rank one) that matters.
When performing the usual rank-based test it is common to assume that the pair-differences, $d_i=x_{1,i}-x_{2,i}$ are independent (the independence of the derived quantities like the ranks and the signed ranks will follow); while this is more than is necessary it is often a reasonable assumption to consider, while the less general assumptions are harder to consider (in that when independence of the $d$'s doesn't hold it may be difficult to identify whatever does hold that would still be sufficient. Calculation of the variance of the sum of the signed ranks is usually based on assuming independence (from which uncorrelatedness follows that is actually needed to get the variance formula).
Independence would not be required under the alternative; various forms of dependence under the alternative will impact the power of course (along with sample size calculations) but not the type I error rate.
While direct algebraic calculations may often be difficult, we can assess the impact of specific kinds of dependence on the properties of a test (like significance level and power) via simulation; when the form of dependence being considered is a function of a single parameter it's often convenient to produce a power curve.
[I will attempt to come back and give a specific example.]
