Anda di halaman 1dari 4

Computational Statistics & Data Analysis 51 (2006) 793 796

Short communication
Testing for preference using a sum of Wilcoxon signed
rank statistics
Marinela Capanua , Gregory A. Jonesb , Ronald H. Randlesc,
a Memorial Sloan - Kettering Cancer Center, Biostatistics Service 307 E 63rd Street - 3rd Floor, New York, NY 10021, USA
b Department of Natural Sciences: Biology, Santa Fe Community College, Gainesville, FL 32606, USA
c Department of Statistics, University of Florida, PO Box 118545, Gainesville, FL 32611-8545, USA

Received 16 September 2005; received in revised form 2 December 2005; accepted 20 December 2005
Available online 11 January 2006

In certain designed experiments a sum of independent Wilcoxon signed rank statistics can be used to establish preference between
two competing resources. The statistic incorporates not only which resource was selected but also the order of selection. The test
can be implemented using modern statistical packages.
2006 Elsevier B.V. All rights reserved.

Keywords: Preference; Wilcoxon signed rank

1. Introduction

Testing for preference of products or food types occurs in many business and wildlife settings. In wildlife studies,
food preferences can be particularly difcult to establish. Many measures of preference have been proposed to describe
or quantify selective predation, but most of them are unsatisfactory (discussions of the suitability of existing methods
assessing preference can be found in Cock, 1978, Chesson, 1983). The two major drawbacks of most existing indices
of preference are (1) that they depend on food abundance and/or (2) they do not account for the order in which different
prey items are taken (Freed, 1980, Chesson, 1983). Dependence of a selectivity index on food abundance is problematic
because it prevents it from being used to study the effect of prey density on foraging preference. A good selectivity
index cannot vary with the prey density unless forager behavior also changes with food density. Only then can an
index be useful in detecting such changes in preference (Chesson, 1983). Likewise, lack of insight about the order of
prey taken results in a loss in the precision of the preference index (see Manly, 1980). In contrast to existing indices
of preference, the measures of selectivity proposed by Manly (1974) do not rely on prey abundance and have proved
to be quite useful in selection experiments with and without replacement of prey (Cook and Miller, 1977; Chesson,
1978, 1983). However, his methods did not take into account the order in which the predator captures prey items.
Manly (1980) extends his original method to account for the order in which prey items are selected, and nds that this
leads to more precise estimates of the preference index. Using this approach, the precision of the proposed estimator
of preference is greatly improved if the selection process is stopped after half of the prey is selected (as it was done in

Corresponding author. Tel.: +1 3523921941; fax: +1 3523925175.

E-mail address: (R.H. Randles).

0167-9473/$ - see front matter 2006 Elsevier B.V. All rights reserved.
794 M. Capanu et al. / Computational Statistics & Data Analysis 51 (2006) 793 796

Table 1
Selections of ve large or small armyworms in bird trials

Trial number Choice: 1 2 3 4 5

Score: 5 4 3 2 1

1 L L L L S
2 L L S L S
3 S L L L S
4 L S L S S
5 L L L L S
6 L L L S L
7 L L L S S
8 L S L L S
9 S S L L L
10 L L S L L
11 L L L S S
12 L L L L S
13 L L L L S
14 L L L S S
15 L L L S S
16 S L S S L
17 L L S L S
18 L L S L S
19 L L L S S
20 S L L S L
21 L L S S L

the study under investigation in this paper). However, his method is based on large-sample test, and simulations in his
paper indicate that it leads to unsatisfactory results for small selection experiments when the total number of prey is
less than 40.
The purpose of this article is to suggest a test statistic that can be useful to establish preference between two competing
food sources in certain experimental design settings. The context for this study was experimental work conducted at
the University of Florida aimed at conservation of naturally occurring enemies of crop pests as a means of improving
biological control of cropping systems. At issue was whether birds could be useful in crop pest control due to their
consumption of pests that escape mortality from other agents of biological control. Specically, the research investigated
aspects of pest insects that would make them more attractive food sources for birds. Trials were conducted using red-
winged blackbirds with fall armyworms as their food source. The purpose of the trials was to determine whether
the birds preferred larger versus smaller armyworms and whether the birds preferred non-parasitized armyworms to
parasitized armyworms of the same size. The parasite used was larva of E. plathypenae, a species common in Florida
and previously investigated for its biological control value. A description of the experiment can be found in Jones et
al. (2004).
In this experiment a plastic chamber divided into two equal sized parts was used to present each bird with two food
choices. The positions of the two foods in the subchambers (left or right) were varied over the trials and no directional
preference was observed. In trials to determine preference for food size, for example, each bird was presented with ve
large armyworms in one subchamber and ve small armyworms in the other. The researchers recorded the rst ve
choices made by the bird, including the order in which the armyworms were selected by the birds. One of the data sets
from this experiment is presented in Table 1. It displays the selection by each bird: large (L) or small (S), in the order
in which they were selected (left to right).

