Question
The data in gss.csv are from the General Social Survey. Conducted since 1972, the GSS is a nationally renown representative sociological survey of adults in
The data in gss.csv are from the General Social Survey. Conducted since 1972, the GSS is a nationally renown representative sociological survey of adults in the United States. Variables in this file include: Income: annual income in U.S. dollars Age: age in years Height: height in inches Education: number of years of education Experience: number of years of work experience Voted: indicator for whether respondent voted in the 2016 election or else did not vote Married: indicator for whether respondent was married or else not married (e.g., single or divorced or widowed) Government: indicator for whether respondent works for the government or else in the private sector For each part below, you will calculate some summary statistic(s) along with bootstrap confidence intervals. In reporting your intervals, you will want to give the numbers and variable units but also explain (in no more than 1-2 sentences) your interval results in context.2 When reporting on the Income variable, round all numerical answers to the nearest dollar. Recommended: run the following code to remove unsightly scientific notation from plot axes: options(scipen=999)
Part A
What is the typical annual income earned by U.S. adults? Include in your write-up a histogram (with informative title) displaying the distribution of the Income variable. In the plot caption: (1) describe the distribution in one sentence and (2) report your calculation of the median Income in this sample. Generate a bootstrap sampling distribution (using 10000 simulations) for the sample median Income. Include in your write-up a histogram (with informative title) displaying the bootstrap sampling distribution for the sample median. In the plot caption: (1) describe the sampling distribution in one sentence and (2) report and interpret a 95% bootstrap confidence interval for the population median Income. Part B
What proportion of U.S. adults work in the public sector (i.e., for the government) versus in the private sector? What was the observed proportion of Government workers in this sample? Report and interpret a 95% bootstrap confidence interval for the population proportion of those who work for the government using 10000 simulations. Before proceeding with Parts C and D, copy and paste the following code into your script to re-level the Voted variable in terms of the 'Voted' category (instead of the default 'Did not vote' category). This will facilitate interpretation for the difference in proportions analysis: 1Hint: Use the month variable to specify the line color in your aes() mapping, as in the second plot shown in this example 2There are multiple examples of how to interpret a confidence interval in class slides, R scripts, and our textbook. 2 gss = gss %>% mutate(Voted = relevel(as.factor(Voted), ref = 'Voted')) Part C
To what extent, if any, do voters have more formal education than non-voters? Calculate summary statistics and then generate a 95% bootstrap confidence interval for the population difference in average years of Education across the two Voted groups using 10000 simulations. In this sample, which group had more years of education? What was the observed estimate for the difference in means? Does the confidence interval suggest that the difference, if any, observed in this sample will also generalize to the larger population? Report and interpret the 95% confidence interval for the difference in means. In your opinion, are these results practically significant? Use numerical evidence to justify your conclusion in 1-2 sentences. Part D
Do married people vote more consistently than do non-married people? Calculate summary statistics and then generate a 95% bootstrap confidence interval for the population difference in proportions of those who Voted across the two Married groups. In this sample, what was the overall proportion of U.S. adults who voted in the 2016 election? In this sample, which Married group had a higher proportion of 2016 voters? What was the observed estimate for the difference in proportions? Does the confidence interval suggest that the difference, if any, observed in this sample will also generalize to the larger population? Report and interpret the 95% confidence interval for the difference in proportions using 10000 simulations. Are these results statistically significant? Use numerical evidence to justify your conclusion in one sentence. Part E
Is it possible that one's height could be a factor in how much money they earn? Include in your write-up a scatterplot (with informative caption) to visualize the extent of any association between these two variables. Include a one-sentence caption describing the plot and identifying key plot features that are not already clear from the title and/or any plot labels. Fit a linear model for Income in terms of Height. Use the results of this model (including model fit statistics) as well as bootstrapping with 10000 iterations to summarize the points below. Remember to answer in complete sentences to provide context for your numerical results. Round to the nearest dollar where appropriate. What proportion of the variability in annual income can be explained in terms of a person's height? Based on this sample, what change in income do we predict for a one-inch increase in height? Does a confidence interval suggest that the association between height and income observed in this sample will also generalize to the larger population? Report and interpret a 95% bootstrap interval for the model slope. Is the Height slope from this model statistically significant? Use numerical evidence to justify your conclusion in one sentence. In your opinion, are these model results practically significant? Use numerical evidence to justify your conclusion in 1-2 sentences. Report and interpret a 95% bootstrap confidence interval for the 'typical model error' (i.e., "sigma" in your confint() output).
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