learn to use two-way scatter plots in spss with data from

9
Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian Fuel Consumption Report (2015) © 2015 SAGE Publications, Ltd. All Rights Reserved. This PDF has been generated from SAGE Research Methods Datasets.

Upload: others

Post on 30-Apr-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Learn to Use Two-Way Scatter Plots in SPSS With Data From

Learn to Use Two-Way Scatter

Plots in SPSS With Data From the

Canadian Fuel Consumption

Report (2015)

© 2015 SAGE Publications, Ltd. All Rights Reserved.

This PDF has been generated from SAGE Research Methods Datasets.

Page 2: Learn to Use Two-Way Scatter Plots in SPSS With Data From

Learn to Use Two-Way Scatter

Plots in SPSS With Data From the

Canadian Fuel Consumption

Report (2015)

How-to Guide for IBM® SPSS® Statistics Software

Introduction

In this guide you will learn how to produce a two-way scatter plot of two continuous

variables. You will find links to the example dataset and you are encouraged to

replicate this example. An additional practice example is suggested at the end of

this guide. The example assumes you have already opened the data file in IBM®

SPSS® Statistics software (SPSS).

Contents

1. Two-Way Scatter Plot

2. An Example in SPSS: CO2 Emissions and Fuel Consumption

2.1 The SPSS Procedure

2.2 Exploring the SPSS Output

3. Your Turn

1 Two-Way Scatter Plot

A two-way scatter plot is a graphical method used to explore the relationship

between two continuous variables. One of the variables defines the horizontal axis

(often called the X-axis) of the plot and the other variable defines the vertical axis

SAGE

2015 SAGE Publications, Ltd. All Rights Reserved.

SAGE Research Methods Datasets Part

1

Page 2 of 9 Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian

Fuel Consumption Report (2015)

Page 3: Learn to Use Two-Way Scatter Plots in SPSS With Data From

(often called the Y-axis) of the plot. Each observation in the dataset is plotted

within the figure based on the values it has for both of the variables. In other

words, the values of the two variables under consideration define the coordinates,

or location, within the figure where each case will be plotted.

Researchers construct two-way scatter plots to explore the relationship between

two variables, to identify observations that are outliers, and as a diagnostic tool for

more complicated statistical methods such as multiple regression.

An Example in SPSS: CO2 Emissions and Fuel Consumption

This example explores the relationship between automobile CO2 emissions and

fuel consumption under city driving conditions using two variables from the 2015

Fuel Consumption Report from Natural Resources Canada:

• The CO2 emissions of an automobile (co2emissions), measured in grams

per kilometer.

• The city fuel consumption rate for each automobile (fuelusecity), measured

in liters per 100 kilometers.

The CO2 emissions of the automobile are measured in grams per kilometer. In

this dataset, it has a mean of approximately 244.69 with a standard deviation of

about 55.70. The variable fuelusecity ranges between 4.5 and 30.60 in this sample

dataset, with a mean of 12.53.

Both of these are continuous variables, making them appropriate for producing a

two-way scatter plot.

2.1 The SPSS Procedure

You can produce a two-way scatter plot in SPSS in several ways, one of which we

explore in detail here. Begin by selecting from the menu:

SAGE

2015 SAGE Publications, Ltd. All Rights Reserved.

SAGE Research Methods Datasets Part

1

Page 3 of 9 Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian

Fuel Consumption Report (2015)

Page 4: Learn to Use Two-Way Scatter Plots in SPSS With Data From

Graphs → Chart Builder

This opens a Chart Builder dialog box. Figure 1 shows what this looks like in

SPSS.

(Note: you may get a message asking you to define the level of measurement for

variables in your dataset before you can proceed to building the chart. If you get

this message, typically you can select “OK” and then “Scan Data” and SPSS will

execute this task for you automatically.)

Figure 1: Selecting Chart Builder from the Graphs menu in SPSS

SAGE

2015 SAGE Publications, Ltd. All Rights Reserved.

SAGE Research Methods Datasets Part

1

Page 4 of 9 Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian

Fuel Consumption Report (2015)

Page 5: Learn to Use Two-Way Scatter Plots in SPSS With Data From

In the lower half of the Chart Builder dialog box, select from the lower left menu

“Scatter/Dot”. Eight icons for scatter plots appear. The one on the top left is for a

