This simulation illustrates least squares regression and how the least squares solution minimizes the sum of the squared residuals. The applet demonstrates, in a visual manner, various concepts related to least squares regression. These include residuals, sum of squares, the mean line, how the line of best fit is determined, and how the line of least squares solution minimizes the sum of the squared residuals.