Answered step by step
Verified Expert Solution
Question
1 Approved Answer
So far, you worked through visualizing and summarizing data from the Arbuthnot s baptism data ( arbuthnot ) . To answer the questions for this
So far, you worked through visualizing and summarizing data from the Arbuthnots baptism data arbuthnot To answer the questions for this data analysis you'll repeat some of the steps above, but for present day birth records in the United States. The data are stored in a data frame called present.
Load the present dataset using the data function, just as we did in the tutorial. Note that if you do not have the openintro package loaded, you will not be able to access this dataset. The R Packages section above discusses how to open packages using the library function. Once you have the present dataset loaded, answer the following questions.
Question
point What years are included in the present dataset?
Question
point What are the dimensions of the data frame? Dimensions refers to the number of rows and variables.
Question
point What are the variable column names?
Question
point Make a plot that displays the proportion not the ratio of boys born over time. What do you see? Does Arbuthnots observation about boys being born in greater proportion than girls hold up in the US Include the plot in your response. To copy or save a graph from RStudio, click the Export button just above the preview of the graph. From there you can choose to Save Image or Copy to Clipboard.
Question
point In what year did we see the most total number of births in the US
Hint: First calculate the totals and save it as a new variable. Then, sort your dataset in descending order based on the total column. You can do this interactively in the data viewer by clicking on the arrows next to the variable names. To include the sorted result in your report you will need to use two new functions. First we use arrange to sorting the variable. Then we can arrange the data in a descending order with another function, desc for descending order. The sample code is provided below.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started