# Is Mann Whitney U the right statistical test for this analysis?

I am studying the spatial interactions between coral at a specific reef. I have the abundances of each coral species at each site we studied. I also have already run statistical tests and basically have finalized which coral species are in significant interactions with other coral species at each site. I now want to see if abundance of coral species has any impact on if they are in a significant interaction for each site. I have turned to the Mann Whitney U test as my data is not normalized and I have unequal sample sizes. For example I have made up some fake data for what this looks like:

Site Number Abundance Significance
1 24 yes
2 2 no
3 10 yes
4 8 no
5 34 yes
6 17 yes
7 4 no
8 5 yes
9 4 no
10 25 yes

I have then run this code:

wilcox.test(Abundance ~ Significance, data = dat, exact = F)


This is to see if there is a statistical significance between the abundances of this coral species when in a significant interaction and when not.

Is this a good way about doing this or should I be doing a different statistical test?

First tried as comment but too long:

What you intend to do may be somehow not the right strategy:

But first the assumptions:

1. You measured the abundance of corals at different sites (in your example 10 sites).

2. Then you already calculated if there is a significant correlation between different coral species at this site.

3. Now you want to estimate if there is a relationsship between the abundance of corals measured at each site and the significant correlation between different coral species.

In other words if you already found a significant relationship between different coral species at one site you hypothesize that the abundance is high.

With a Mann-Whitney U test you test two groups e.g. Significant vs not significant in terms of Abundance.

This if I do not miss something is not correct and proned to counfounding.

• Let me know if I am not on the correct way. Commented Oct 28, 2021 at 19:31
• This is a fairly extreme case of double dipping. Start over and use principled statistical analysis based one a single pre-specified model such as the proportional odds model, a generalization of the Wilcoxon test. Commented Jan 11 at 7:17

You are dealing with count data, so technically the MW test (equivalently Wilcoxon rank sum), which deals with continuous outcomes, would not be the theoretically "correct" method. There are a wide-variety of procedures for dealing with count data and many of the R approaches to these have a nice treatment in Zeileis,Kleiber, and Jackman's paper.

A Poisson regression approach might coded as:

 glm(Abundance~Significance, data=dat, family="poisson")

Call:  glm(formula = Abundance ~ Significance, family = "poisson", data = dat)

Coefficients:
(Intercept)  Significanceyes
1.504            1.449

Degrees of Freedom: 9 Total (i.e. Null);  8 Residual
Null Deviance:      81.64
Residual Deviance: 36.61    AIC: 81.46
> summary(glm(Abundance~Significance, data=dat, family="poisson"))

Call:
glm(formula = Abundance ~ Significance, family = "poisson", data = dat)

Deviance Residuals:
Min       1Q   Median       3Q      Max
-3.8595  -1.1201  -0.2403   1.2196   3.0512

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)       1.5041     0.2357   6.381 1.76e-10 ***
Significanceyes   1.4491     0.2535   5.717 1.08e-08 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

Null deviance: 81.637  on 9  degrees of freedom
Residual deviance: 36.606  on 8  degrees of freedom
AIC: 81.463

Number of Fisher Scoring iterations: 4

• I see on Wikipedia that the CDF of $\frac{1}{2}(X_1 + X_2)$ is assumed to be continuous. Why is that? Commented Oct 28, 2021 at 19:37
• I'm not sure we can answer the "why" question other than to say that that was the problem under consideration in the development of the test. The Wilcoxon test assumes no ties because the probability of ties in finitely sampled continuous values is zero.
– DWin
Commented Oct 28, 2021 at 19:41
• Agreed, the probability measure of ties would be zero for uncountable support. I wonder if a relaxation of the assumption would still yield a useful statistic. Thanks you. Commented Oct 28, 2021 at 19:43
• @Galen The question of how to handle ties in this sort of problem has a fairly extensive consideration in the survival analysis literature. The "answer" is that the Wilcoxon statistic is still pretty good if the proportion of ties is modest.
– DWin
Commented Oct 28, 2021 at 19:46