Skip to content
Tutorials Center
My learning

Topics

Lesson 37 of 39 ยท Projects and Practice

Project: Analysing a Customer Survey in SPSS

A complete SPSS survey project: define variables, clean data, build a scale, describe, test group differences and relationships, then write the results, with stand-in code.

In this project you analyse a small customer satisfaction survey from the first look at the data to the written results. You will use the skills from the whole course: variables and labels, cleaning, descriptive statistics, tests, regression and reporting. Because SPSS cannot run on this site, each step shows the menu path and syntax, and a Python stand-in does the same arithmetic on a tiny data set so you can follow every number.

The situation

A company asked 24 customers three satisfaction questions (1 = very dissatisfied, 5 = very satisfied), plus whether they would recommend the shop (1 = yes, 0 = no), their age and their channel (1 = store, 2 = online).

Research questions:

  1. How satisfied are customers overall?
  2. Do store and online customers differ in satisfaction?
  3. Is satisfaction related to age?
  4. What predicts willingness to recommend?
flowchart LR
    A["1. Define variables"] --> B["2. Clean and check"]
    B --> C["3. Build satisfaction scale"]
    C --> D["4. Describe"]
    D --> E["5. Test and model"]
    E --> F["6. Report"]

The path through the project. Every step is saved in one syntax file.

Step 1: define the variables

In Variable View (or syntax):

Text
VARIABLE LABELS q1 'Product quality' q2 'Service' q3 'Value for money'
  age 'Age in years' channel 'Purchase channel' recommend 'Would recommend'.
VALUE LABELS channel 1 'Store' 2 'Online'
  /recommend 0 'No' 1 'Yes'.
VARIABLE LEVEL q1 q2 q3 (ORDINAL) age (SCALE) channel recommend (NOMINAL).

Step 2: clean and check

Run FREQUENCIES VARIABLES=q1 q2 q3 channel recommend and DESCRIPTIVES VARIABLES=age, and look for values outside the legal range (a 7 on a 1-5 item), duplicated cases and missing values. Fix problems in syntax (RECODE q2 (7=SYSMIS)) and comment each decision.

Python Stand-in: the survey data and a range check

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Step 3: build the satisfaction scale

Three items measuring one idea can be averaged into a scale. Check that they belong together with Analyze > Scale > Reliability Analysis (Cronbach's alpha; above about .7 is acceptable), then compute the scale score:

Text
COMPUTE satisfaction = MEAN.3(q1, q2, q3).
EXECUTE.
RELIABILITY /VARIABLES=q1 q2 q3 /SCALE('Satisfaction') ALL /MODEL=ALPHA.
Python Stand-in: scale score and Cronbach's alpha

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Step 4: describe

Text
DESCRIPTIVES VARIABLES=age satisfaction /STATISTICS=MEAN STDDEV MIN MAX.
FREQUENCIES VARIABLES=channel recommend.
EXAMINE VARIABLES=satisfaction BY channel /PLOT=BOXPLOT HISTOGRAM NPPLOT.

Look at the boxplot by channel and the normality plots before you test. See Chart Builder for polished charts.

Step 5: test and model

Q2: store versus online satisfaction (scale outcome, two independent groups): see independent-samples t test.

Text
T-TEST GROUPS=channel(1 2) /VARIABLES=satisfaction.

Q3: satisfaction and age (two scale variables): see correlation analysis.

Text
CORRELATIONS /VARIABLES=age satisfaction /PRINT=TWOTAIL NOSIG.

Q4: recommendation (binary outcome): see binary logistic regression.

Text
LOGISTIC REGRESSION VARIABLES recommend
  /METHOD=ENTER satisfaction age
  /PRINT=GOODFIT CI(95).
Python Stand-in: the group test and correlation

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Step 6: report

Structure the write-up like a short paper:

  1. Sample: N, channel split, mean age.
  2. Measures: the scale and its alpha.
  3. Results: one paragraph per question, each with statistic, df, p, effect size and a plain-language sentence.
  4. Limits: tiny non-random sample, self-report, association not cause.

Export the tables with File > Export (see pivot tables and exports) and keep the .sps, .sav and .spv together.

Check yourself

  • Does every number in the text match the output?
  • Did you check assumptions (Levene, normality, outliers) before the tests?
  • Are the p values reported as p < .001 where SPSS shows .000?
  • Is the syntax file runnable top to bottom on a fresh copy of the data?

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why compute Cronbach's alpha before averaging three items into a scale?

    Alpha is an index of internal consistency; low alpha says the items do not hang together.
  2. 2. Which test compares satisfaction between store and online customers?

    Two independent groups and a scale outcome.
  3. 3. The outcome 'would recommend' is yes/no. Which model fits?

    A binary outcome needs a logistic model.
  4. 4. What should you do before running any test?

    Cleaning and exploring first prevents mistakes later.

Summary

  • A project runs from variable definition and cleaning to scale building, description, tests and a written report.
  • Keep every step in one syntax file so the analysis is repeatable.
  • Match each research question to a test and check its assumptions.
  • Report effect sizes and be honest about the study's limits.

Next: Project: Analysing an Experiment