This applet shows a scatter of points generated by the linear equation y = 4 + 0.2x + error, where the error is a random variable with a normal distribution, with a mean of 0 and a variance of 1.

Click the Freeze/Unfreeze button to stop or start adding points.

The counter shows the total number of points added.

The first time a point is drawn, its color is magenta. When there is a subsequent call to draw the same point, the point is drawn slightly darker, by subtracting some of its color. For the 2nd through the 16th hit on the same point, a small amount of red is subtracted, until the point is pure blue. For the 17th through 31st hits, a small amount of blue is subtracted, until the point is black. After 31 hits, the color is not changed any further.

Click the Show/Hide Line button to show or hide the y = 4 + 0.2x line in yellow. The line flickers, unfortunately, when the screen is updated.

Notice that even as hundreds of thousands of points accumulate, and the band within about 2 of the line gets very thick, only a tiny number of points are more than 4 from the line. This shows that the normal distribution has a thick middle and thin tails.

To restart from a blank graph, you may have to close and reopen your
browser.

© 2000 Samuel L. Baker

The author is solely responsible for this page. Its contents have not been reviewed or approved by the University of South Carolina.

http://hspm.sph.sc.edu/COURSES/J716/demos/ScatterPlots/NormalScatter.html

Jan. 25, 2007