Statistical Applets

Correlation And Regression

A scatterplot displays the form, direction, and strength of the relationship between two quantitative variables. Straight-line (linear) relationships are particularly important because a straight line is a simple pattern that is quite common. The correlation measures the direction and strength of the linear relationship. The least-squares regression line is the line that makes the sum of the squares of the vertical distances of the data points from the line as small as possible (these vertical distances, from each data point to the least-squares regression line, are called the residual values).

This applet lets you explore how the correlation and least-squares regression line changes as points are added or subtracted from a scatterplot.

Click on the graphing area to create a scatterplot of data points. Click again on a previously-added point to remove it, or drag the point to move it around. The correlation coefficient for the data you enter will be shown on the left. Click the checkboxes to show the least-squares regression line for your data, the mean values of X and Y, and the residual values for each data point.

Click "Draw Your Own Line" to select starting and ending points for your own line on the plot. The "relative sum of squares" for your line, as compared to the least-squares regression line, will then be calculated and shown.