R Markdown

# X = burrow dist, Y = Time in Burrow 

xyplot(time_in_burrow_sec ~ burrow_dist_mts, data = Penguin_Data)

favstats(time_in_burrow_sec ~ burrow_dist_mts, data = Penguin_Data)
##    burrow_dist_mts  min   Q1 median   Q3  max mean       sd n missing
## 1                3    0    0      0  105  420  105 210.0000 4       0
## 2              4.5    0    0      0    0    0    0       NA 1       0
## 3                5 1200 1200   1200 1200 1200 1200   0.0000 2       0
## 4              5.1    0    0      0    0    0    0       NA 1       0
## 5                6   60   60     60   60   60   60       NA 1       0
## 6              6.2 1020 1020   1020 1020 1020 1020       NA 1       0
## 7              6.5  600  600    600  600  600  600       NA 1       0
## 8              6.9    0    0      0    0    0    0       NA 1       0
## 9                7    0    0      0    0    0    0   0.0000 2       0
## 10             7.1    0    0      0    0    0    0       NA 1       0
## 11               8    0  300    600  900 1200  600 848.5281 2       0
## 12             8.1    0    0      0    0    0    0       NA 1       0
## 13             8.5    0    0      0    0    0    0   0.0000 2       0
## 14             9.5 1200 1200   1200 1200 1200 1200       NA 1       0
## 15              10    0    0      0    0    0    0   0.0000 2       0
## 16            11.1  120  120    120  120  120  120       NA 1       0
## 17            12.7    0    0      0    0    0    0       NA 1       0
## 18            12.8    0    0      0    0    0    0       NA 1       0
## 19            13.2    0    0      0    0    0    0       NA 1       0
## 20            13.7    0    0      0    0    0    0       NA 1       0
## 21              15    0    0      0    0    0    0       NA 1       0
## 22              16    0    0      0    0    0    0       NA 1       0
## 23              17    0    0     30  240  420  138 186.8689 5       0
## 24              18    0  195    390  585  780  390 551.5433 2       0
## 25            18.4  480  480    480  480  480  480       NA 1       0
## 26              20    0    0      0    0    0    0   0.0000 2       0
## 27            20.4    0    0      0    0    0    0       NA 1       0
## 28            21.6    0    0      0    0    0    0       NA 1       0
## 29            22.1    0    0      0    0    0    0       NA 1       0
## 30            22.8    0    0      0    0    0    0       NA 1       0
## 31            23.2    0    0      0    0    0    0       NA 1       0
## 32            23.5    0    0      0    0    0    0       NA 1       0
## 33            24.4    0    0      0    0    0    0       NA 1       0
## 34              25    0    0      0    0    0    0   0.0000 2       0
## 35            25.7    0    0      0    0    0    0       NA 1       0
## 36              26  900  900    900  900  900  900       NA 1       0
## 37            27.9    0    0      0    0    0    0       NA 1       0
## 38            29.4  240  240    240  240  240  240       NA 1       0
## 39              30    0  255    510  765 1020  510 721.2489 2       0
## 40            30.7    0    0      0    0    0    0       NA 1       0
## 41            31.8    0    0      0    0    0    0       NA 1       0
## 42            33.1    0    0      0    0    0    0   0.0000 2       0
## 43            34.8    0    0      0    0    0    0       NA 1       0
## 44              38    0    0      0    0    0    0   0.0000 2       0
## 45            38.8    0    0      0    0    0    0       NA 1       0
## 46              40    0    0      0    0    0    0   0.0000 4       0
## 47              45    0    0      0    0    0    0       NA 1       0
## 48            47.1    0    0      0    0    0    0       NA 1       0
## 49            52.2    0    0      0    0    0    0       NA 1       0
## 50              60    0    0      0    0    0    0       NA 1       0
## 51              63  960  960    960  960  960  960       NA 1       0
## 52            64.8    0    0      0    0    0    0       NA 1       0
## 53              70    0  225    450  675  900  450 636.3961 2       0
## 54            74.2    0    0      0    0    0    0       NA 1       0
## 55            74.6    0    0      0    0    0    0       NA 1       0
## 56              75    0    0      0    0    0    0       NA 1       0
## 57              80    0    0      0    0    0    0       NA 1       0
## 58             104  360  360    360  360  360  360       NA 1       0
## 59           112.4    0    0      0    0    0    0       NA 1       0
cor(time_in_burrow_sec ~ burrow_dist_mts, data = Penguin_Data)
## [1] -0.09666462

The correlation coefficient (r) is -0.0967. This suggests a negative association with a very weak linear relationship between burrow distance from the trail and time spent in the burrow.

