Introduction

   In the early 19th century Charles Darwin studied finches in the Galapagos Islands. His observations of the diverse finches, of which each species seemed to be specially adapted to its environment, likely contributed to his ideas about natural selection and evolution. Darwin’s theory of evolution is now widely accepted, however further study and exploration continues. Darwin’s finches remain an especially important subject of study, particularly their beak size and shape, which adapt quickly to environmental changes (Grant 2017).

   The data set to be explored in this paper contains beak measurements taken by Peter and Rosemary Grant in 1975 and 2012 of two species of finches: Geospiza fortis, also known as the medium ground finch, and Geospiza scandens, or the common cactus finch. The data includes columns for beak length measurements and beak depth measurements for each species, however, for simplicity I will focus only on beak depth for the outcome variable of this paper.

   Birds of both G. fortis and G. scandens species have an average lifespan of about 5-7 years, although some have been recorded to live at least 12 years in the wild (Gibbs and Grant, 1987, p. 803-804). Since this data is collected 37 years apart, the observations can safely be considered independent. The variables of interest are as follows:

Outcome Variable

  • Beak depth: The distance, in millimeters, between the top and bottom of the beak.

Predictor Variables

  • Year:
    • 1975 Group
    • 2012 Group
  • Species:
    • G. fortis
    • G. scandens

G. fortis. (left) and G. scandens (right) | Source: Peter R. Grant

I will use one-way and two-way ANOVA to analyze the data and to find out which variables affect beak depth, and what interactions, if any, exist.

data1975 <- read_csv("finch_beaks_1975.csv")

data2012 <- read_csv("finch_beaks_2012.csv")

beak_depth <- c(data1975$bdepth, data2012$bdepth)

year_group <- as.factor(c(rep(1975, 403), rep(2012, 248)))

species_group <- as.factor(c(rep("Fortis", 316), rep("Scandens", 87), rep("Fortis", 121), rep("Scandens", 127)))

treatment_group <- as.factor(c(rep("Fortis-1975", 316), rep("Scandens-1975", 87), rep("Fortis-2012", 121), rep("Scandens-2012", 127)))

treamtent_groups_tibble <- tibble(treatment_group, beak_depth)

Summary Statistics

Summary Data for Each Treatment Group

summary_stats <- treamtent_groups_tibble %>%
                    group_by('Treament Group'=treatment_group) %>%
                    summarise(mean = mean(beak_depth), sd = sd(beak_depth), min=min(beak_depth), median = median(beak_depth), max = max(beak_depth), n = n()) 

summary_stats
## # A tibble: 4 x 7
##   `Treament Group`  mean    sd   min median   max     n
##   <fct>            <dbl> <dbl> <dbl>  <dbl> <dbl> <int>
## 1 Fortis-1975       9.17 0.737   7.5    9.2  11.0   316
## 2 Fortis-2012       8.61 0.733   7.2    8.5  11.1   121
## 3 Scandens-1975     8.96 0.567   7.9    9    10.4    87
## 4 Scandens-2012     9.19 0.669   7.7    9.2  11     127
  • The mean (standard deviation) beak depth for the G. fortis-1975 sample is 9.17 (0.74)mm. The median beak depth for the G. fortis-1975 sample is 9.2mm.

  • The mean (standard deviation) beak depth for the G. fortis-2012 sample is 8.61 (0.73)mm. The median beak depth for the G. fortis-2012 sample is 8.5mm.

  • The mean (standard deviation) beak depth for the G. scandens-1975 sample is 8.96 (0.57)mm. The median beak depth for the G. scandens-1975 sample is 9mm.

  • The mean (standard deviation) beak depth for the G. scandens-2012 sample is 9.19 (0.67)mm. The median beak depth for the G. scandens-2012 sample is 9.2mm.

Treatment Groups Boxplots

treamtent_groups_tibble %>% 
  ggplot() +
    geom_boxplot(aes(factor(treatment_group), beak_depth, group = treatment_group)) + 
    xlab("Treatment Group") + 
    ylab("Beak depth (mm)") +
    theme_bw()