pie chart

Behavioral Data Collection and Circular Statistics: Testing Phototaxis in an Isopod (2022)


This data expedition focused on the mechanisms animals use to orient using environmental stimuli, the methods that scientists use to test hypotheses about orientation, and the statistical methods used with circular orientation data. Students collected their own data set during the class period, performed hypothesis testing on their data using circular statistics in R, and aggregated their data to formally test the hypothesis that isopods orient with light by writing their own code and using an RShiny online application.

This exercise served as a capstone to a series of four class sessions on orientation and navigation, where students read primary scientific literature that used circular statistics in their methods. This data exercise was used to give students the opportunity to collect their own data, discover why linear statistics wouldn’t be sufficient to analyze them, and then implement their own analysis. The goal of this course was to give students a better understanding of circular statistics, with hands-on application in forming and testing a hypothesis.

Graduate Students: Jesse Granger and David De La Mater
Sponsoring faculty member: Dr. Stephen Nowicki
Undergraduate Course: Biology 268 – Mechanisms of Animal Behavior

Guiding Questions

  • How do animals orient with respect to light?
  • How would you design an experiment to test for different kinds of orientation?
  • How is circular data different than linear data?


Students were assigned homework to install R and RStudio and to learn how to navigate the interface of RStudio. Students learned to assign variables, run code, and install/load packages so that they would be prepared for the in-person R exercise.

Students also were assigned a brief reading that walked them through the differences between phototaxis and photokinesis. The goal of the reading was to encourage students to start thinking about how to analyze data and design their own experiments. As such, the reading ended with two questions, the first asking them to interpret data in their own words, and the second asking them to brainstorm experimental designs to test for phototaxis.

In-Class Exercises


This expedition allowed students to develop and test hypotheses relating to animal orientation. For homework before class, students were assigned a reading that explores orientation in response to light cues and were sent a learning module that walked them through the basics of coding in R markdown.

To familiarize students with the concept, the lesson began with a brief lecture on animal orientation centered around their assigned reading. Students then discussed different ways they could test an animal for phototaxis (movement towards or away from a light source). At this point, the concept of circular statistics was introduced and explained once the students realized why the data the proposed could not be analyzed with traditional linear statistics.

Then, students began an experiment to test if pillbugs exhibited phototaxis. We discussed the basic life-history and biology of pillbugs, and students broke into groups to form a hypothesis on whether or not pill bugs would have phototaxis. Students hypothesized that pillbugs would exhibit negative phototaxis because they prefer damp, cold habitat.

After developing hypotheses, students began the experiment. In groups of four, the students performed the following experiment:

  1. Students in groups of four were each given six isopods, an orientation arena, a box open on one end, and one lamp.
  2. They placed the box, with the orientation arena inside it, at one end of the table, and the lamp at the opposite end of the table. For the “light on” experimental animals it was turned it on, and for the “light off” control animals it was left it off.
  3. They then placed one isopod in the center of the arena under a clear plastic cup.
  4. Students then lifted the cups from the isopod and recorded the direction it was moving in when it reached the edge of the orientation arena.
  5. One member of each group then wrote their results on the chalkboard. We aggregated class data to test if pillbugs exhibited phototaxis.

After performing their experiments, the instructors led the group in a discussion of how to analyze their data. Students then returned analyzed their data in their breakout groups while Data Expedition instructors circulated the room to provide additional programming assistance.

In the final 15 minutes of class, the Data Expedition instructors used the full class’s data to demonstrate how to use an Rshiny app that performs circular statistics. While the experimental group was significantly oriented away from the light source, the control group was not. This differed from the previous year, where the control group was also significantly oriented. The main difference in experimental design from this year compared to the previous was the addition of the box around the arenas. We believe that this box removed additional cues in the room that the animals may have been using to orient (such as other group’s light sources).

As an “exit ticket” students were asked to show the plot and statistical tests from their group’s data, as well as interpret the results from the full class’s data in relation to their hypothesis. All the groups had predicted the isopods would be negatively phototactic. Students also suggested adding an experimental group where the light source was moved to another side of the arena, or having the boxes open from the top, instead of the side, so that they could randomize the direction from which the cup was lifted.