

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Lab 5: Java applets for understanding regression STT 421: Summer, 2004 Vince Melfi
There are some nice java applets related to understanding regression and correlation available on the web. Today we’ll use two of these to improve our intuition about least squares and influential points. You’ll need to start Netscape Navigator or Internet Explorer before beginning.
It’s easy to think that the least squares line will be close to the best-fitting line chosen “by eye.” The first java applet should disabuse you of this notion.
n
(yi − [a + bxi])^2.
So the line that minimizes the MSE is the least squares line. Draw a few more lines on the plot, some that you think fit the data well and some that you think don’t fit the data well, and look at the associated MSEs. Now click the box next to “Draw regression line” to see the least squares line. Also click “Show Minimum MSE” to see the MSE of the least squares line. Next guess the value of the correlation r by choosing one of the 5 values given, and then click “Show r” to see whether you got it right.
Table 1: Least squares by eye
The next applet allows us to see the effect of an added point on the least squares line and correlation.