Machine LearningRegression Fundamentals

What is the equation of a linear regression model?

The equation of a linear regression model represents the target as a weighted combination of the input features plus an intercept.

Simple linear regression

With one input feature, the prediction equation is:

ŷ = b0 + b1x

where:

  • ŷ is the predicted target value
  • b0 is the intercept
  • b1 is the coefficient or slope
  • x is the input feature

Multiple linear regression

With several input features, the equation becomes:

ŷ = b0 + b1x1 + b2x2 + ... + bnxn

Each feature has its own coefficient.

For example:

Predicted Price
= Intercept
+ b1 × House Size
+ b2 × Number of Rooms
+ b3 × Distance from City Center

What does the intercept do?

The intercept b0 is the model's predicted value when all input features are zero.

Whether that value has a practical interpretation depends on the problem.

What do the coefficients do?

Each coefficient controls how much the prediction changes when its corresponding feature changes by one unit, while the other included features are held constant.

For example:

ŷ = 10 + 4x

If x increases by 1, the predicted value increases by 4.

Statistical form of the model

When describing the observed target rather than only the prediction, linear regression is often written as:

y = b0 + b1x1 + b2x2 + ... + bnxn + ε

Here, ε represents the error term: the part of the observed target that is not explained by the linear relationship.

Prediction form vs observed-value form

  • Prediction equation: uses ŷ and does not include the unknown error term.
  • Statistical model equation: uses y and includes ε to represent unexplained variation.

Why is the model called linear?

The prediction is a linear combination of the coefficients and input features:

intercept + weighted feature 1 + weighted feature 2 + ...

In short, a linear regression model predicts a numerical target by adding an intercept to the weighted sum of its input features.

#linear regression equation#equation of linear regression model#multiple linear regression equation#simple linear regression equation#linear regression formula#machine-learning#linear-regression#regression-equation#regression#regression-fundamentals

Learning Sequence

Machine Learning Curriculum

43% Completed
Up NextMachine Learning

What do coefficients mean in linear regression?

Explore Related Questions

Deepen your understanding across related Machine Learning topics.

Machinoai Logo
Machinoai

Your edge in the AI era. Deep dives into machine learning concepts, paper explainers, verified industry jobs, and developer tools.

© 2026 Machinoai. All rights reserved.