Linear regression is the first model most data science students learn. It draws the straight line that best fits the points in your data, and it is easy to explain to a non-technical person.
The idea
If you plot house size against price, the regression line shows how much the price tends to rise for each extra square metre. The model is a single equation: a starting value plus a slope times the input.
What to check
- Does the relationship look roughly straight on a scatter plot?
- Are there outliers that pull the line away from most points?
- Does the model work on the test data, not only the training data?
What the slope does not tell you
The slope shows an association in your data. It does not prove that changing one value will change the other. Always state that limit in your write-up.
A practice exercise
Choose a small public dataset with two numeric columns. Fit a linear regression, plot the line on the scatter plot, and write three sentences: what the slope means, how well the line fits, and one reason the result could be wrong.
Next step: see our data science course at ScholarLogic, or book a free demo class. A counsellor will share the fee and the next batch dates.
