Independent and dependent variables

As we mentioned in the previous subsection, linear regression is used to predict a value of a variable based on other variables. We are investigating the relationship between input variables, X and the output variable, Y.

In linear regression, dependent variable is the variable that we want to predict. The reason that we call it the dependent variable is because of the assumption behind linear regression. The model assumes that these variables depend on the variables that are on the other side of the equation, which are called independent variables.

In simple regression model, model will explain how the dependent variable changes based on independent variable. 

As an example, let's imagine that we want ...

Get Mastering Numerical Computing with NumPy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.