3.2 Y versus X - two variable scatterplot


This Statlet creates a scatterplot for two columns of numeric data. The tabs are:

Input

Scatterplot


Example

Chlorine measurements taken from 44 samples of a product together with the number of weeks since their production provide the example for this statlet:


Input

Specify the names of the columns to be plotted along the vertical (Y) axis and the horizontal (X) axis:

Back to Top


Scatterplot

This tab creates a scatterplot of the data in the two columns:

Notice the negative correlation between the variables.

Options button

The Options dialog box specifies whether points, lines, or both are to be included on the plot. If desired, you may also request that the plot be smoothed using one of several methods:

Each of the smoothers constructs a window of fixed width (the smoothing fraction) and moves it along the X axis. It plots a smoothed value based on the points within the window. The methods differ by how the smoothed values are calculated:

Running means - the smooth is the average value of all points within the window

Running lines - the smooth is the location of a linear regression fit to all points within the window

Locally weighted regression (LOWESS) - the smooth is the location of a linear regression where points are weighted according to how close they are to the center of the window

Robust LOWESS - a two-pass version of LOWESS, where the second pass down-weights values far from the smooth calculated by the first pass

You also specify the width of the moving window. A relatively large width such as 50% often does a good job at displaying the plot. The picture below shows a robust LOWESS smooth with a smoothing fraction equal to 50% of the range of the data:

Notice the apparent curvature in the data. As you move down the list of smoothers, the results tend to be better but more time-consuming to compute.

Back to Top