Math 211
R Assignment #6
Usual Instructions:
• In RStudio, go to file and open a new R script.
• Save the new file as A6_Lastname.R.
• Always write your code in the Source panel (not the Console panel). View your
results in the Console panel or graphs in the Plots panel.
• Before answering or writing the code for each question, start with a comment and
then the question number. For example, before answering question 1, write Q1. Then go to the next line and start answering the question or writing the code. If an answer is a sentence, then the first line should be # Question number. The next line will be # Answer in sentence form.
• All graphs have to contain the all the information asked at a minimum. Jazzing them up is your call. You will not be penalized for doing the minimum.
• Upload your file in MOM. Be sure the file extension is .r or .R
• Each question needs an R code unless it is italicized, in which case, you need to
answer the question in a complete sentence.
• I need to see your script and not the result. So do not cut and paste results. I will run
each script to see your result. Be sure your code works.
Background
The report “Young People Living on the Edge” (Greenberg Quinlan Rosner Research, 2008) summarizes a survey of people in two independent random samples. One sample consisted of 600 young adults (ages 19 to 35) and the other sample consisted of 300 parents of young adults (ages 19 to 35). The young adults were presented with a variety of situations such as getting married or buying a house, and were asked if they thought that their parents were likely to provide financial support in that situation. The parents of young adults were presented with the same situations and asked if they would be likely to provide financial support in that situation.
Situation 1
When asked about getting married, 41% of the young adults said they thought parents would provide financial support and 43% of the parents said they would provide support. Determine if there is convincing evidence that the proportion of young adults who think their parents would provide financial support and the proportion of parents who say they would provide support are different.
Questions
Q1. Identify the proportions you use, with its accompanying subscript. Be very specific so it is understandable to any reader.
For example, suppose we are trying to determine if employers are using social media to screen applicants. The proportion would then be:
p = population proportion of employers who use social media to screen job applicants
Q2. Write the null and alternative hypotheses.
Q3. Carry out the hypothesis test.
Q4. Write your conclusion to the hypothesis test in the context of the given situation.
Q5. Interpret the confidence interval for the 95% confidence level in the context of the given problem. Be sure to include the level of confidence.
Q6. Calculate the confidence interval at 99% level of confidence.
Q7. What can you say about the width of the 90% level of confidence compared to the
width of the 95% level of confidence calculated in Q3?
Q8. Would you say the 99% confidence level still support the conclusion drawn in Q4? Explain briefly.
Situation 2
The report also stated that the proportion who thought their parents would help with buying a house or renting an apartment for the sample of young adults was 0.37. For the sample of parents, the proportion who said they would help with buying a house or renting an apartment was 0.27. Based on these data, can we conclude that the proportion of parents who say they would help with buying a house or renting an apartment is significantly less than the proportion of young adults who think that their parents would help?
Questions:
Q9. Write the null and alternative hypotheses for Situation 2.
Q10. Carry out the hypothesis test.
Q11. Write your conclusion to the hypothesis test in the context of the given situation.