Exercise

Filter

In the previous exercise, you computed the mean birth weight for full-term babies; you filtered out preterm babies because their distribution of weight is different.

The distribution of weight is also different for multiple births, like twins and triplets. In this exercise, you'll filter them out, too, and see what effect it has on the mean.

Instructions

100 XP
  • Use the variable 'nbrnaliv' to make a Boolean Series that is True for single births (where 'nbrnaliv' equals 1) and False otherwise.
  • Use Boolean Series and logical operators to select single, full-term babies and compute their mean birth weight.
  • For comparison, select multiple, full-term babies and compute their mean birth weight.