Exercise

Exercise 6 - Visualizing Polling Bias

In this section, we used visualization to motivate the presence of pollster bias in election polls. Here we will examine that bias more rigorously. Lets consider two pollsters that conducted daily polls and look at national polls for the month before the election.

Is there a poll bias? Make a plot of the spreads for each poll.

Instructions

100 XP
  • Use ggplot to plot the spread for each of the two pollsters.
  • Define the x- and y-axes usingusing aes() within the ggplot function.
  • Use geom_boxplot to make a boxplot of the data.
  • Use geom_point to add data points to the plot.