Online Learning Platform

Data Analysis Using Python > Regression > Assumptions of Simple Linear Regression

Assumptions of simple linear regression

Simple linear regression is a parametric test, meaning that it makes certain assumptions about the data. These assumptions are:

  1. Homogeneity of variance (homoscedasticity): the size of the error in our prediction doesn’t change significantly across the values of the independent variable.
  2. Independence of observations: the observations in the dataset were collected using statistically valid sampling methods, and there are no hidden relationships among observations.
  3. Normality: The data follows a normal distribution.

Linear regression makes one additional assumption:

    4.The relationship between the independent and dependent variable is linear: the line of best fit through the data points is a straight line (rather than a curve or some sort of grouping factor).

Linearity: The relationship between and  must be linear.

Check this assumption by examining a scatterplot of x and y.

Independence of errors: There is not a relationship between the residuals and thevariable; in other words,  is independent of errors.

Check this assumption by examining a scatterplot of “residuals versus fits”; the correlation should be approximately 0. In other   words, there should not look like there is a relationship.

Normality of errors: The residuals must be approximately normally distributed.

Check this assumption by examining a normal probability plot; the observations should be near the line. You can also examine a histogram of the residuals; it should be approximately normally distributed.

Equal variances: The variance of the residuals is the same for all values of.

Check this assumption by examining the scatterplot of “residuals versus fits”; the variance of the residuals should be the same across all values of the x-axis. If the plot shows a pattern (e.g., bowtie or megaphone shape), then variances are not consistent, and this assumption has not been met.

Prev
Types of Regression
Next
Regression Equation
Feedback
ABOUT

Statlearner


Statlearner STUDY

Statlearner