Run the standard setup from the Student Overview before starting this assignment.
Does birth weight differ across maternal age groups?
| Variable | Meaning | Type |
|---|---|---|
bwt |
Baby’s birth weight in ounces | Quantitative outcome |
age_group |
Maternal age category; 1 = teens, 2 = 20s,
3 = 30s+ |
Categorical grouping variable |
babies$age_group <- factor(babies$age_group,
levels = c(1, 2, 3),
labels = c("Teens", "20s", "30s+"))boxplot(bwt ~ age_group, data = babies,
ylab = "Birth Weight (ounces)",
xlab = "Maternal Age Group",
main = "Birth Weight by Maternal Age Group")
stripchart(bwt ~ age_group, data = babies,
vertical = TRUE,
method = "jitter",
pch = 16,
add = TRUE)aggregate(bwt ~ age_group, data = babies, FUN = mean, na.rm = TRUE)
aggregate(bwt ~ age_group, data = babies, FUN = sd, na.rm = TRUE)
table(babies$age_group)| Age group | n | Mean birth weight | SD |
|---|---|---|---|
| Teens | |||
| 20s | |||
| 30s+ |
Null hypothesis: Average birth weight is the same across all maternal age groups.
Alternative hypothesis: At least one maternal age group has a different average birth weight.
model_age <- aov(bwt ~ age_group, data = babies)
summary(model_age)η² (eta-squared) is the effect size for ANOVA. It is the proportion of total variance in birth weight explained by age group. It is reported regardless of whether the result is statistically significant.
# Extract SS values from the ANOVA summary
anova_summary <- summary(model_age)[[1]]
SS_between <- anova_summary["age_group", "Sum Sq"]
SS_total <- sum(anova_summary["Sum Sq"])
eta_sq <- SS_between / SS_total
eta_sqη² conventions: small ≈ .01, medium ≈ .06, large ≈ .14.
| Output value | Value |
|---|---|
| F statistic | |
| df between groups | |
| df within groups | |
| p-value | |
| η² | |
| Effect size interpretation (small / medium / large) |
TukeyHSD(model_age)| Comparison | Mean difference | p-value | Significant? |
|---|---|---|---|
| Teens vs 20s | |||
| Teens vs 30s+ | |||
| 20s vs 30s+ |
A one-way ANOVA was used to compare birth weight across maternal age groups. Mean birth weight was ____ ounces (SD = ____) for teens, ____ ounces (SD = ____) for mothers in their 20s, and ____ ounces (SD = ____) for mothers in their 30s or older. The ANOVA showed that birth weight [did / did not] differ significantly across age groups, F(____, ____) = ____, p = ____. η² = ____, indicating a [small / medium / large] effect. [If significant: Tukey post-hoc tests indicated that ____ differed from ____, p = ____.] These results suggest that maternal age group was [associated / not clearly associated] with birth weight in this sample.