summary(lm(time_in_burrow_sec ~ burrow_dist_mts, data = Penguin_Data))$coefficients[,4]
##     (Intercept) burrow_dist_mts 
##     0.001127552     0.390631668

The p-value is 0.3906. Since the p-value is greater than 0.1, we have weak evidence that there is an association between burrow distance from the trail and time spent in burrow.

confint(lm(time_in_burrow_sec ~ burrow_dist_mts, data = Penguin_Data))
##                     2.5 %     97.5 %
## (Intercept)     84.074675 324.886843
## burrow_dist_mts -4.762156   1.881111

We are 95% confident that a one meter increase in burrow distance from the trail is associated with an average increase of -4.762 to 1.881 seconds increase in time spent in the burrow in a given 20 minute period in the population of penguins represented by this sample. Since the number 0 is included in the confidence interval, there is strong evidence that there is NOT an association between burrow distance from the trail and time spent in burrow.

X = burrow dist, Y = % of time spent active

favstats(prop_active ~ burrow_dist_mts, data = Penguin_Data)
##    burrow_dist_mts  min     Q1 median     Q3  max  mean         sd n missing
## 1                3 0.40 0.5125  0.600 0.7375 1.00 0.650 0.25495098 4       0
## 2              4.5 0.70 0.7000  0.700 0.7000 0.70 0.700         NA 1       0
## 3                5 0.15 0.1625  0.175 0.1875 0.20 0.175 0.03535534 2       0
## 4              5.1 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 5                6 0.70 0.7000  0.700 0.7000 0.70 0.700         NA 1       0
## 6              6.2 0.15 0.1500  0.150 0.1500 0.15 0.150         NA 1       0
## 7              6.5 0.05 0.0500  0.050 0.0500 0.05 0.050         NA 1       0
## 8              6.9 0.15 0.1500  0.150 0.1500 0.15 0.150         NA 1       0
## 9                7 0.25 0.3750  0.500 0.6250 0.75 0.500 0.35355339 2       0
## 10             7.1 0.40 0.4000  0.400 0.4000 0.40 0.400         NA 1       0
## 11               8 0.00 0.0750  0.150 0.2250 0.30 0.150 0.21213203 2       0
## 12             8.1 0.20 0.2000  0.200 0.2000 0.20 0.200         NA 1       0
## 13             8.5 0.40 0.4625  0.525 0.5875 0.65 0.525 0.17677670 2       0
## 14             9.5 0.00 0.0000  0.000 0.0000 0.00 0.000         NA 1       0
## 15              10 0.35 0.3500  0.350 0.3500 0.35 0.350 0.00000000 2       0
## 16            11.1 0.90 0.9000  0.900 0.9000 0.90 0.900         NA 1       0
## 17            12.7 0.20 0.2000  0.200 0.2000 0.20 0.200         NA 1       0
## 18            12.8 0.30 0.3000  0.300 0.3000 0.30 0.300         NA 1       0
## 19            13.2 0.25 0.2500  0.250 0.2500 0.25 0.250         NA 1       0
## 20            13.7 0.20 0.2000  0.200 0.2000 0.20 0.200         NA 1       0
## 21              15 0.25 0.2500  0.250 0.2500 0.25 0.250         NA 1       0
## 22              16 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 23              17 0.55 0.8000  1.000 1.0000 1.00 0.870 0.19874607 5       0
## 24              18 0.50 0.5500  0.600 0.6500 0.70 0.600 0.14142136 2       0
## 25            18.4 0.40 0.4000  0.400 0.4000 0.40 0.400         NA 1       0
## 26              20 0.10 0.2000  0.300 0.4000 0.50 0.300 0.28284271 2       0
## 27            20.4 0.65 0.6500  0.650 0.6500 0.65 0.650         NA 1       0
## 28            21.6 0.85 0.8500  0.850 0.8500 0.85 0.850         NA 1       0
## 29            22.1 0.35 0.3500  0.350 0.3500 0.35 0.350         NA 1       0
## 30            22.8 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 31            23.2 0.70 0.7000  0.700 0.7000 0.70 0.700         NA 1       0
## 32            23.5 0.05 0.0500  0.050 0.0500 0.05 0.050         NA 1       0
## 33            24.4 0.10 0.1000  0.100 0.1000 0.10 0.100         NA 1       0
## 34              25 0.50 0.6125  0.725 0.8375 0.95 0.725 0.31819805 2       0
## 35            25.7 0.25 0.2500  0.250 0.2500 0.25 0.250         NA 1       0
## 36              26 0.20 0.2000  0.200 0.2000 0.20 0.200         NA 1       0
## 37            27.9 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 38            29.4 0.60 0.6000  0.600 0.6000 0.60 0.600         NA 1       0
## 39              30 0.15 0.2125  0.275 0.3375 0.40 0.275 0.17677670 2       0
## 40            30.7 0.30 0.3000  0.300 0.3000 0.30 0.300         NA 1       0
## 41            31.8 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 42            33.1 0.50 0.5125  0.525 0.5375 0.55 0.525 0.03535534 2       0
## 43            34.8 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 44              38 0.45 0.5875  0.725 0.8625 1.00 0.725 0.38890873 2       0
## 45            38.8 0.95 0.9500  0.950 0.9500 0.95 0.950         NA 1       0
## 46              40 0.25 0.4750  0.725 0.9250 1.00 0.675 0.34278273 4       0
## 47              45 0.45 0.4500  0.450 0.4500 0.45 0.450         NA 1       0
## 48            47.1 0.30 0.3000  0.300 0.3000 0.30 0.300         NA 1       0
## 49            52.2 0.20 0.2000  0.200 0.2000 0.20 0.200         NA 1       0
## 50              60 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 51              63 0.05 0.0500  0.050 0.0500 0.05 0.050         NA 1       0
## 52            64.8 0.40 0.4000  0.400 0.4000 0.40 0.400         NA 1       0
## 53              70 0.95 0.9500  0.950 0.9500 0.95 0.950 0.00000000 2       0
## 54            74.2 0.55 0.5500  0.550 0.5500 0.55 0.550         NA 1       0
## 55            74.6 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 56              75 0.80 0.8000  0.800 0.8000 0.80 0.800         NA 1       0
## 57              80 0.35 0.3500  0.350 0.3500 0.35 0.350         NA 1       0
## 58             104 1.00 1.0000  1.000 1.0000 1.00 1.000         NA 1       0
## 59           112.4 0.55 0.5500  0.550 0.5500 0.55 0.550         NA 1       0
xyplot(prop_active ~ burrow_dist_mts, data = Penguin_Data)

