Question
Brexit poll analysis - Part 2 Final Assessment due Sep 10, 2020 13:23 +04 Bookmark this page This problem set is continued from the previous
Brexit poll analysis - Part 2
Final Assessment due Sep 10, 2020 13:23 +04
Bookmark this page
This problem set is continued from the previous page. Make sure you have run the following code:
# suggested libraries library(tidyverse) # load brexit_polls object and add x_hat column library(dslabs) data(brexit_polls) brexit_polls <- brexit_polls %>% mutate(x_hat = (spread + 1)/2) # final proportion voting "Remain" p <- 0.481
Question 4: Confidence intervals for polls in June
0.0/4.0 points (graded)
Create the data framejune_pollscontaining only Brexit polls ending in June 2016 (enddateof "2016-06-01" and later). We will calculate confidence intervals for all polls and determine how many cover the true value ofd
.
First, usemutate()to calculate a plug-in estimatese_x_hatfor the standard error of the estimateSE
^
[X]
for each poll given its sample size and value ofX
^
(x_hat). Second, usemutate()to calculate an estimate for the standard error of the spread for each poll given the value ofse_x_hat. Then, usemutate()to calculate upper and lower bounds for 95% confidence intervals of the spread. Last, add a columnhitthat indicates whether the confidence interval for each poll covers the correct spreadd=0.038
.
How many polls are injune_polls?
unanswered
What proportion of polls have a confidence interval that covers the value 0?
unanswered
What proportion of polls predict "Remain" (confidence interval entirely above 0)?
unanswered
What proportion of polls have a confidence interval covering the true value ofd
?
unanswered
Submit
You have used 0 of 10 attempts
Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
Save
Save Your Answer
Question 5: Hit rate by pollster
0.0/2.5 points (graded)
Group and summarize thejune_pollsobject by pollster to find the proportion of hits for each pollster and the number of polls per pollster. Usearrange()to sort by hit rate.
Which of the following are TRUE?
Select ALL correct answers.
Unbiased polls and pollsters will theoretically cover the correct value of the spread 50% of the time.
Only one pollster had a 100% success rate in generating confidence intervals that covered the correct value of the spread.
The pollster with the highest number of polls covered the correct value of the spread in their confidence interval over 60% of the time.
All pollsters produced confidence intervals covering the correct spread in at least 1 of their polls.
The results are consistent with a large general bias that affects all pollsters.
unanswered
Submit
You have used 0 of 2 attempts
Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
Save
Save Your Answer
Question 6: Boxplot of Brexit polls by poll type
0.0/2.5 points (graded)
Make a boxplot of the spread injune_pollsby poll type.
Which of the following are TRUE?
Select ALL correct answers.
Online polls tend to show support for "Remain" (spread > 0).
Telephone polls tend to show support "Remain" (spread > 0).
Telephone polls tend to show higher support for "Remain" than online polls (higherspread).
Online polls have a larger interquartile range (IQR) for the spread than telephone polls, indicating that they are more variable.
Poll type introduces a bias that affects poll results.
unanswered
Submit
You have used 0 of 2 attempts
Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
Save
Save Your Answer
Question 7: Combined spread across poll type
0.0/2.0 points (graded)
Calculate the confidence intervals of the spread combined across all polls injune_polls, grouping by poll type. Recall that to determine the standard error of the spread, you will need to double the standard error of the estimate.
Use this code (which determines the total sample size per poll type, gives each spread estimate a weight based on the poll's sample size, and adds an estimate of p from the combined spread) to begin your analysis:
combined_by_type <- june_polls %>% group_by(poll_type) %>% summarize(N = sum(samplesize), spread = sum(spread*samplesize)/N, p_hat = (spread + 1)/2)
What is the lower bound of the 95% confidence interval for online voters?
unanswered
What is the upper bound of the 95% confidence interval for online voters?
unanswered
Submit
You have used 0 of 10 attempts
Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
Save
Save Your Answer
Question 8: Interpreting combined spread estimates across poll type
0.0/2.5 points (graded)
Interpret the confidence intervals for the combined spreads for each poll type calculated in the previous problem.
Which of the following are TRUE about the confidence intervals of the combined spreads for different poll types?
Select ALL correct answers.
Neither set of combined polls makes a prediction about the outcome of the Brexit referendum (a prediction is possible if a confidence interval does not cover 0).
The confidence interval for online polls is larger than the confidence interval for telephone polls.
The confidence interval for telephone polls is covers more positive values than the confidence interval for online polls.
The confidence intervals for different poll types do not overlap.
Neither confidence interval covers the true value ofd=0.038.
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