Political Polling

Imagine you are working as a pollster for a US presidential candidate. Pennsylvania (population 13 million) is a swing state an essential one to carry in order to win the presidency.

Suppose that 51% of Pennsylvania voters plan on voting for your candidate. Treat this as the population proportion and assume that we know it.

library(tidyverse)
library(openintro)
library(infer)
1. Simulate 1000 polls each consisting of 100 randomly sampled voters from Pennsylvania that asks each voter if they plan on supporting your candidate. Present the results of this poll visually. If the candidate asks how confident are you with the results of this poll, how do you respond?

Note: set your seed to 1234 to get the same random samples that are used in the answer key

2. Now simulate 1000 polls each consisting of 200 randomly sampled voters. Present the results of this poll. How does this change your level of confidence? How do you explain this to the candidate?
3. What sample size would you need to be within 1% of the true population proportion?
4. What sample size would you need to be convinced that your candidate will carry the state?
5. Beyond the Data: Using simulations to predict election outcomes

Review FiveThirtyEight’s 2020 US Presidential Election Forecast as well as Nate Silver’s reflections on FiveThirtyEight’s 2016 US Presidential Election Forecast. How did 2016 predictions differ from the result of the election and why? How does this effect your read of FiveThirtyEight’s 2020 election forecast and the use of simulations to predict election results?