# Wilcoxon test for sample n=3

I have a dataset of male and female bats. Male bats comprise 3 evening and 3 morning trips. Female bats 5 evening and 3 morning trips. Trips consist of parameters like trip duration, covered distance, farthest point from roost, speed, home range and flying height. I actually wanted to perform a Wilcoxon test separately for male and female bats to see if differences between evening and morning trips arose by chance or not. Now I was surprised to hear, that Wilcoxon only works with a minimum of n=6. That means I can not do the test with none of my bats. Is that really correct? If not, pleas I would be so grateful if you could refer to a reference, since i am writing my bachelors thesis about that issue.

Also when comparing evening trips between male and female bats using the Mann Withney U test, the sample size requieres to be of a ratio minimum of 4:2. So I can not perform that test for male bats neither?

There is individual bat making a trip in the evening and in the morning. This is called paired. Please correct me if I am wrong. I want to test e.g. the speed of the evening trip with the speed of the same bat during morning trips. I have three individuals.

• Why do you want to use a Wilcoxon test for data that is essentially binary? Other tests would be more appropiate. Also note that I can already tell from your numbers that 3 out of 6 vs 5 out of 8 won't be significant and is entirely consistent with chance. Finally, your assumption that the results will tell whether your results are due to chance or not reveals a misunderstanding of significance testing and p-values. You can clarify that for yourself by looking for the many questions regarding p-values on this site.
– Erik
Commented Mar 23, 2016 at 9:04
• Which tests are you referring to? My Professor told me to use Wilcoxon for paired samples like male evening towards male morning. Commented Mar 23, 2016 at 9:49
• Do you suggest you have a pairing of your data with evening vs morning? How can this be if for the females you do not have the same number of evening and morning trips? In addition, is your description of the data incomplete? Are the two variables time (evening or morning) and sex all you have?
– Erik
Commented Mar 23, 2016 at 10:07
• I would have dismissed 2 of the female trips in order to have a paired dataset of 3 evening and 3 morning trips for female bats as well as 3 evening and 3 morning trips of male bats. Then I actually wanted to perform the Wicoxon test separately for male and female bats. But that means that I only have n=3 for both. And I read that the Wilcoxon test needs a minimum of n=6. Is that true? Commented Mar 23, 2016 at 10:17
• It's not really clear what you mean by "when comparing evening trips between male and female bats using the Mann Withney U test, the sample size requieres to be of a ratio minimum of 4:2". ... where does this ratio come from? Also what's your data measuring (what are the three values for males in the morning? Counts? measurements of something?) Commented Mar 23, 2016 at 11:55

Well, I can answer part of the question:

The Wilcoxon rank sum test (Mann Whitney U) works for a comparison of $n_1=3$ vs $n_2=3$ just fine.

However for a two-tailed test you can't reasonably set your significance level smaller than 10%, since that's the smallest achievable p-value.

Here's an example done in R:

> x
[1] 0.21 1.70 2.55
> y
[1] 2.58 4.25 3.21
> wilcox.test(x,y)

Wilcoxon rank sum test

data:  x and y
W = 0, p-value = 0.1
alternative hypothesis: true location shift is not equal to 0


A Wilcoxon signed rank test of 3 pairs also works just fine, but the significance level issue is worse; now your lowest possible two-tailed significance level is 25%. Here's an example:

> wilcox.test(y-x)

Wilcoxon signed rank test

data:  y - x
V = 6, p-value = 0.25
alternative hypothesis: true location is not equal to 0


So the claim that one or the other test doesn't "work" at those sample sizes isn't true -- but if you want a smaller significance level, that would be a problem for you.

[Whether what you're trying to do/have been advised to do makes sense is less clear from your discussion. More details would help.]

• Some discussion of the assumptions underlying the Wilcoxon test would be valuable. One obtains the p-value of $0.10$ only by assuming a model in which it is determined beforehand that there will be two groups of three independent observations each (giving $\binom{6}{3}/2=10$ possible partitions of those six observations). It is not clear to me how such a model could be applied to data that seemingly amount to "I observed three females and three males in the morning." Could you explain why the Wilcoxon test is applicable here?
– whuber
Commented Mar 23, 2016 at 14:48
• All I tried to figure out is, if I can apply the Wilcoxon test, testing values (speed, trip duration, covered distance, flying height) of evening flights and morning flights regarding significant difference. I only have 3 trips for each. 3 pairs. Commented Mar 23, 2016 at 15:40
• @rickie How are they paired? What makes one particular morning value connected to one particular evening value? Commented Mar 23, 2016 at 22:16
• They are paired in the sense of being the same bat, making the trips. One in the evening and one in the morning. Individuum A has a speed of 3m/s during his evening trip and 10m/s during his morning trip. Individum B has a speed of 4m/s during evening and 8m/s during morning and Individum C has a speed of 3,5m/s during evening and 13 m/s during morning trip. Can I apply the Wilcoxon test for that example? Commented Mar 30, 2016 at 10:28
• @ricke well, that's definitely paired -- in that the two observations on an individual are associated (by being on that same individual). There's still the broader issues (such as those in whuber's comment) to worry about. Commented Mar 30, 2016 at 11:24