Session Ready
Exercise

Testing Assumptions III

Another assumption we need to test is to make sure that the residuals are normally distributed. This means that the most common values are around zero, with fewer values as we move higher and lower than zero. We can visualise this easily with a histogram, which shows you the frequency of each value. You can make a histogram easily using the function hist(). hist() takes your data as its first argument, for example hist(data). Let's try it out!

Instructions
100 XP
  • In your script, add a line of code to create a histogram of your residuals using the function hist()
  • Hit 'Submit' and examine the output!