Lab 1 - Arbuthnot

Name:Sonora A. Williams

Section: 01L

Date: September 3, 2013

Exercises

Load data:

source("http://www.openintro.org/stat/data/arbuthnot.R")
source("http://www.openintro.org/stat/data/present.R")

Exercise 1:

# enter R code for exercise 1 below
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

Exercise 2:

After a brief drop from 1640-1660, there is generaly a climb in the births of baptised females in the saple population observed.

Exercise 3:

# enter R code for exercise 3 in the line below, before the line with ```
# which ends the R code
plot(arbuthnot$year, arbuthnot$boys/(arbuthnot$boys + arbuthnot$girls), type = "l")

plot of chunk unnamed-chunk-3

Exercise 4:

years 1940-2002 63 observation, 3 variables variables: year, boys, girls

Exercise 5:

The variables are the same. However, the number of observations is less than that of Arbuthnot by 19 observations.

Exercise 6:

# enter R code for question 3 below
plot(present$year, present$boys/present$girls, type = "l")

plot of chunk unnamed-chunk-4

Arbuthnot's observations do not comply with this new data showing the ratio of boy to girl births generaly decreasing over time.

Exercise 7:

# enter R code for question 4 below
present$year[which.max(present$boys + present$girls)]
## [1] 1961

Extra Credit:

1631- 1648-Civil War in England 1650-Battle of Dunbar 1659-Restoration of England 1675-Great Fire 1679- 1694- 1704-

# enter R code for question 4 below
arbuthnot$year[0:10][which.min(boysandgirls[0:10])]
## Error: object 'boysandgirls' not found