Seeing Statistics
Use the scrollbar to change the degree of orgranization in the scatterplot and observe the corresponding changes in the correlation coefficient. Click on the "Change Sign" button to reverse the sign of the correlation and the scatterplot. This example illustrates the use of scrollbars and buttons as well as graphics that are constructed as needed.
Note: This applet will not work unless it is loaded from a server it recognizes. It will not work if the page is loaded from a CD. A working version of this page is available at http://psych.colorado.edu/~mcclella/JavaATI/scat.html
This is an example of a large collection of statistical applets
available in the online textbook Seeing Statistics by Gary
McClelland. Password protection is temporarily turned off at the
Seeing Statistics site, so you may examine all the applets. Simply go
to
http://www.seeingstatistics.com
and click on the "Enter" button. Note that this will transfer to a new
website. You may want to examine the other example applets at this ATI
Java site before going to Seeing Statistics.
With Optional Regression Line Displayed
With Optional Slope "Votes" Displayed
Each observation "votes" for the best slope. The best slope for a given observation represents a line passing from the centroid to the point. The least-squares regression slope is a weighted average of these individual slope votes with the weight being a function of the observations distance from the mean in the horizontal direction.
With Optional Quadrants Displayed
The stronger the correlaton, the more each observation agrees with respect to being above or below the means of the respective variables. With positive correlations, the observations tend to be either both above the respective means or both below the variable means. Hence, there are more observations in the two quadrants on the positive diagonal. With negative correlations, the observations tend to be above the mean on one variable and below the mean on the other variable. Hence, there are more observations in the two quadrants on the negative diagonal.
HTML and Param tags
Below is sample code to place this applet on an html page. The codebase is specified relative to the html file and does not need to be "../../lib" as below.
<applet code=com.bolderstats.regcorr.CorrelationPicture.class width="450" height="410" codebase="../../lib" archive="bolderstats_obf.jar,jmsl_obf.jar"> <param name="LINE" value="TRUE"> </applet>
- LINE
- Determines whether the least-squares regression line is displayed (TRUE) or not (FALSE, default).
- SLOPES
- Determines whether the slope "votes" are displayed (TRUE) or not (FALSE, default).
- QUADRANTS
- Determines whether the quadrants, defined by the means, are displayed (TRUE) or not (FALSE, default).