Precalculus in today's classroom includes scatter plots of data and using a calculator to find the regression line/curve that goes through the data. The problems typically consist of a dataset with a limited number of points, say 8, which the student is supposed to enter into their calculator, use the calculator to find the regression line/curve, and then plot the results.

I've posted Sage code on the Sage in the classroom page that will create linear regression data along with the scatter plot. You can use it to create fresh datasets for the classroom, worksheets, or test problems.

The code chooses random values for the slope and intercept and then adds "noise" to each point. The actual regression line should have a slope and intercept that is close to that (but different). Later on we'll find the equation of the regression line through a set of data.