cor(prop_active ~ burrow_dist_mts, data = Penguin_Data)
## [1] 0.2351067

The correlation coefficient (r) is 0.235. This suggests a positive association with a weak to moderate linear relationship between burrow distance from the trail and the proportion of time spend being active.

summary(lm(prop_active ~ burrow_dist_mts, data = Penguin_Data))
## 
## Call:
## lm(formula = prop_active ~ burrow_dist_mts, data = Penguin_Data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.60437 -0.26752 -0.05805  0.27603  0.53892 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.451417   0.054316   8.311 2.16e-12 ***
## burrow_dist_mts 0.003221   0.001498   2.150   0.0346 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3179 on 79 degrees of freedom
## Multiple R-squared:  0.05528,    Adjusted R-squared:  0.04332 
## F-statistic: 4.622 on 1 and 79 DF,  p-value: 0.03462

The p-value is 0.03462. Since the p-value less than 0.05, we have strong evidence that there is an association between burrow distance from the trail and the proportion of time spend being active.

confint(lm(prop_active ~ burrow_dist_mts, data = Penguin_Data))
##                        2.5 %      97.5 %
## (Intercept)     0.3433043358 0.559530344
## burrow_dist_mts 0.0002389776 0.006203988

We are 95% confident that a one meter increase in burrow distance from the trail is associated with an average increase of 0.0239 to 0.6204 percentage of time spend being active in the population of penguins represented by this sample. Since the number 0 is not included in the confidence interval, there is strong evidence that there is an association between burrow distance from the trail and time spent in burrow.

  1. X = time of day, Y = time in burrow
favstats(time_in_burrow_sec ~ time_day, data = Penguin_Data)
##   time_day min Q1 median  Q3  max     mean       sd  n missing
## 1      AFT   0  0      0   0 1200 107.0000 309.9405 30       0
## 2      MID   0  0      0   0  960 120.0000 270.6314 30       0
## 3      MOR   0  0      0 780 1200 311.4286 473.0569 21       0
anova(lm(time_in_burrow_sec ~ time_day, data = Penguin_Data))
## Analysis of Variance Table
## 
## Response: time_in_burrow_sec
##           Df  Sum Sq Mean Sq F value  Pr(>F)  
## time_day   2  611935  305968  2.5428 0.08515 .
## Residuals 78 9385487  120327                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The p-value is 0.08515. Since the p-value is between 0.05 and 0.1, we have #moderate evidence that there is an association between time of day and time the #penguins spent inside of their burrows.

