Is there always only one line of best-fit?



In the context of this exercise, covering the line of best-fit for a dataset, is there always only one line of best-fit?


No, some datasets can have more than one line of best-fit. This is not that common but can occur with smaller datasets.

For example, consider a dataset with just one data point. We know that any line that passes through that point, with any slope or intercept, would be suitable as a “line of best-fit”, because the total loss would be 0.

Furthermore, consider a plot of just 4 points, in the shape of a square rotated slightly, such that every point has a unique x value. Because of symmetry, we know that there are multiple lines that we can draw through this plot, such that the total loss is the same for each. This can be seen in the following illustration, where each green line might be suitable as a “line of best-fit”.


In general, this is a bit rare and can happen in special cases. Most datasets you work with will not have this kind of symmetry and will also have more than just 4 points. As a result, most datasets should only have one line of best fit.