What is simple linear regression?
Simple linear regression is a regression method that models the relationship between one input feature and one continuous target variable using a straight line.
Basic idea
Suppose you want to predict house price using only house size.
Simple linear regression tries to fit a line such as:
Predicted Price = Intercept + Slope × House SizeThe line is chosen so that its predictions are as close as possible to the actual target values.
The equation
A simple linear regression model is commonly written as:
y = b0 + b1xwhere:
xis the input featureyis the predicted targetb0is the interceptb1is the slope or coefficient
What does the slope mean?
The slope tells us how much the predicted target changes when the input increases by one unit.
For example:
Predicted Price = 20,00,000 + 5,000 × SizeIf size increases by one unit, the predicted price increases by 5,000, assuming the model uses that unit of size.
What does the intercept mean?
The intercept is the predicted value of the target when the input feature is zero.
Whether that value is meaningful depends on the problem.
Why is it called simple?
It is called simple linear regression because it uses only one input feature.
If several input features are used, the model is called multiple linear regression.
What relationship does it assume?
Simple linear regression assumes that the expected relationship between the input and target can be reasonably represented by a straight line.
If the real relationship is strongly curved, a simple linear model may not fit the data well.
Example use cases
Simple linear regression can be used for relationships such as:
- advertising spend → sales
- house size → house price
- study hours → exam score
- temperature → electricity usage
when a single feature provides a useful approximately linear signal.
In short, simple linear regression predicts a continuous target from one input feature by fitting a straight-line relationship between them.
Learning Sequence
Machine Learning Curriculum
Explore Related Questions
Deepen your understanding across related Machine Learning topics.