Question: Offshore Drilling, Part 1: A 2010 survey asked 827 randomly sampled registered voters in California Do you support, or do you oppose, drilling for oil
Offshore Drilling, Part 1: A 2010 survey asked 827 randomly sampled registered voters in California "Do you support, or do you oppose, drilling for oil and natural gas off the Coast of California? Or do you not know enough to say?" The responses can be found in the data file "offshore_drilling.csv" in Canvas. Download the file, import the data into R, and use it to answer the following questions. Note that there are two variables in the dataset, "position" and "college_grad". For this question, you will use only the "position" variable, which contains each respondent's response to the question above.
( how to write the coding for part b)
b) Use the "inference" function in R to compute a 95% confidence interval for the proportion of all registered voters in California who opposed offshore drilling. lower bound: (round to four decimal places) upper bound: (round to four decimal places) (c) Use the "inference" function in R to compute a 95% confidence interval for the proportion of all registered voters in California who supported offshore drilling. lower bound: (round to four decimal places) upper bound: (round to four decimal places) (d) A legislator in California claimed that "more registered voters in California oppose offshore drilling than support it." Based on the results in the previous parts of this question (you should not need to do any additional computations or work), does the survey provide support for the legislator's claim?
- Yes, because the percent of respondents to the survey who said that they oppose offshore drilling was larger than the percent who said that they support it.
- No, because both percentages were below 50%.
- Yes, because offshore drilling is bad for the environment and most people in the state of California are concerned about the environment.
- No, because the difference in percentages was smaller than the margin of error of the survey.
(e) Did the intervals computed in parts (b) and (c) have identical margins of error? If not, which one had the smaller margin of error? Why?
- The interval in part (c) has a slightly smaller margin of error since the value of p
- is closer to 0 and farther from 0.5 than the interval in part (b).
- The interval in part (b) has a smaller margin of error because it has a larger sample size.
- The interval in part (c) has a smaller margin of error because it has a smaller sample size.
- The two intervals have the same margin of error because they are based on the same sample size.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