dotPlot(~ time_in_burrow_sec | time_day, data = Penguin_Data, cex = 0.75, width = 1)

histogram(~ time_in_burrow_sec | time_day, data = Penguin_Data, width = 1)

bwplot(~ time_in_burrow_sec | time_day, horizontal = TRUE, data = Penguin_Data)

install.packages('tidyverse')
## 
## The downloaded binary packages are in
##  /var/folders/8l/gzyk464x6rd4yf1gn1d4r0g40000gn/T//RtmpGlkZQ0/downloaded_packages
library(tidyverse)
ggplot(data=Penguin_Data, mapping=aes(x=time_day, y=time_in_burrow_sec))+
  geom_boxplot()+
  stat_summary(fun = "mean", geom = "point", shape = 8,
               size = 2, color = "blue")+ 
  scale_y_continuous(limits = c(-0.1, 1))

install.packages('pairwiseCI')
## 
## The downloaded binary packages are in
##  /var/folders/8l/gzyk464x6rd4yf1gn1d4r0g40000gn/T//RtmpGlkZQ0/downloaded_packages
library(pairwiseCI)
pairwiseCI(time_in_burrow_sec ~ time_day, data = Penguin_Data, method="Param.diff")
##   
## 95 %-confidence intervals 
##  Method:  Difference of means assuming Normal distribution, allowing unequal variances 
##   
##   
##         estimate   lower upper
## MID-AFT     13.0 -137.43 163.4
## MOR-AFT    204.4  -35.41 444.3
## MOR-MID    191.4  -42.58 425.4
##   
## 

We are 95% confident that the difference in population means regarding time in burrow between morning and afternoon is between -35.41 and 444.3 seconds. We are 95% confident that the difference in population means regarding time in burrow between midday and afternoon is between -137.43 and 163.4 seconds. We are 95% confident that the difference in population means regarding time in burrow between midday and morning is between –42.58 and 425.4 seconds.

X = time of day, Y = prop_active

histogram(~ prop_active |time_day, data = Penguin_Data, width = 1)

dotPlot(~ prop_active |time_day, data = Penguin_Data, cex = 0.75, width = 1)

bwplot(~ prop_active |time_day, horizontal = TRUE, data = Penguin_Data)

library(tidyverse)
ggplot(data=Penguin_Data, mapping=aes(x=time_day, y=prop_active))+
  geom_boxplot()+
  stat_summary(fun = "mean", geom = "point", shape = 8,
               size = 2, color = "blue")+ 
  scale_y_continuous(limits = c(-0.1, 1))

  1. X = time of day, Y = % of time spent active
favstats(prop_active ~ time_day, data = Penguin_Data)
##   time_day  min     Q1 median     Q3 max      mean        sd  n missing
## 1      AFT 0.00 0.3625  0.675 0.9500   1 0.6200000 0.3377410 30       0
## 2      MID 0.05 0.2625  0.450 0.6375   1 0.4816667 0.2765188 30       0
## 3      MOR 0.00 0.1500  0.450 0.9500   1 0.5095238 0.3614620 21       0
anova(lm(prop_active ~ time_day, data = Penguin_Data))
## Analysis of Variance Table
## 
## Response: prop_active
##           Df Sum Sq Mean Sq F value Pr(>F)
## time_day   2 0.3136 0.15679  1.5027 0.2289
## Residuals 78 8.1385 0.10434

The p-value is 0.2289. Since the p-value is greater than 0.1, we have weak evidence that there is an association between time of day and the proportion of time penguins are active within a given 20 minute period.

library(pairwiseCI)
pairwiseCI(prop_active ~ time_day, data = Penguin_Data, method="Param.diff")
##   
## 95 %-confidence intervals 
##  Method:  Difference of means assuming Normal distribution, allowing unequal variances 
##   
##   
##         estimate   lower  upper
## MID-AFT  -0.1383 -0.2980 0.0213
## MOR-AFT  -0.1105 -0.3126 0.0917
## MOR-MID   0.0279 -0.1621 0.2179
##   
## 

We are 95% confident that the difference in population proportions of time active to total time between morning and afternoon is between -0.3126 and 0.0917. We are 95% confident that the difference in population proportions of time active to total time between midday and afternoon is between -0.2980 and 0.0213. We are 95% confident that the difference in population proportions of time active to total time between midday and morning is between -0.1621 and 0.2179.

X = Time of day, Y = # of calls

histogram(~ Calls |time_day, data = Penguin_Data, width = 1)

dotPlot(~ Calls |time_day, data = Penguin_Data, cex = 0.75, width = 1)

