User:ASnieckus/StatisticsContent/Learn by doing/Case III - Scatterplot

Description of activity and Excel instructions:Scatterplot

Dataset: height.xls

Prep data
Ultimately we want to display the scatterplot to see the effect of gender, so before we begin let's sort the data by gender.


 * Type the key combination Ctrl+A to select all of the data in the worksheet.
 * Select Data > Sort....

The Sort dialog displays.
 * Click the Options tab.
 * Check Range contains column labels.
 * Click the Sort Criteria tab.
 * Under Sort by, choose gender in the drop down menu.
 * Click OK.

Create scatterplot
Use the Chart Wizard to create a scatter plot.


 * Select columns B and C.
 * Select Insert > Chart....

The Chart Wizard displays.

In ''1. Chart Type'': In ''2. Data Range'':
 * Select XY (Scatter).
 * Select the Points Only version.
 * Click Next>>.
 * Click 'Data series in columns.
 * Check First row as label.

No changes are needed for ''3. Data Series''.
 * Click Next>>.

In ''4. Chart Elements'':
 * Enter a title for the chart.
 * Enter a title for the X axis (explanatory variable).
 * Enter a title for the Y axis (response variable).
 * Decide if you want to display a grid in the chart background.
 * Although the legend is not meaningful in this situation, it just lists the one color labeled weight, check the Display Legend box because we will need it later.
 * Click Finish.

Calc creates a scatterplot. Note that the X axis scale is shown as 50 to 80, a reasonable choice for this data. If you want to change the shape or size of the data points, double click on the graph to enter edit mode, right click on the data points, select Object Properties..., and explore the options in the Icon section.

Return to the OLI's Scatterplot page to complete the first interpretive exercise.

Create a scatterplot of height vs. weight by gender
We will add the gender variable to the scatterplot you already created. First let's rename the gender data for ease of use.


 * Use the Find & Replace command to change 0 to Male and 1 to Female. Remember to narrow the action of this command to only the relevant data.

Now let's revise the chart.
 * Double click on the existing chart to enter edit mode.
 * Right-click on the datapoints
 * Select Data Ranges... from the pop-up menu

The Data Ranges dialog displays.
 * Click the Data Series tab.

Right now only one series is shown, and it is labeled weight. This series currently includes all of the data points for both male and female. We're going to change this series to represent only males, and add a new series to represent females.


 * Click on the weight series to select it.
 * Select the Name row under Data ranges.
 * Using the shrink button next to the Range for Name window, select cell A2 with the data element Male.
 * Select the X-Values row under Data ranges.
 * Using the shrink button next to the Range for Name window, select the male height values, B2:B58.
 * Select the Y-Values row under Data ranges.
 * Using the shrink button next to the Range for Name window, select the female height values, C2:C58.

Now let's add a new series for the Female data.
 * Click on the Add button to add a new series.
 * Repeat the steps above to name the series Female and point to the correct data.
 * Click OK when you are finished.

The chart now displays the datapoints in two different colors, one for males and one for females, and the legend indicates which is which.

If you want to change the shape or size of the data points, double click on the graph to enter edit mode, right click on each set of data points, select Object Properties..., and explore the options in the Icon section.

Return to the OLI's Scatterplot page to complete the second interpretive exercise.