Skip to content | Change text size
 

Correlation and simple linear regression

This statistical applet explores the concepts of correlation and simple linear regression. It also investigates the sensitivity of these concepts to outliers and the properties of residuals.

Please note that you need Java installed to use this applet. Download Java for free at www.java.com.

Concept design: Dr Dave Stewart
Java Developer: Julie Bernal-Melo

This applet is divided into two main panels, Correlation and Regression and Distribution of Residuals. In the Correlation and Regression chart data can be generated automatically at random or entered manually.

  • To generate 50 random data points from a correlation coefficient, r, enter a value for r, on the chart and click on Generate 50 Random Data Points. The correlation coefficient, r, can take values from -1 to 1.
  • To enter data manually, click on Create Data Points, select add or delete and click on the chart to either add or delete data points.

Simple linear regression is computed from the data points, and the line of best fit with its equation is displayed in red.

A residual is the vertical distance between an actual data point and its predicted value on the regression line. The Distribution of Residuals panel displays a histogram and normal scores plot for the residuals calculated from the correlation chart.

 

 
More Resources