I am interested in knowing how to analyse whether the order in which an event occurs within a sequence of events is random; i.e. is the likelihood of event '1' occurring 1st in a sequence of events just as likely as it occurring 2nd or 3rd etc..

More specifically:
My work is ecologically-oriented: I have captured different-sized groups of a rodent, and in each group there is a phenotype that always occurs once. I can therefore know the order in which individuals with certain phenotypes (inc. the phenotype of interest) were captured in each group. I then want to know whether the specific phenotype tends to occur earlier or later in the sequence than that expected by chance.

I think it will involves some sort of permutation test whereby I randomly re-sample individuals within each group, but I am unsure how to handle the different group sizes (example dataset below).

thanks for any help in advance
Jack


Group Phenotype Order
A 1 1
A 0 2
A 0 3
A 0 4
A 0 5
B 0 1
B 0 2
B 0 2
B 1 4
B 0 5
B 0 6
C 0 1
C 0 2
C 1 3