# Prey preference - can I use a paired t- or wilcoxon test?

I have done an experiment in which I looked at the prey preference of an aquatic invertebrate. I used 10 containers all with one predator but with different densities of prey. I used two different prey species of which the densities were similar for every container. For example container 1 contained 5 individuals of prey A and 5 of prey B. Container 2 contained 10 individuals of prey A and 10 of prey B and so on. Now I want to see which prey is prefered by the predator. My data looks as followed:

prey.a <- c(5,5,10,10,9,12,13,8,15,17) ## number of captured prey (A)

prey.b <- c(5,5,4,2,8,8,4,9,4,6) ## number of captured prey (B)

prey.density <- c(10,10,20,20,20,30,30,30,40,40) ## total number of prey available (A and B)

My initial thought was to use a paired t-test. The data violate the assumption of independent samples because they are kind of paired that is why I thought a paired t-test. However, my data violate the assumption of normality so perhaps a Wilcoxon test for paired measurements would be suitable.

The thing is that both these test are designed for a before and after treatment which I don't have. Thus, I'm not really sure if I can actually use these tests. The problem is tha it's a paired rank test of the differences and my low density treatments will always be ranked lower than my high density treatments.

My question is; What would be a suitable test to analyse these data?

I also had this wild thought about a GLMM in which I use the container as a random effect and add prey species as a fixed effect, nevertheless, normality.

btw I used different prey densities because I also looked at the effect of prey density on the total number of captured prey, which has nothing to do with my question.

• You're right that they're not independent. One approach would be to condition on the total prey taken at each point (since you're interested in preference, not how hungry they were) and look at it as a binomial response; you'd presumably do a logistic regression. That is, your model would be for the proportion of those taken that were species A. You mention GLMM, so why wouldn't you do something like a binomial logit model? – Glen_b -Reinstate Monica Aug 24 '13 at 16:23