bwplot(~ Calls |time_day, horizontal = TRUE, data = Penguin_Data)

library(tidyverse)
ggplot(data=Penguin_Data, mapping=aes(x=time_day, y=Calls))+
  geom_boxplot()+
  stat_summary(fun = "mean", geom = "point", shape = 8,
               size = 2, color = "blue")+ 
  scale_y_continuous(limits = c(-0.1, 1))

#. X = time of day, Y = calls

favstats(Calls ~ time_day, data = Penguin_Data)
##   time_day min Q1 median Q3 max      mean        sd  n missing
## 1      AFT   0  0      0  0   3 0.2333333 0.6260623 30       0
## 2      MID   0  0      0  0   2 0.1666667 0.4611330 30       0
## 3      MOR   0  0      0  0   3 0.3333333 0.9128709 21       0
anova(lm(Calls ~ time_day, data = Penguin_Data))
## Analysis of Variance Table
## 
## Response: Calls
##           Df Sum Sq Mean Sq F value Pr(>F)
## time_day   2  0.343 0.17160  0.3914 0.6774
## Residuals 78 34.200 0.43846

The p-value is 0.6774. Since the p-value is greater than 0.1, we have weak evidence that there is an association between time of day and the number of calls the penguins did within a given 20 minute period.

library(pairwiseCI)
pairwiseCI(Calls ~ time_day, data = Penguin_Data, method="Param.diff")
##   
## 95 %-confidence intervals 
##  Method:  Difference of means assuming Normal distribution, allowing unequal variances 
##   
##   
##         estimate   lower  upper
## MID-AFT  -0.0667 -0.3514 0.2180
## MOR-AFT   0.1000 -0.3673 0.5673
## MOR-MID   0.1667 -0.2769 0.6103
##   
## 

We are 95% confident that the difference in mean calls of the Magellanic Penguins between morning and afternoon is between -0.3673 and 0.5673 calls. We are 95% confident that the difference in mean calls of the Magellanic Penguins between morning and midday is between -0.2769 and 0.6103 calls. We are 95% confident that the difference in mean calls of the Magellanic Penguins between midday and afternoon is between -0.3514 and 0.2180 calls.

  1. X = burrow dist, Y = calls
xyplot(Calls ~ burrow_dist_mts, data = Penguin_Data)

favstats(Calls ~ burrow_dist_mts, data = Penguin_Data)
##    burrow_dist_mts min   Q1 median   Q3 max mean        sd n missing
## 1                3   0 0.00    0.0 0.00   0  0.0 0.0000000 4       0
## 2              4.5   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 3                5   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 4              5.1   3 3.00    3.0 3.00   3  3.0        NA 1       0
## 5                6   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 6              6.2   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 7              6.5   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 8              6.9   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 9                7   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 10             7.1   1 1.00    1.0 1.00   1  1.0        NA 1       0
## 11               8   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 12             8.1   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 13             8.5   0 0.25    0.5 0.75   1  0.5 0.7071068 2       0
## 14             9.5   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 15              10   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 16            11.1   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 17            12.7   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 18            12.8   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 19            13.2   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 20            13.7   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 21              15   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 22              16   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 23              17   0 0.00    1.0 1.00   3  1.0 1.2247449 5       0
## 24              18   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 25            18.4   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 26              20   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 27            20.4   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 28            21.6   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 29            22.1   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 30            22.8   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 31            23.2   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 32            23.5   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 33            24.4   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 34              25   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 35            25.7   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 36              26   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 37            27.9   1 1.00    1.0 1.00   1  1.0        NA 1       0
## 38            29.4   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 39              30   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 40            30.7   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 41            31.8   1 1.00    1.0 1.00   1  1.0        NA 1       0
## 42            33.1   0 0.25    0.5 0.75   1  0.5 0.7071068 2       0
## 43            34.8   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 44              38   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 45            38.8   1 1.00    1.0 1.00   1  1.0        NA 1       0
## 46              40   0 0.00    0.0 0.00   0  0.0 0.0000000 4       0
## 47              45   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 48            47.1   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 49            52.2   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 50              60   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 51              63   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 52            64.8   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 53              70   0 0.00    0.0 0.00   0  0.0 0.0000000 2       0
## 54            74.2   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 55            74.6   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 56              75   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 57              80   0 0.00    0.0 0.00   0  0.0        NA 1       0
## 58             104   3 3.00    3.0 3.00   3  3.0        NA 1       0
## 59           112.4   2 2.00    2.0 2.00   2  2.0        NA 1       0
cor(Calls ~ burrow_dist_mts, data = Penguin_Data)
## [1] 0.2093953

