1. Learn
  2. /
  3. Courses
  4. /
  5. Inferential Statistics

Exercise

Assumptions III

The last assumption we're going to check is whether residuals are normally distributed. We can do this through plotting the residuals in a histogram using the function hist(). If residuals are normally distributed there should be the highest frequency around the middle value, and gradually less as you move away from this.

Let's try it!

Instructions

100 XP
  • Add a line of code to your script that produces a histogram of residuals using the function hist().
  • hist() takes a vector of values as its first (and in this case, only) argument.