1. Learn
  2. /
  3. Courses
  4. /
  5. HarvardX Data Science Module 4 - Inference and Modeling

Exercise

Exercise 6 - Back to Election Polls

Florida is one of the most closely watched states in the U.S. election because it has many electoral votes and the election is generally close. Create a table with the poll spread results from Florida taken during the last days before the election using the sample code.

The CLT tells us that the average of these spreads is approximately normal. Calculate a spread average and provide an estimate of the standard error.

Instructions

100 XP
  • Calculate the average of the spreads. Call this average avg in the final table.
  • Calculate an estimate of the standard error of the spreads. Call this standard error se in the final table.
  • Use the mean and sd functions nested within summarize to find the average and standard deviation of the grouped spread data.
  • Save your results in an object called results.