The correlation coefficient (r) is 0.2093953. This suggests a positive association with a weak linear relationship between burrow distance from the trail and the number of calls in a given 20-minute period.

summary(lm(Calls ~ burrow_dist_mts, data = Penguin_Data))$coefficients[,4]
##     (Intercept) burrow_dist_mts 
##      0.50002506      0.06063846

The p-value is 0.0606. Since the p-value is between 0.05 and 0.1, we have moderate evidence that there is an association between burrow distance from the trail and the number of calls in a given 20-minute period.

confint(lm(Calls ~ burrow_dist_mts, data = Penguin_Data))
##                         2.5 %     97.5 %
## (Intercept)     -0.1450315643 0.29473091
## burrow_dist_mts -0.0002654631 0.01186623

We are 95% confident that a one meter increase in burrow distance from the trail is associated with an average increase of -0.000265 to 0.011866 calls in a 20-minute period for the population of penguins represented by this sample. Since the number 0 is included in the confidence interval, there is not strong evidence that there is an association between burrow distance from the trail and number of calls.

X = Wind speed, Y = Time in Burrow

xyplot(time_in_burrow_sec ~ Wind_kph, data = Penguin_Data)

favstats(time_in_burrow_sec ~ Wind_kph, data = Penguin_Data)
##    Wind_kph min  Q1 median  Q3  max      mean       sd  n missing
## 1      12.9   0   0      0 900 1200 400.00000 619.6773  6       0
## 2      14.5   0   0      0   0  600  93.33333 205.9126  9       0
## 3      19.3   0   0      0   0  120  13.33333  40.0000  9       0
## 4      20.9   0   0      0 630 1200 296.00000 448.6933 15       0
## 5      24.1   0   0      0   0  960 115.00000 292.2172 12       0
## 6      25.7  30 135    240 330  420 230.00000 195.1922  3       0
## 7      32.2   0   0      0 360 1200 286.66667 483.5287  9       0
## 8        37   0   0      0   0  900 100.00000 300.0000  9       0
## 9      40.2   0   0      0   0    0   0.00000   0.0000  6       0
## 10     46.7   0   0      0   0    0   0.00000   0.0000  3       0
cor(time_in_burrow_sec ~ Wind_kph, data = Penguin_Data)
## [1] -0.1318761

The correlation coefficient (r) is -0.1319. This suggests a negative association with a weak linear relationship between wind speed and the time the penguins spent inside their burrows.

summary(lm(time_in_burrow_sec ~ Wind_kph, data = Penguin_Data))$coefficients[,4]
## (Intercept)    Wind_kph 
##  0.01273802  0.24056696

The p-value is 0.2406. Since the p-value is greater than 0.1, we have weak evidence that there is an association between wind speed and the time the penguins spent inside their burrows.

confint(lm(time_in_burrow_sec ~ Wind_kph, data = Penguin_Data))
##                 2.5 %     97.5 %
## (Intercept)  64.03243 520.360051
## Wind_kph    -13.40403   3.413333

We are 95% confident that a one kilometer increase in wind speed is associated with an average increase of -13.4 to 3.4 seconds increase in time spent in the burrow in a given 20 minute period in the population of penguins represented by this sample.

X = Wind speed, Y = Proportion Active

xyplot(prop_active ~ Wind_kph, data = Penguin_Data)

favstats(prop_active ~ Wind_kph, data = Penguin_Data)
##    Wind_kph  min     Q1 median     Q3  max      mean        sd  n missing
## 1      12.9 0.00 0.2000  0.375 0.8875 1.00 0.4916667 0.4317600  6       0
## 2      14.5 0.05 0.3500  0.600 0.9500 1.00 0.6222222 0.3518799  9       0
## 3      19.3 0.05 0.2500  0.450 0.9000 1.00 0.5500000 0.3614208  9       0
## 4      20.9 0.15 0.2250  0.450 0.7000 1.00 0.5200000 0.3138471 15       0
## 5      24.1 0.05 0.3250  0.450 0.5500 0.95 0.4625000 0.2797117 12       0
## 6      25.7 0.80 0.9000  1.000 1.0000 1.00 0.9333333 0.1154701  3       0
## 7      32.2 0.00 0.1500  0.300 0.5500 1.00 0.4055556 0.3753702  9       0
## 8        37 0.20 0.3000  0.400 0.5500 1.00 0.4611111 0.2509703  9       0
## 9      40.2 0.35 0.3875  0.650 0.9500 1.00 0.6666667 0.3060501  6       0
## 10     46.7 0.65 0.7000  0.750 0.8250 0.90 0.7666667 0.1258306  3       0
cor(prop_active ~ Wind_kph, data = Penguin_Data)
## [1] 0.02962801

