*Linear Regression** is one of the most widely used Artificial Intelligence algorithms in real-life Machine Learning problems — thanks to its simplicity, interpretability and speed! We shall now understand what’s behind the working of this algorithm in the next few minutes!*

** Linear regression** attempts to model the relationship between two variables by fitting a

**linear**equation to observed data. One variable is considered to be an

*explanatory variable*or an

*independent variable*, and the other is considered to be a

*dependent variable — Source:*

*Yale.edu*## Business Applications

*Linear regression is used for a wide array of business prediction problems:*

*Stock prediction**Predict future prices/costs**Predict future revenue**Comparing performance of new products*

## Benefits of Linear Regression

*Ease**Interpretability**Scalability**Deploys and Performs well on Online Settings*

## Machine Learning approaches to Linear Regression

*Simple and Multiple Linear Regression**Polynomial Regression**Ridge Regression and Lasso Regression (upgrades to Linear Regression)**Decision Trees Regression**Support Vector Regression (SVR)*

## Linear Regression in Layman’s Terms

You can think of linear regression as the answer to the question

“How can I use X to predict Y?”, where X is some information that you have and Y is some information that you want to know.

*Let’s look at this following classic example —** Source*

You might want to sell your house and you have information regarding the *number of bedrooms* ** (X)** in that house and here, the catch is to find the

*price of the house*

**.**

*(Y)*Linear regression creates an equation in which you input your given numbers (X) and it outputs the target variable that you want to find out (Y).

In this case, we would use a dataset containing historic records of house purchases in the form of ** (“number of bedrooms”, “selling price”)**: