From the course: Complete Guide to AI and Data Science for SQL: From Beginner to Advanced

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Assumption 4: Checking normality of error terms

Assumption 4: Checking normality of error terms

- [Narrator] Let's continue your journey of checking the assumptions. In the last video, you made sure your variables have a clear relationship, just like a well-behaved car following a straight road. Now, let's dive into assumption number four, the normality of error terms. But what does that mean? Imagine you're on a road trip and you want to make sure the road is smooth without unexpected bumps or obstacles. Similarly, in your regression model, you want to ensure your errors or residuals, that is, the differences between your predicted values and the actual values follow a smooth, bell-shaped curve, just like a calm and predictable road. To test this assumption, you're going to create a histogram of your residuals. Think of it as checking the terrain of your road for bumps. Now, here's the code that performs this test for us. Let's take a look at your histogram. What we're hoping for is a shape that resembles a bell…

Contents