Run the standard setup from the Student Overview before starting this assignment.
Do babies whose mothers smoked during pregnancy have different birth weights than babies whose mothers did not smoke?
| Variable | Meaning | Type |
|---|---|---|
bwt |
Baby’s birth weight in ounces | Quantitative outcome |
smoke |
Smoking status during pregnancy; 0 = no, 1
= yes |
Categorical grouping variable |
boxplot(bwt ~ smoke_bi, data = babies,
names = c("Non-smoker", "Smoker"),
ylab = "Birth Weight (ounces)",
main = "Birth Weight by Maternal Smoking Status")
stripchart(bwt ~ smoke_bi, data = babies,
vertical = TRUE,
method = "jitter",
pch = 16,
add = TRUE)aggregate(bwt ~ smoke_bi, data = babies, FUN = mean, na.rm = TRUE)
aggregate(bwt ~ smoke_bi, data = babies, FUN = sd, na.rm = TRUE)
table(babies$smoke_bi)| Group | n | Mean birth weight | SD |
|---|---|---|---|
| Non-smoker | |||
| Smoker |
Null hypothesis: There is no difference in average birth weight between babies whose mothers smoked and babies whose mothers did not smoke.
Alternative hypothesis: There is a difference in average birth weight between babies whose mothers smoked and babies whose mothers did not smoke.
Use Welch’s t-test, which is the default in R and does not assume equal variances.
t.test(bwt ~ smoke_bi, data = babies)Cohen’s d is the effect size for an independent-samples t-test. It is reported regardless of whether the result is statistically significant.
library(effsize)
cohen.d(bwt ~ smoke_bi, data = babies, na.rm = TRUE)Cohen’s d conventions: small ≈ 0.20, medium ≈ 0.50, large ≈ 0.80.
| Output value | Value |
|---|---|
| Mean birth weight: non-smoker group | |
| Mean birth weight: smoker group | |
| Difference between means | |
| t statistic | |
| degrees of freedom | |
| p-value | |
| 95% confidence interval for the difference | |
| Cohen’s d | |
| Effect size interpretation (small / medium / large) |
An independent-samples Welch t-test was used to compare birth weight between babies whose mothers smoked during pregnancy and babies whose mothers did not smoke. Babies in the non-smoking group had a mean birth weight of ____ ounces (SD = ____), whereas babies in the smoking group had a mean birth weight of ____ ounces (SD = ____). The difference was [statistically significant / not statistically significant], t(____) = ____, p = ____. The mean difference was approximately ____ ounces (95% CI [____, ____]). Cohen’s d = ____, indicating a [small / medium / large] effect.