What years are included in this data set? What are the dimensions of the data frame and what are the variable or column names?
(Using inline r code)
The years are 1940 to 2002.
The data set includes 63 rows and 3 columns.
The variable names are: year, boys, girls.
How do these counts compare to Arbuthnot’s? Are they on a similar scale?
Arbuthnot had 30% more variables. That is a similar scale.
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.
##
## Call:
## lm(formula = present$ratio ~ present$YearShifted)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.0049082 -0.0015177 0.0002256 0.0013777 0.0046923
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.0547491 0.0005338 1976.105 < 2e-16 ***
## present$YearShifted -0.0001061 0.0000145 -7.318 6.58e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.002093 on 61 degrees of freedom
## Multiple R-squared: 0.4675, Adjusted R-squared: 0.4588
## F-statistic: 53.55 on 1 and 61 DF, p-value: 6.58e-10
The model does appear to show that boys are being born at a higher rate, but it appears that that difference is shrinking slowly.
A linear model comparing year to the ratio is significant at the .001 level. The ratio is very slowly getting closer to parity.
In what year did we see the most total number of births in the U.S.?
The most total live births occurred in 1961, during which 4268326 children were born.
present[[which.max(present$boys+present$girls),1]]
## [1] 1961
head(present)
## year boys girls ratio YearShifted
## 1 1940 1211684 1148715 1.054817 1
## 2 1941 1289734 1223693 1.053969 2
## 3 1942 1444365 1364631 1.058429 3
## 4 1943 1508959 1427901 1.056767 4
## 5 1944 1435301 1359499 1.055757 5
## 6 1945 1404587 1330869 1.055391 6
summary(present)
## year boys girls ratio
## Min. :1940 Min. :1211684 Min. :1148715 Min. :1.046
## 1st Qu.:1956 1st Qu.:1799857 1st Qu.:1711405 1st Qu.:1.050
## Median :1971 Median :1924868 Median :1831679 Median :1.051
## Mean :1971 Mean :1885600 Mean :1793915 Mean :1.051
## 3rd Qu.:1986 3rd Qu.:2058524 3rd Qu.:1965538 3rd Qu.:1.053
## Max. :2002 Max. :2186274 Max. :2082052 Max. :1.059
## YearShifted
## Min. : 1.0
## 1st Qu.:16.5
## Median :32.0
## Mean :32.0
## 3rd Qu.:47.5
## Max. :63.0
dim(present)
## [1] 63 5