- Linear regression models the relationship between a response variable and one or more explanatory variables with a linear function.
- The simple form is Y = a + bX, where b is the slope of the line and a is the y-intercept.
- Simple linear regression uses one independent variable; multiple linear regression uses several.
- Linear regression predicts numeric values, while logistic regression is used for classification problems.
- Linear regression is easy to interpret and computationally light, so it trains quickly and scales well.
What is Linear Regression?
Linear regression is a way to model the relationship between a response variable and one or more explanatory variables. In linear regression, the data is modeled by a linear function.
Examples of Linear Regression
Linear regressions can be used in business to evaluate trends and make estimates or forecasts. For example, if a company’s sales have increased steadily every month for the past few years, by conducting a linear analysis of the sales data with monthly sales, the company could forecast sales in the coming months. Consider the example below.
Product development
Advertising and revenue: Businesses use linear regression to better understand the relationships between advertising spending and revenue.
For example, they might fit a simple linear regression model using advertising spending as the predictor variable and revenue as the response variable. The regression model would take the following form: revenue = β0 + β1(ad spending).
The coefficient β0 would represent the total expected revenue when ad spending is zero. The coefficient β1 would represent the average change in total revenue when ad spending is increased by one unit, a dollar.
If β1 is negative, it would mean that more ad spending is associated with less revenue. If β1 is close to zero, it would mean that ad spending has little effect on revenue. And if β1 is positive, it would mean more ad spending is associated with more revenue.
Why is Linear Regression Important?
Linear regression models are an important and proven way to reliably predict future outcomes. Because linear regression is a long-established statistical procedure, the properties of linear regression models are well understood and can be trained very quickly.
Linear Regression vs Other Technologies & Methodologies
Linear Regression vs Logistic Regression
Linear Regression is used to manage regression problems and logistic regression is used to manage the classification problems.
Linear Regression vs Multiple Regression
Linear regression is used for simple calculations and multiple linear regression tends to be used for more specific calculations. When relationships are more straightforward, linear regression can capture the relationship between the two variables. For complex relationships, multiple linear regression can be more useful.
Linear Regression vs Correlation
Regression is often used to build models/equations to predict a key response, Y, from a set of predictor (X) variables. Correlation is often used to quickly summarize the direction and strength of the relationships between a set of 2 or more numeric variables.
Linear Regression vs ANOVA
Regression is often used on variables that are fixed or independent in nature. ANOVA is often used to find commonalities between variables of different groups unrelated to each other.
Linear Regression in H2O AI
Open-source H2O-3 fits linear regression with its generalized linear model (GLM) algorithm, using the Gaussian family. H2O Driverless AI also includes GLM among its algorithms. H2O-3 GLM documentation.