2. The test statistic

In this type of preference study it is important to incorporate into a preference indicator, the two elements of pref-
erence: which items were selected and the order of their selection. When testing for preference, the null hypothesis
is no preference, i.e. that the bird randomly selects its food type (L or S) and the ve selections made by each bird
M. Capanu et al. / Computational Statistics & Data Analysis 51 (2006) 793 796 795

are independent. In other words, each no preference selection by a bird is like a coin toss with probability p = 21 of
selecting L over S and with independence between selections. A Wilcoxon signed rank statistic can be used to describe
the selections made in each trial. A + is assigned to each large armyworm selected and a is assigned to each small
armyworm. The score of 5 is assigned to the rst selection made by the bird, 4 to the second selection, . . . , and 1 to the
fth selection made by the bird. Using these scores means that early selection of a food type and more selections of that
food type, will both contribute to increasing the indication of preference for that food type. Under the alternative that
the birds exhibit a preference for one of the two food types, we would expect p  = 21 . For example, p > 21 would indicate
a preference for L, and p < 21 would indicate a preference for S. Because of the particular design of this experiment,
abundance of the two types of food is not an issue. If the two food types were mixed together in one food chamber,
abundance would play a more important role in the analysis. However, in this setting they were in separate subcham-
bers and the researchers recorded only which subchamber was chosen by the bird in each selection. In the j th bird
trial we let

Tj+ = (sum of the scores assigned to + (L) food selections)


Tj = (sum of the scores assigned to (S) food selections).

Here Tj+ + Tj = 5(5 + 1)/2 = 15. Summing over the trials on different birds produces the test statistic


T+ = Tj+ ,
j =1

where n denotes the number of birds used in the experiment.

In general, suppose there are k selections made by each subject in the experimental situation and n subjects in the
experiment. Then under the null hypothesis, T + has the distribution of the sum of n independent Wilcoxon signed rank
statistics in which k is the largest rank assigned in each of the signed rank statistics. This preference testing setting
provides a nice application of this type of test statistic previously introduced by Feustal and Davisson (1967) in the
context of mixed statistical tests for sonar signal detection. Also see exercise 2.10.37 in Hettmansperger (1984, p. 131).
It is clear that
  nk(k + 1)   nk(k + 1)(2k + 1)
EH0 T + = and VarH0 T + = .
4 24
When n is large and k is xed, the null distribution of T + can be approximated by a normal distribution. This follows
from the usual Central Limit Theorem because under the null, T + is the sum of n independent and identically distributed
statistics, Tj , each with nite mean and variance.
Finding an exact p-value for a test based on T + is at least theoretically feasible. Each score on every trial is included
or excluded from T + as a result of an independent toss of an honest coin. If n and k are small this p-value can be
obtained using StatXact, for example. When n and k are too large for exact computation, then the null distribution
can be simulated by replicating the independent coin tosses associated with each score in each trial. StatXact can also
be used to simulate an estimate of the exact p-value. For the data in Table 1, the exact computations using StatXact
produces a p-value of 0.00001510. Similar computations are obtainable using the pperm function in the R library
exactRank Tests.

3. Conclusion

In preference trials in which two choices are presented, a test statistic which is the sum of independent Wilcoxon
signed rank statistics produces a test that is useful in detecting preference. The statistic incorporates two types of
information, namely which of the two choices was selected at each stage and the order in which items were selected.
796 M. Capanu et al. / Computational Statistics & Data Analysis 51 (2006) 793 796


Chesson, J., 1978. Measuring preference in selective predation. Ecology 59, 211215.
Chesson, J., 1983. The estimation and analysis of preference and its relationship to foraging models. Ecology 64, 12971304.
Cock, M.J.W., 1978. The assessment of preference. J. Animal Ecology 47, 805816.
Cook, L.M., Miller, P., 1977. Density-dependent selection on polymorphic preysome data. Amer. Naturalist 111, 594598.
Feustal, E.A., Davisson, L.D., 1967. The asymptotic relative efciency of mixed statistical tests. IEEE Trans. Inform. Theory IT-13, 247255.
Freed, A.N., 1980. Prey selection and feeding behavior of the green tree frog. Ecology 61, 461465.
Hettmansperger, T.P., 1984. In: Statistical Inference Based on Ranks.Wiley, New York, p. 131.
Jones, G.A., Sieving, K.E., Avery, M.L., Meagher, R.L., 2004. Parasitized and non-parasitized prey selectivity by insectivorous birds. Crop Protection
24 (2), 185189.
Manly, B.F.J., 1974. A model for certain types of selection experiments. Biometrics 30, 281294.
Manly, B.F.J., 1980. A note on a model for selection experiments. Biometrics 36, 918.