# A Line Through the Points

A Line Through the Points: Fitting a Line.

Updated: November 19, 2026

1. [Fitting a Line](https://www.ask-codey.com/lessons/ml-fitting-a-line) (Apprentice): A straight line through a scatter plot of home sales turns a home's size into a price guess, the intercept plus the slope times the size, and least squares picks the best line, the one whose squared errors add up to the least, which Python's statistics.linear_regression finds for you.

Source: https://www.ask-codey.com/courses/machine-learning-python/topics/ml-a-line-through-points
