Adriana Shier

Total Page:16

File Type:pdf, Size:1020Kb

Adriana Shier

Project

Adriana Shier February 23, 2017

Studies have shown, that a way an expecting mother care's for herself influences the health of the baby. The research conducted by other researchers has been focused on the mother's diet and characteristics. Some of the diet variables have been alcohol consumption and smoking habits of the mother. Other characteristics that have played a role in research is the education and income level of the expecting mother. All these variables have shown in studies to have an impact on a baby's health. library(ggplot2) NCbirths<-read.csv("c:/Users/Rod/Desktop/school math130/NCbirths.csv") #str(NCbirths)

Data Description The data used in this Analysis project was given to us by our instructor. None of the data was performed by myself, it was used to study the birth rates of North Carolina in 2004. The study was conducted using a random sample of 1,000 women. The data consisted of 13 variables about the mother’s and father’s background, marital status, education and living habits. The first variable I considered to observe is the weight of the babies born in this sample. Then I'm going to compare the weight with the variable "habit" (smoking, nonsmoking) to see the weight difference among babies whose mothers smoked or didn’t smoke. Univariate section ggplot(NCbirths, aes(x=weight))+geom_histogram(colour="black",fill="pink") +ggtitle("Distribution of the babies weight in the sample")

summary(NCbirths$weight)

## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 1.000 6.380 7.310 7.101 8.060 11.750

The histogram displays the distribution of the baby’s weights in the year of 2004 in North Carolina from the random sample. The weight is distributed from 1-11.75 lbs. Per the data, the average weight for a baby born from the sample is 7.1 lbs with the minimum birth weight of 1lb and a maximum birth weight of 11.75lbs. smoke<-table(NCbirths$habit) ggplot(NCbirths, aes(x=habit)) + geom_bar(colour="black",fill="blue") +ggtitle("Habit of Mothers")

table(NCbirths$habit) ## ## nonsmoker smoker ## 873 126

The second variable I analyzed was the mother's "habit". In the bar graph above the mothers fit into two categories smoking and nonsmoking. Since the bar graph is a little more difficult to see the exact number of mother's habit. I displayed a table below the graph, per the table’s output there are 873 mothers who didn't smoke during their pregnancy and 127 who did. Bivariate comparison section ggplot(NCbirths, aes(x=habit, y=weight)) + geom_boxplot(colour="black", fill="pink")+ggtitle("Weight of the baby depending on mother's Habit ") +facet_wrap(~habit)

The boxplot above shows the distribution of the baby’s weight based on the mother’s habit of smoking. When comparing both types of mothers, the average weight given by the data is very close to the average weight among babies born to smokers and non-smokers. However, there seem to be more outliers in the non-smokers sample. The reason for these outliers could be other characteristics of the lifestyle of the mother that were not considered in this dataset. Some of these omitted variables could be past medical history information or other diet characteristics. To consider using this analysis for a policy, I would say just looking at the weight and habit variables there isn’t enough information from these two variables to formulate a policy about smoking and birthweight. However, I decided to look at weight and weeks the baby is held for while considering the variable habit to see if there was much of a difference on the baby’s weight. Below I created scatter plot and a boxplot using these variables. Per the new boxplot female babies tend to be close to the average weight of the NCbirths dataset while the males born had a higher average. The scatterplot shows that the weight of the baby has a strong positive relationship with weeks and the habit of the mothers could be an influence but there are other factors to consider. To get a better understanding of North Carolina’s birthrate other variables need to considered like parents’ income and health insurance coverage.

ggplot(NCbirths, aes(x=weeks, y=weight, color=habit)) +geom_point()

ggplot(NCbirths, aes(x=habit, y=weight, fill=gender)) + geom_boxplot() +ggtitle("Weight of the baby depending on mother's Habit categorized by gender") +facet_wrap(~habit)

Recommended publications