What years are included in this data set? What are the dimensions of the data frame and what are the variable or column names?

present$year [1] 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 [24] 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 [47] 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002

dim(present) [1] 63 3

names(present) [1] “year” “boys” “girls”

How do these counts compare to Arbuthnot’s? Are they on a similar scale? Present data frame has 63 observerations of 3 variables compared to Arbuthnot’s data frame with has 82 observations of 3 variables. They are similar in scale.

Make a plot that displays the boy-to-girl ratio for every year in the data set. What do you see?

plot(x = present $ year, y = boygirlratio_val)

The boys-to-girls ratio peaked during 1940s with around 1.06 boys-to-girls births. Then started down trending frin 1940s to 2000s where it’s setting new lows around 1.045 boys-to-girl births.

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.

Yes, although the boys-to-girls birth ratio has been down trending since 1940s, the ratio is still above 1.

In what year did we see the most total number of births in the U.S.? You can refer to the help files or the R reference card http://cran.r-project.org/doc/contrib/Short-refcard.pdf to find helpful commands.

max(present $ total)

which(present $ total == max(present $ total))

present $ year[which(present $ total == max(present $ total))]

1961

Out of the toal vector which number is the max.

Which place in the total vector set == the max number

The year in which place of the total vector set == the max number

1961

Plot the number of girls born vs. year. Next (in the same code chunk) use the lines function, which works just like the plot function but allows you to overlay a line on the existing plot, to plot the number of boys born vs. year.

lines(x = present $ year, y = present $ girls) lines(x = present $ year, y = present $ boys, col = “blue”)