Estimate Std. Error t value Pr(>|t|)
(Intercept) 20.88546832 0.84388321 24.749240 4.715137e-78
bill_length_mm -0.08502128 0.01906694 -4.459093 1.119662e-05
SDS 291
October 15, 2025
Research Question
What is the association between the bill depth and bill length of Antarctic penguins?
Simple Linear Regression
Multiple Linear Regression
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.30840672 1.219365662 28.136274 1.104331e-90
bill_length_mm 0.09405042 0.020509566 4.585686 6.375054e-06
flipper_length_mm -0.10595571 0.007963019 -13.305972 8.593353e-33




General Form of a Multiple Regression Model for the Mean
\[E[Y|x_1, x_2] = \beta_0 + \beta_1x_1 + \beta_2 x_2\]
\[ \widehat{\texttt{depth}} = 34.31 + 0.09\left(\texttt{bill}\right) - 0.11\left(\texttt{flipper}\right) \]
Research Question
What is the association between the bill depth and bill length of Antarctic penguins, holding penguin flipper length constant?
2.5 % 97.5 %
(Intercept) 31.90993097 36.70688247
bill_length_mm 0.05370838 0.13439246
flipper_length_mm -0.12161886 -0.09029256
Interpretation
We are 95% confident that a one mm increase in bill length is associated with between a 0.05 mm and 0.13 mm increase in mean bill depth among Antarctic penguins, holding penguin flipper length constant.
Research Question
Is there a linear relationship between the bill depth and bill length of Antarctic penguins, after accounting for penguin flipper length?
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.30840672 1.219365662 28.136274 1.104331e-90
bill_length_mm 0.09405042 0.020509566 4.585686 6.375054e-06
flipper_length_mm -0.10595571 0.007963019 -13.305972 8.593353e-33
Interpretation
After controlling for the effects of penguin flipper length, there is a statistically significant relationship between the bill depth and bill length of Antarctic penguins (\(p < 0.001\)).
Note
What other factors might confound the relationship between bill depth and bill length?
Indicators: use two values, usually 0 and 1, to indicate whether an observation does (1) or does not (0) belong to a particular category
Binary Categorical Variable (\(k = 2\))
Can represent a penguin’s sex using one indicator: \[ \texttt{Male}_i = \begin{cases} \ 1 & \text{if penguin }i\text{ is male}\\ \ 0 & \text{if penguin }i \text{ is not male} \end{cases} \]
Categorical Variable (\(k > 2\))
Can represent the three penguin species found in the Palmer Archipelago (Adelie, Chinstrap, and Gentoo) using two indicators: \[\begin{align*} \texttt{Adelie}_i &= \begin{cases} \ 1 & \text{if penguin }i\text{ is a Adelie penguin}\\ \ 0 & \text{otherwise} \end{cases}\\ \texttt{Gentoo}_i &= \begin{cases} \ 1 & \text{if penguin }i\text{ is a Gentoo penguin}\\ \ 0 & \text{otherwise} \end{cases} \end{align*}\]
Represented by factor variables:
[1] "Adelie" "Chinstrap" "Gentoo"
lm() automatically creates indicators for any factor
Estimate Std. Error t value Pr(>|t|)
(Intercept) 8.6589862 0.86206892 10.04442 6.039045e-21
bill_length_mm 0.1998943 0.01749365 11.42668 8.661124e-26
speciesAdelie 1.9331943 0.22416005 8.62417 2.545386e-16
speciesGentoo -3.1728258 0.14592926 -21.74222 3.473444e-66
Fitted Model
\[\widehat{y} = 8.66 + 0.20x_1 + 1.93x_2 - 3.17 x_3\]

SDS 291