Johan Osterberg - Product Engineer

Hypothesis test in SPSS

April 16, 2019

For the purpose of this tutorial, I’m gonna be using the sample data set demo.sav, available under installdir/IBM/SPSS/Statistics/[version]/Samples/[lang], in my case, on Windows that would be C:\Program Files\IBM\SPSS\Statistics\25\Samples\English.

  1. If you haven’t already make sure to open the sample data set demo.sav (this data set is incidentally available in many different formats, such as txt and xlsx).
  2. Click on Analyze>>Nonparametric Tests>>One Sample…
  3. In the resulting window, choose Automatically compare observed data to hypothesized.
  4. Click on the tab Fields.
  5. Depending on the version of SPSS, either all variables or just the categorical ones are available in the right column, Test Fields. However, for the purpose of this tutorial we’ll perform a one-sample binomial test so keep Gender which is a nominal variable and remove the rest (if the column Test Fields isn’t populated just add Gender and you’re good to go). The following hypothesis test will consequently answer the question What proportion of this sample is male or female?
  6. Under the next tab, Settings, there is the possibility to customize Significance level and Confidence interval. However the defaults are already at 0.05 and 95% respectively which will do just fine.
  7. Click Run.
  8. The result is a single nonparametric test. In the resulting table the null hypothesis is stated as The categories defined by Gender = Female and Male occur with probabilities 0.5 and 0.5. The significance for this test SPSS calculated as 0.608 which is quite high and consequently the recommendation is to retain the null hypothesis (as the significance level is 0.05), which in this case means that the proportions male and female are about equal.

Hypothesis test summary for a one-sample nonparametric test

Johan Osterberg

Written by Johan Osterberg who lives and works in Gothenburg, Sweden as a developer specialized in e-commerce. Connect with me on Linkedin