Contents
Simple Linear Regression Explained
Simple linear regression is the most basic form of regression, and it predicts an output using just one input variable, assuming a straight line relationship between the two.
Picture a graph where the x axis represents years of experience, and the y axis represents salary. As experience increases, salary tends to increase too, and if you plot enough data points, they roughly form a straight line.
Simple linear regression finds that exact line, so it can predict salary for any given experience level, even values not present in the original data.
How to think about it
- One input variable, like experience, predicts one output, like salary.
- The relationship is represented as a straight line, written as y = mx + c.
- "m" controls the slope of the line, showing how much salary increases per year of experience.
- "c" is the starting point, the salary value when experience is zero.
Real-world example
A company notices that employees with 2 years of experience earn around 4 lakhs, and those with 5 years earn around 7 lakhs. Simple linear regression can use this pattern to estimate the expected salary for someone with 3.5 years of experience, even though that exact data point was never recorded.
Machine Learning Tutorial
Abhishek Pati