The correlation coefficient (r) is 0.02963. This suggests a positive association with a weak linear relationship between wind speed and the proportion of time the penguins were active.

summary(lm(prop_active ~ Wind_kph, data = Penguin_Data))$coefficients[,4]
##  (Intercept)     Wind_kph 
## 6.456605e-06 7.928857e-01

The p-value is 0.7929. Since the p-value is greater than 0.1, we have weak evidence that there is an association between wind speed and the proportion of time the penguins were active.

confint(lm(prop_active ~ Wind_kph, data = Penguin_Data))
##                    2.5 %      97.5 %
## (Intercept)  0.302264205 0.725355435
## Wind_kph    -0.006764334 0.008828148

We are 95% confident that a one kilometer increase in wind speed is associated with an average increase of -0.676 to 0.883 percentage increase in time spent active in a given 20 minute period in the population of penguins represented by this sample.

X = Temperature, Y = Time in Burrow

xyplot(time_in_burrow_sec ~ Temperature_C, data = Penguin_Data)

favstats(time_in_burrow_sec ~ Temperature_C, data = Penguin_Data)
##   Temperature_C min  Q1 median  Q3  max      mean       sd  n missing
## 1            10   0   0      0   0  600  93.33333 205.9126  9       0
## 2          11.1   0   0      0   0  480  50.00000 139.7400 12       0
## 3          12.2   0   0      0  90 1200 215.00000 432.2562 12       0
## 4          12.8   0   0      0 900 1200 400.00000 619.6773  6       0
## 5            15   0   0      0   0  960 115.00000 292.2172 12       0
## 6          16.1   0   0      0  60 1200 231.42857 423.5361 21       0
## 7          17.2   0   0      0   0    0   0.00000   0.0000  6       0
## 8            20  30 135    240 330  420 230.00000 195.1922  3       0
cor(time_in_burrow_sec ~ Temperature_C, data = Penguin_Data)
## [1] 0.05504059

The correlation coefficient (r) is 0.05504. This suggests a positive association with a weak linear relationship between temperature and time the penguins spent inside their burrows.

summary(lm(time_in_burrow_sec ~ Temperature_C, data = Penguin_Data))$coefficients[,4]
##   (Intercept) Temperature_C 
##     0.7667600     0.6255242

The p-value is 0.6256. Since the p-value is greater than 0.1, we have weak evidence that there is an association between temperature and time the penguins spent inside their burrows.

confint(lm(time_in_burrow_sec ~ Temperature_C, data = Penguin_Data))
##                    2.5 %    97.5 %
## (Intercept)   -358.15501 484.10040
## Temperature_C  -22.40259  37.03275

We are 95% confident that a one degree Celsius increase in temperature is associated with an average increase of -22.40 to 37.03 seconds increase in time spent in the burrow in a given 20 minute period in the population of penguins represented by this sample.

X = Temperature, Y = Proportion Active

xyplot(prop_active ~ Temperature_C, data = Penguin_Data)

favstats(prop_active ~ Temperature_C, data = Penguin_Data)
##   Temperature_C  min     Q1 median     Q3  max      mean        sd  n missing
## 1            10 0.05 0.3500  0.600 0.9500 1.00 0.6222222 0.3518799  9       0
## 2          11.1 0.05 0.2000  0.400 0.7000 1.00 0.4750000 0.3071127 12       0
## 3          12.2 0.00 0.1500  0.350 0.6625 1.00 0.4458333 0.3677069 12       0
## 4          12.8 0.00 0.2000  0.375 0.8875 1.00 0.4916667 0.4317600  6       0
## 5            15 0.05 0.3250  0.450 0.5500 0.95 0.4625000 0.2797117 12       0
## 6          16.1 0.15 0.3000  0.550 0.7500 1.00 0.5619048 0.2978694 21       0
## 7          17.2 0.35 0.3875  0.650 0.9500 1.00 0.6666667 0.3060501  6       0
## 8            20 0.80 0.9000  1.000 1.0000 1.00 0.9333333 0.1154701  3       0
cor(prop_active ~ Temperature_C, data = Penguin_Data)
## [1] 0.162404

The correlation coefficient (r) is 0.1624. This suggests a positive association with a weak linear relationship between temperature and the porportion of time the penguins were active.

summary(lm(prop_active ~ Temperature_C, data = Penguin_Data))$coefficients[,4]
##   (Intercept) Temperature_C 
##     0.1738436     0.1474623

