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

Exercise

Exercise 8 - Plotting the Errors

In the previous graph, we see that most states' polls predicted the correct winner 100% of the time. Only a few states polls' were incorrect more than 25% of the time. Wisconsin got every single poll wrong. In Pennsylvania and Michigan, more than 90% of the polls had the signs wrong.

Make a histogram of the errors. What is the median of these errors?

Instructions

100 XP
  • Use the hist function to generate a histogram of the errors
  • Use the median function to compute the median error