Imagine you want to predict the price of a house based on its size, or a student’s final grade from the number of hours they studied. Linear regression is the simplest and most common tool for making such predictions when the outcome is a number. This chapter builds your understanding of fitting a straight line (or a flat plane) to data, then shows you how to keep that line from trying too hard and getting confused — using a family of techniques called regularization.