The goal of this presentation is to understand if penguin flipper length can predict their body mass.
We will explore the relationship between flipper length and body mass using linear regression and hypothesis testing.
October 2026
The goal of this presentation is to understand if penguin flipper length can predict their body mass.
We will explore the relationship between flipper length and body mass using linear regression and hypothesis testing.
We will use the Palmer Penguins dataset, which contains measurements from 344 penguins belonging to three different species:
The two variables we will investigate are:
We will use linear regression to determine whether flipper length can predict body mass.
First we’ll examine some descriptive statistics for penguin flipper length and body mass to understand their averages and standard deviations. The histogram below will show us the distribution of flipper lengths for penguins.
| Mean Flipper Length (mm) | Mean Body Mass (g) | SD Flipper Length (mm) | SD Body Mass (g) |
|---|---|---|---|
| 200.92 | 4201.75 | 14.06 | 801.95 |
Simple linear regression allows us to predict the value of one numerical variable based on another.
For our analysis, we will use the following equation:
\[ \hat{Y} = \beta_0 + \beta_1 X \]
Where:
Interpretation: The slope represents the expected change in penguin body mass (grams) for every 1 mm increase in flipper length.
ggplot(penguins_clean,
aes(flipper_length_mm, body_mass_g)) +
geom_point(color = "steelblue") +
geom_smooth(method = "lm", se = TRUE) +
labs(x = "Flipper Length (mm)",
y = "Body Mass (g)") +
theme_minimal()
Coefficient of Determination:
\[ R^2 = 1 - \frac{SS_{res}}{SS_{tot}} \]
\(R^2\) measures the proportion of variation in body mass explained by flipper length.
Hypothesis Testing:
\[ H_0: \beta_1 = 0 \qquad H_a: \beta_1 \neq 0 \]
R-Squared: 0.759
Slope: 49.69 g/mm
P-Value: < 2.22e-16
This reveals that flipper length explains ~76% of the variation in body mass and for each added millimeter of flipper length predicted body mass grows by ~50 g.
Key Observations:
Takeaway:
Accounting for penguin species may improve body mass predictions.
Adelie Penguin
Chinstrap Penguin
Gentoo Penguin
Can Penguin Flipper Length Predict Body Mass?
Our linear regression analysis suggests that flipper length is a strong predictor of body mass.
Key Findings:
Limitations: