The Arbuthnot data set refers to the work of Dr. John Arbuthnot, an 18th century physician, writer, and mathematician. He was interested in the ratio of newborn boys to newborn girls, so he gathered the baptism records for children born in London for every year from 1629 to 1710
arbuthnot$girls
## [1] 4683 4457 4102 4590 4839 4820 4928 4605 4457 4952 4784 5332 5200 4910 4617
## [16] 3997 3919 3395 3536 3181 2746 2722 2840 2908 2959 3179 3349 3382 3289 3013
## [31] 2781 3247 4107 4803 4881 5681 4858 4319 5322 5560 5829 5719 6061 6120 5822
## [46] 5738 5717 5847 6203 6033 6041 6299 6533 6744 7158 7127 7246 7119 7214 7101
## [61] 7167 7302 7392 7316 7483 6647 6713 7229 7767 7626 7452 7061 7514 7656 7683
## [76] 5738 7779 7417 7687 7623 7380 7288
# scatterplot of baptisms for girls by year
ggplot(data = arbuthnot, aes(x = year, y = girls)) +
geom_point()
#line plot over time for girl baptisms
ggplot(data = arbuthnot, aes(x = year, y = girls)) +
geom_line()
Prior to 1640, the number of girls baptized ranged from about….BE SURE to WRITE a COMPLETE description here. Do some research to see why we see significant drops in the data.
#add a new column to data frame called total
arbuthnot <- arbuthnot %>%
mutate(total = boys + girls)
#add another column that computes the proportion of boys baptized
arbuthnot <- arbuthnot %>%
mutate(boy_ratio = boys / total)
ggplot(data = arbuthnot, aes(x = year, y = boy_ratio)) +
geom_line()
Over the time period that Dr. Arbuthnot collected the data of baptisms,
the ratio of boys baptized was always higher than 50%. It was at its
highest in 1661 when 53.6% of the baptisms were boys.
SHOW the CODE and WRITE YOUR ANSWER to Exercise 4 here.
SHOW the CODE and WRITE YOUR ANSWER to Exercise 5 here.
SHOW the CODE, MAKE a PLOT and WRITE YOUR ANSWER to Exercise 6 here.
SHOW the CODE and WRITE YOUR ANSWER to Exercise 7 here.