pregnancy_status <- babies %>%
filter(gestation > 0) %>%
group_by(parity) %>%
summarise(min_gestation = min(gestation, na.rm = TRUE), avg_gestation = mean(gestation, na.rm = TRUE), max_gestation = max(gestation, na.rm = TRUE)) %>%
print()
## # A tibble: 2 × 4
## parity min_gestation avg_gestation max_gestation
## <int> <int> <dbl> <int>
## 1 0 148 279. 353
## 2 1 234 281. 323
Answer: Since the difference is insignificant, the first pregnancy status does not have a major correlation with gestation length in this specific dataset.