All about Linear Regression and Multi Linear Regression
Updated: Sep 18, 2020
Linear Regression is a very important fundamental algorithm.
It is used to do predictive analysis.
It shows the relation between 2 variables.
Regression Analysis commonly shows the correlation between 2 variables.
In simple linear regression analysis, each observation consists of two variables. These are the independent variable and the dependent variable.
The variable that the equation in your linear regression model is predicting is called the dependent variable. We call that one y. The variables that are being used to predict the dependent variable are called the independent variables. We call them X.
Here I am taking walking as example.
The number of calories burn are dependent on time spent on walking .
Minutes spent on Exercise (X) ,Calories burn (Y)
Independent Numbers (x): (40,49,97,70,125)
Dependent Numbers (Y): (45,50,100,75,135)
If there is only one explanatory variable, it is called simple linear regression,
The formula of a simple regression is y = ax + b, also called the line of best fit of dataset x and dataset y.
Dependent Numbers (y): Independent Numbers (x):
Intercept = -0.036714
slope = 1.063474
Linear Regression (Line of Best Fit) y = 1.063474x - 0.036714
Multi Linear regression :
Multiple regression is an extension of simple linear regression. It is used when we want to predict the value of a variable based on the value of two or more other variables. The variable we want to predict is called the dependent variable. The Variables which influences the dependent variable called the Independent variables.
Here I am taking example of walking on treadmill for amount of calories burn.
The total calories are burn are dependent variable , which are depend upon the time , inclination, speed and most importantly the mode of training we choose like cardio , hill, endurance etc.
Thanks for Reading.