Some Exploration

  1. What command would you use to extract just the counts of girls baptized?
arbuthnot$girls
##  [1] 4683 4457 4102 4590 4839 4820 4928 4605 4457 4952 4784 5332 5200 4910
## [15] 4617 3997 3919 3395 3536 3181 2746 2722 2840 2908 2959 3179 3349 3382
## [29] 3289 3013 2781 3247 4107 4803 4881 5681 4858 4319 5322 5560 5829 5719
## [43] 6061 6120 5822 5738 5717 5847 6203 6033 6041 6299 6533 6744 7158 7127
## [57] 7246 7119 7214 7101 7167 7302 7392 7316 7483 6647 6713 7229 7767 7626
## [71] 7452 7061 7514 7656 7683 5738 7779 7417 7687 7623 7380 7288
  1. Is there an apparent trend in the number of girls baptized over the years? There appears to be an upward trend in the number of girls baptized from years 1660 to 1710.There was a decrease in girls baptized between years 1640 to 1660.

  2. Now, make a plot of the proportion of boys over time. What do you see? The is an upward trend from 1660-1740.

plot(arbuthnot$year, arbuthnot$boys)


On Your Own

1.  What years are included in this data set? What are the dimensions of the 
data frame and what are the variable or column names?
range(present$year)
## [1] 1940 2002
dim(present)
## [1] 63  3
names(present)
## [1] "year"  "boys"  "girls"
2.  How do these counts compare to Arbuthnot's? Are they on a similar scale?

Arbuthnot’s has 82 rows and 3 columns and ‘Present’ has 63 rows and 3 columns, a difference of 19 rows. These two data frames are not on a similar scale Thousands vs. Millions, respectively.

dim(arbuthnot) - dim(present)
## [1] 19  0
head(present$boys,5)
## [1] 1211684 1289734 1444365 1508959 1435301
head(present$girls,5)
## [1] 1148715 1223693 1364631 1427901 1359499
head(arbuthnot$boys,5)
## [1] 5218 4858 4422 4994 5158
head(arbuthnot$girls,5)
## [1] 4683 4457 4102 4590 4839
3.  Make a plot that displays the boy-to-girl ratio for every year in the data 
set. What do you see? Does Arbuthnot's observation about boys being born in
greater proportion than girls hold up in the U.S.? Include the plot in your 
response.

Arbuthnot’s observation about boys being born in great proportion than girls does hold up in the U.S, however to a lesser extent. There appears to be a downward trend of the ratio from 1940’s to 2000’s.

plot(present$year, (present$boys/present$girls))

plot(arbuthnot$year, (arbuthnot$boys/arbuthnot$girls))