Baby Dataset 2: Correlation and Simple Regression

Setup

Run the standard setup from the Student Overview before starting this assignment.

Research Question

Do babies with longer gestation lengths tend to have higher birth weights?

Variables

Variable Meaning Type
bwt Baby’s birth weight in ounces Quantitative outcome
gestation Length of pregnancy in days Quantitative predictor

Decision Point 1: What Kind of Analysis Fits?

  1. Is bwt quantitative or categorical?
  2. Is gestation quantitative or categorical?
  3. Are we comparing groups, or examining a relationship between two quantitative variables?
  4. Would a t-test fit this question? Why or why not?
  5. Would correlation fit this question? Why or why not?
  6. Would simple linear regression fit this question? Why or why not?

Visualize First

plot(babies$gestation, babies$bwt,
     xlab = "Gestation Length (days)",
     ylab = "Birth Weight (ounces)",
     main = "Birth Weight by Gestation Length",
     pch = 16)

abline(lm(bwt ~ gestation, data = babies), lwd = 2)

Visual Interpretation

  1. Does the relationship appear positive, negative, or close to zero?
  2. Does the pattern look roughly linear?
  3. Are there possible outliers?
  4. How strong does the relationship look?
  5. What would the scatterplot look like if gestation length had no relationship with birth weight?

Part 1: Correlation

The correlation coefficient r is itself an effect size. A larger absolute value of r indicates a stronger relationship.

cor.test(babies$gestation, babies$bwt, use = "complete.obs")

Record:

Statistic Value
Correlation, r
Effect size interpretation (small ≈ .10, medium ≈ .30, large ≈ .50)
p-value
95% confidence interval for r

Questions

  1. Is the correlation positive or negative?
  2. How would you describe the effect size — small, medium, or large?
  3. Is the correlation statistically significant?
  4. What does the correlation tell us in plain language?
  5. Does correlation tell us how much birth weight increases for each additional day of gestation?
  6. Does correlation prove that longer gestation causes higher birth weight?

Part 2: Simple Linear Regression

model_gestation <- lm(bwt ~ gestation, data = babies)
summary(model_gestation)

R² is the effect size for regression. It tells you what proportion of the variance in birth weight is explained by gestation length.

Record:

Output value Meaning Value
Intercept Predicted birth weight when gestation = 0
Slope for gestation Predicted change in birth weight per additional day of gestation
p-value for gestation Whether the slope is statistically different from 0
R² Proportion of variance in birth weight explained by gestation

Regression Equation

Predicted birth weight = ____ + ____ × (gestation)

Prediction Practice

Gestation length Predicted birth weight
250 days
270 days
290 days

Scientific Report

A simple linear regression was used to test whether gestation length predicted birth weight. Gestation length was a [significant / non-significant] predictor of birth weight, b = ____, t(____) = ____, p = ____. The model explained ____% of the variance in birth weight, R² = ____. Each additional day of gestation was associated with a predicted ____ ounce [increase / decrease] in birth weight.

Note: R² is reported regardless of whether the result is statistically significant.

What Can and Can’t We Conclude?

  1. Can we say gestation length is associated with birth weight?
  2. Can we say gestation length predicts birth weight statistically?
  3. Can we say gestation length is the only factor that matters?
  4. What other variables might also help explain birth weight?