How can I use SPSS to create a scatterplot with a regression line?

SPSS (Statistical Package for the Social Sciences) is a statistical software that can be used to create scatterplots with a regression line. To do this, first, you will need to enter your data into the software. Then, you can open the “Graphs” menu and select “Scatterplot.” Choose the type of scatterplot you want (e.g. simple, grouped, etc.) and select the variables you want to plot on the X and Y axes. Next, click on the “Element Properties” button and select “Fit Line at Total.” This will add a regression line to your scatterplot. You can customize the appearance of the line by clicking on the “Fit Line” tab in the “Chart Editor” window. Finally, you can save your scatterplot with the regression line and use it for further analysis or presentations.


Often you may want to create a scatterplot with a regression line in SPSS, such as the following:

SPSS scatterplot with regression line

Fortunately this is easy to do and the following step-by-step example shows how to do so.

Step 1: Enter the Data

First, let’s enter the following dataset into SPSS that contains information about total ad spend and total sales for 12 different retail stores:

We will create a scatterplot that displays ad spend on the x-axis and sales on the y-axis.

We will then add a regression line to the plot that uses ad spend as the predictor variable and sales as the response variable in the model.

Step 2: Insert a Scatterplot

To insert a scatterplot, click the Graphs tab, then click Chart Builder.

In the new window that appears, do the following:

  • Choose Scatter/Dot from the list of charts.
  • Drag the first scatter plot icon into the Chart Builder area.
  • Drag the Ad_Spend variable to the x-axis of the plot.
  • Drag the Sales variable to the y-axis of the plot.
  • Check the box next to Total under Linear Fit Lines

Then click the Y-Axis1 under Edit Properties of, then type 0 as the Minimum value for the Y-axis:

Once you click OK, the following scatterplot will be generated:

The R2 value of the regression line is also shown in the top right corner outside of the plot.

Related:

Step 3: Add Regression Line Equation

To add the regression line equation to the plot, double click anywhere on the plot to bring up the Chart Editor.

The double click on the regression line in the chart.

In the new window that appears, click the Fit Line tab and then check the box next to Attach label to line:

Once you click Apply, the regression line equation will be added to the regression line:

SPSS scatterplot with regression line

We can see that the fitted regression line equation is:

Sales = 29.63 + 0.76(Ad Spend)

Here is how to interpret the of the regression equation:

  • When ad spend is zero, expected sales is 29.63.
  • For each additional dollar in ad spend, sales increases by an average of 0.76.

Additional Resources

The following tutorials explain how to perform other common operations in SPSS:

x