The p-value is 0.1474623. Since the p-value is greater than 0.1, we have weak evidence that there is an association between temperature and the porportion of time the penguins were active.

confint(lm(prop_active ~ Temperature_C, data = Penguin_Data))
##                      2.5 %     97.5 %
## (Intercept)   -0.118829977 0.64647891
## Temperature_C -0.007156834 0.04684863

We are 95% confident that a one degree Celsius increase in temperature is associated with an average increase of 0.716 to 4.684 percentage increase in time spent active in a given 20 minute period in the population of penguins represented by this sample.

X = Wind, Y = Calls

xyplot(Calls ~ Wind_kph, data = Penguin_Data)

favstats(Calls ~ Wind_kph, data = Penguin_Data)
##    Wind_kph min Q1 median Q3 max      mean        sd  n missing
## 1      12.9   0  0      0  0   0 0.0000000 0.0000000  6       0
## 2      14.5   0  0      0  0   1 0.2222222 0.4409586  9       0
## 3      19.3   0  0      0  0   1 0.2222222 0.4409586  9       0
## 4      20.9   0  0      0  0   0 0.0000000 0.0000000 15       0
## 5      24.1   0  0      0  0   0 0.0000000 0.0000000 12       0
## 6      25.7   1  1      1  2   3 1.6666667 1.1547005  3       0
## 7      32.2   0  0      0  1   3 0.7777778 1.3017083  9       0
## 8        37   0  0      0  0   2 0.3333333 0.7071068  9       0
## 9      40.2   0  0      0  0   0 0.0000000 0.0000000  6       0
## 10     46.7   0  0      0  0   0 0.0000000 0.0000000  3       0
cor(Calls ~ Wind_kph, data = Penguin_Data)
## [1] 0.09783985

The correlation coefficient (r) is 0.0978. This suggests a positive association with a weak linear relationship between wind and the number of penguin calls within a given 20-minute period.

summary(lm(Calls ~ Wind_kph, data = Penguin_Data))$coefficients[,4]
## (Intercept)    Wind_kph 
##   0.7837789   0.3848692

The p-value is 0.385. Since the p-value is greater than 0.1, we have weak evidence that there is an association between wind and the number of penguin calls within a given 20-minute period.

confint(lm(Calls ~ Wind_kph, data = Penguin_Data))
##                   2.5 %     97.5 %
## (Intercept) -0.36689979 0.48469913
## Wind_kph    -0.00880334 0.02258124

We are 95% confident that a one kilometer increase in wind speed is associated with an average increase of -0.8803 to 2.258 calls in a given 20 minute period in the population of penguins represented by this sample.

X = Temperature, Y = Calls

xyplot(Calls ~ Temperature_C, data = Penguin_Data)

favstats(Calls ~ Temperature_C, data = Penguin_Data)
##   Temperature_C min Q1 median   Q3 max      mean        sd  n missing
## 1            10   0  0      0 0.00   1 0.2222222 0.4409586  9       0
## 2          11.1   0  0      0 0.00   1 0.1666667 0.3892495 12       0
## 3          12.2   0  0      0 0.25   3 0.5833333 1.1645002 12       0
## 4          12.8   0  0      0 0.00   0 0.0000000 0.0000000  6       0
## 5            15   0  0      0 0.00   0 0.0000000 0.0000000 12       0
## 6          16.1   0  0      0 0.00   2 0.1428571 0.4780914 21       0
## 7          17.2   0  0      0 0.00   0 0.0000000 0.0000000  6       0
## 8            20   1  1      1 2.00   3 1.6666667 1.1547005  3       0
cor(Calls ~ Temperature_C, data = Penguin_Data)
## [1] 0.08137067

The correlation coefficient (r) is 0.0814. This suggests a positive association with a weak linear relationship between temperature and the number of penguin calls within a given 20-minute period.

summary(lm(Calls ~ Temperature_C, data = Penguin_Data))$coefficients[,4]
##   (Intercept) Temperature_C 
##     0.9084304     0.4702009

The p-value is 0.4702. Since the p-value is greater than 0.1, we have weak evidence that there is an association between temperature and the number of penguin calls within a given 20-minute period.

confint(lm(Calls ~ Temperature_C, data = Penguin_Data))
##                     2.5 %     97.5 %
## (Intercept)   -0.82668697 0.73609150
## Temperature_C -0.03503812 0.07524228

We are 95% confident that a one degree Celsius increase in temperature is associated with an average increase of -0.0350 to 0.0752 calls in a given 20 minute period in the population of penguins represented by this sample.