simple scatter plot. Drag and drop that icon up into the open box in the upper half

of this dialog box where the instructions say “Drag a Gallery chart here…”.

When you do, an Element Properties dialog box will open. You can ignore that for

this example.

Next, drag and drop the variable you want plotted on the X-axis into the text box

labeled “X-Axis?” For this example, the variable is fuelusecity. Next, drag and drop

SAGE

2015 SAGE Publications, Ltd. All Rights Reserved.

SAGE Research Methods Datasets Part

1

Page 5 of 9 Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian

Fuel Consumption Report (2015)

Page 6: Learn to Use Two-Way Scatter Plots in SPSS With Data From

the co2emissions variable into the text box labeled “Y-Axis?” Note that SPSS will

display the variable labels (e.g. “Fuel Use City” and “CO2 Emissions” in this case)

and not the actual variable names if such labels are available. Figure 2 shows

what this looks like in SPSS.

Figure 2: Building a two-way scatter plot in the Chart Builder dialog box in SPSS.

Once done, click OK to produce the plot.

Exploring the SPSS Output

SAGE

2015 SAGE Publications, Ltd. All Rights Reserved.

SAGE Research Methods Datasets Part

1

Page 6 of 9 Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian

Fuel Consumption Report (2015)

Page 7: Learn to Use Two-Way Scatter Plots in SPSS With Data From

Executing the procedure above using the variable named fuelusecity on the X-

axis and the variable named co2emissions on the Y-axis produces the scatter plot

shown in Figure 3.

Figure 3: Two-way scatter plot of city fuel consumption and CO2 emissions from

automobiles, Fuel Consumption Report, Natural Resources Canada, 2015.

Figure 3 shows a clear relationship between these two variables. Relatively higher

city driving fuel consumption rates are associated with relatively higher CO2

emissions across the board. The plot in Figure 3 shows a positive relationship

between these two variables that appears to be pretty linear. However, there does

SAGE

2015 SAGE Publications, Ltd. All Rights Reserved.

SAGE Research Methods Datasets Part

1

Page 7 of 9 Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian

Fuel Consumption Report (2015)

Page 8: Learn to Use Two-Way Scatter Plots in SPSS With Data From

appear to be a subset of observations that separate from the rest – the group that

is lower and to the right of the large set. Further exploration revealed that all of the

automobiles in that smaller group are fueled by Ethanol E85 rather than traditional

gasoline or diesel fuel.

Two common statistical measures of correlation – the Pearson correlation

coefficient and the Spearman rank-order correlation coefficient – can be computed

to measure the association between two variables (see the SAGE Research

Methods Datasets modules on these methods). The Pearson correlation

coefficient assumes a linear relationship between the two variables in question

while the Spearman rank-order correlation coefficient only assumes a monotonic

relationship. Figure 3 suggests that using the Pearson correlation coefficient to

measure the association between these two variables would be appropriate,

though researchers might want to compute the measure separately for

automobiles that consume Ethanol E85 and those that do not.

3 Your Turn

Download this sample dataset and see if you can replicate the results. Then

repeat the process replacing the city fuel consumption measure with a variable

named fuelusehwy that measures automobile fuel consumption under highway

driving conditions.

IBM® SPSS® Statistics software (SPSS) screenshots Republished Courtesy of

International Business Machines Corporation, ® International Business Machines

Corporation. SPSS Inc. was acquired by IBM in October, 2009. IBM, the IBM logo,

ibm.com, and SPSS are trademarks or registered trademarks of International

Business Machines Corporation, registered in many jurisdictions worldwide. Other

product and service names might be trademarks of IBM or other companies. A

current list of IBM trademarks is available on the Web at “IBM Copyright and

SAGE

2015 SAGE Publications, Ltd. All Rights Reserved.

SAGE Research Methods Datasets Part

1

Page 8 of 9 Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian

Fuel Consumption Report (2015)

Page 9: Learn to Use Two-Way Scatter Plots in SPSS With Data From

trademark information” at http://www.ibm.com/legal/copytrade.shtml.

SAGE

2015 SAGE Publications, Ltd. All Rights Reserved.

SAGE Research Methods Datasets Part

1

Page 9 of 9 Learn to Use Two-Way Scatter Plots in SPSS With Data From the Canadian

Fuel Consumption Report (2015)