# Independence assumption of non-parametric tests (Mann-Whitney & Wilcoxon Signed rank)

I'm interested in testing (one at a time) these two hypotheses using the...

Mann-Whitney U test. H0: The probability that an observation in Group1 is greater than an observation in Group2 is 0.50

But I'm having trouble understanding this assumption and wondering if my data meet it:

Assumption: "In addition to independence within each sample, there is mutual independence between the two samples." Source.

Conover, W.J. 1999. Practical Nonparametric Statistics, 3rd ed. Section 5.1.

and...

Wilcoxon Signed Rank test. H0: The magnitude of paired differences are symmetrically distributed about zero.

Assumption: "...difference scores are independent of one another..." Found here.

My data consists of positive continuous water property values (temperature, salinity, etc...) recorded once at each site (N=47) once per season (see definition below), so ties can occur (duplicate values with the same ranks between groups (months), see plots below). This fieldwork can usually be completed in a single month, but sometimes "spills over" into the next month.

In scenarios when the 47 values are split between 2 months (anywhere between 5 to 47 values/sites visited per month), I'd like to use the Mann-Whitney U test on the (independent?) recorded values between months.

When all 47 values are recorded in a single month, I'd also like to do a paired test between months. However, I'm not sure if my data meet the assumptions of each test given that...

1. The same sites/locations are visited twice per year, once per season (values are not randomly collected from the underlying distribution(s)/population(s))
2. Values may not be independent because distance between sites is at most 1 mile and "what happens" at one site also likely happens at another nearby (mid-day sun warms the waters at all sites practically at the same time - changing water temp, rainwater runoff might change salinity at all sites - maybe unequally, etc...).

Does this mean I can't run either the Mann-Whitney U (or the Wilcoxon for my paired scenario)? Is there an alternative test/model? I'm fine with changing my null hypothesis, but I thought these two captured my idea nicely. The real question is: do months differ in any way (does it matter what month we record data in)? It obviously does, but I'd like to test this (by how much too, if possible). I'm fine with testing each year by itself, but figured there's probably some dependency between years as well. I'm also sure results can't be generalized to other locations in the bay we survey given this is a non-random, repeated measures, design.

I’m hoping for a more intuitive approach towards understanding this problem rather than a mathematical (proof?), if possible.

Plot of water temperature values by month (Jan.-April = dry season, May - Dec. = wet season):

• The "tukey" used in multcomp::glht doesn't refer to the Tukey test. It just refers to the fact that your calling for all pairwise tests. Commented Nov 26, 2022 at 16:48